- content_for :head do = render 'locomotive/custom_fields/form', :f => f - content_for :backbone_view_data do :plain { content_type: #{@content_type.persisted? ? @content_type.to_json : 'null'} } = f.inputs :name => :information do = f.input :name, :wrapper_html => { :class => 'highlighted' } = f.input :slug = f.input :description = f.inputs :name => :custom_fields, :class => "inputs foldable #{'folded' if inputs_folded?(@content_type)}" do = f.input :contents_custom_fields, :as => :'Locomotive::Empty', :label => false, :wrapper_html => { :id => 'custom_fields_input' } / = render 'locomotive/custom_fields/index', :form => f, :collection_name => 'contents' / / - unless f.object.new_record? / = f.foldable_inputs :name => :presentation, :class => 'switchable' do / = f.input :highlighted_field_name, :as => :select, :collection => options_for_highlighted_field(f.object, 'contents'), :include_blank => false / = f.input :group_by_field_name, :as => :select, :collection => options_for_group_by_field(f.object, 'contents') / = f.custom_input :item_template, :css => 'small-code' do / %code{ :class => 'html' } / = f.text_area :raw_item_template, :class => 'small' / / = f.foldable_inputs :name => :options, :class => 'switchable' do / = f.input :order_by, :as => :select, :collection => options_for_order_by(f.object, 'contents'), :include_blank => false / = f.input :order_direction, :as => :select, :collection => options_for_order_direction, :include_blank => false, :wrapper_html => { :style => "#{'display: none' if f.object.order_manually?}" } / = f.custom_input :api_enabled, :css => 'toggle' do / = f.check_box :api_enabled / = hidden_field_tag 'content_type[api_accounts][]', '' / = f.input :api_accounts, :as => :select, :collection => current_site.accounts.collect { |a| ["#{a.name} <#{a.email}>", a.id] }, :include_blank => false, :multiple => true, :wrapper_html => { :class => 'multiple', :style => (f.object.api_enabled? ? '' : 'display: none') } / / / /