2010-05-25 00:32:12 +00:00
|
|
|
- content_for :head do
|
2011-01-18 14:24:42 +00:00
|
|
|
= include_javascripts :content_types, :custom_fields
|
2010-12-14 17:00:12 +00:00
|
|
|
= include_stylesheets :fancybox
|
2010-05-25 00:32:12 +00:00
|
|
|
|
2010-05-24 00:18:23 +00:00
|
|
|
= f.inputs :name => :information do
|
|
|
|
= f.input :name
|
2010-05-25 00:32:12 +00:00
|
|
|
= f.input :slug
|
|
|
|
= f.input :description
|
2010-07-23 23:57:18 +00:00
|
|
|
|
2010-06-24 09:14:08 +00:00
|
|
|
= render 'admin/custom_fields/index', :form => f, :collection_name => 'contents'
|
2010-05-25 00:32:12 +00:00
|
|
|
|
2010-06-10 13:30:22 +00:00
|
|
|
- unless f.object.new_record?
|
2010-06-16 14:43:29 +00:00
|
|
|
= f.foldable_inputs :name => :presentation, :class => 'switchable' do
|
2010-06-10 13:30:22 +00:00
|
|
|
= f.input :highlighted_field_name, :as => :select, :collection => options_for_highlighted_field(f.object, 'contents'), :include_blank => false
|
2010-06-16 14:43:29 +00:00
|
|
|
= f.input :group_by_field_name, :as => :select, :collection => options_for_group_by_field(f.object, 'contents')
|
2011-06-01 21:43:12 +00:00
|
|
|
= f.custom_input :raw_item_template, :css => 'small-code' do
|
|
|
|
%code{ :class => 'html' }
|
|
|
|
= f.text_area :raw_item_template, :class => 'small'
|
|
|
|
= f.errors_on :item_template
|
2010-06-16 14:43:29 +00:00
|
|
|
|
|
|
|
= f.foldable_inputs :name => :options, :class => 'switchable' do
|
2010-06-10 13:30:22 +00:00
|
|
|
= f.input :order_by, :as => :select, :collection => options_for_order_by(f.object, 'contents'), :include_blank => false
|
2011-03-09 23:54:38 +00:00
|
|
|
= f.input :order_direction, :as => :select, :collection => options_for_order_direction, :include_blank => false, :wrapper_html => { :style => "#{'display: none' if f.object.order_manually?}" }
|
2010-06-10 14:50:50 +00:00
|
|
|
= f.custom_input :api_enabled, :css => 'toggle' do
|
|
|
|
= f.check_box :api_enabled
|
2011-01-18 14:24:42 +00:00
|
|
|
= 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') }
|
|
|
|
|
|
|
|
|
2010-07-23 23:57:18 +00:00
|
|
|
|
|
|
|
|