<%= render( partial: 'content/attributes/fields/description/' + field.field_type, locals: { field: field } ) if lookup_context.template_exists?(field.field_type, 'content/attributes/fields/description', true) %>
<%= form_for(field, method: :put, class: 'inline', remote: true) do |f| %>
<%= f.text_field :label, class: 'js-new-field-name' %>
<%= f.submit 'Rename field', class: 'btn white black-text js-update-field-name' %>
<% end %>
<%= render( partial: 'content/attributes/fields/options/' + field.field_type, locals: { field: field } ) if lookup_context.template_exists?(field.field_type, 'content/attributes/fields/options', true) %> <% if false %>
field type
<% if AttributeField::SETTABLE_FIELD_TYPES.include?(field.field_type) %>
<% AttributeField::SETTABLE_FIELD_TYPES.each do |field_type| %>
<% end %>
Changing a field type is a dangerous operation if you have any answers to this field on any pages already. It's recommended to create a new field instead of changing an existing one.
<% else %>

This is a <%= field.field_type %> field. Its type cannot be changed. <% end %>

<% end %>
more actions
<%= form_for(field, method: :put, class: 'inline') do |f| %> <%= f.hidden_field :hidden, value: !field.hidden %> <% if field.hidden? %> <%= f.submit 'Show this field', class: 'btn white black-text' %> <% else %> <%= f.submit 'Hide this field', class: 'btn white black-text', data: { confirm: "This will temporarily hide this field and its answers on all #{@content_type} pages. After hiding, you can re-show this field at any time to recover it and all its answers." } %> <% end %> <% end %>
<% if field.name_field? || field.universe_field? || field.tags_field? %>
This field cannot be deleted.
<% else %>
<%= link_to "Delete this field and answers", field, :class => 'red btn black-text', :method => :delete, :data => { :confirm => "Are you sure? This will delete this field AND all of its answers to EVERY page you've created. This action cannot be undone! If you have answered this field on ANY #{@content_type} page, YOUR ANSWER WILL BE DELETED TOO." } %>
<% end %>
<%# todo use privacy column here? %> <% if field.label.start_with?('Private') %>
visibility_off Because this field starts with the word "Private", its answers will only be visible to you even if you share your pages publicly.
<% end %>