2010-05-25 00:32:12 +00:00
|
|
|
- content_for :head do
|
2011-12-19 13:15:11 +00:00
|
|
|
= render 'locomotive/custom_fields/form', :f => f
|
|
|
|
|
|
|
|
- content_for :backbone_view_data do
|
|
|
|
:plain
|
|
|
|
{ content_type: #{@content_type.persisted? ? @content_type.to_json : 'null'} }
|
2010-05-25 00:32:12 +00:00
|
|
|
|
2010-05-24 00:18:23 +00:00
|
|
|
= f.inputs :name => :information do
|
2011-07-01 00:15:45 +00:00
|
|
|
= f.input :name, :wrapper_html => { :class => 'highlighted' }
|
2010-05-25 00:32:12 +00:00
|
|
|
= f.input :slug
|
|
|
|
= f.input :description
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2011-12-19 13:15:11 +00:00
|
|
|
= 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') }
|
|
|
|
/
|
|
|
|
/
|
|
|
|
/
|
|
|
|
/
|