engine/app/views/admin/content_types/_form.html.haml

32 lines
1.6 KiB
Plaintext
Raw Normal View History

- content_for :head do
= include_javascripts :content_types, :custom_fields
= include_stylesheets :fancybox
= f.inputs :name => :information do
= f.input :name
= f.input :slug
= f.input :description
2010-06-24 09:14:08 +00:00
= render 'admin/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 :raw_item_template, :css => 'small-code' do
%code{ :class => 'html' }
= f.text_area :raw_item_template, :class => 'small'
= f.errors_on :item_template
= 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
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?}" }
= 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') }