2010-06-10 13:30:22 +00:00
|
|
|
- content_for :head do
|
|
|
|
= javascript_include_tag 'admin/plugins/json2', 'admin/plugins/fancybox', 'admin/custom_fields/category', 'admin/contents'
|
|
|
|
= stylesheet_link_tag 'admin/plugins/fancybox', 'admin/box'
|
|
|
|
|
2010-05-25 00:32:12 +00:00
|
|
|
- highlighted_field_name = @content.content_type.highlighted_field_name
|
|
|
|
|
|
|
|
= f.inputs :name => :other_fields do
|
|
|
|
- @content.custom_fields.each do |field|
|
|
|
|
- required = highlighted_field_name == field._name
|
|
|
|
|
|
|
|
- if field.string?
|
2010-06-10 13:30:22 +00:00
|
|
|
= f.input field._alias.to_sym, :label => field.label, :hint => field.hint, :required => required
|
2010-05-25 00:32:12 +00:00
|
|
|
- elsif field.text?
|
2010-06-10 13:30:22 +00:00
|
|
|
= f.input field._alias.to_sym, :label => field.label, :hint => field.hint, :as => :text, :required => required
|
|
|
|
- elsif field.category?
|
|
|
|
= f.custom_input field._alias.to_sym, :label => field.label, :hint => field.hint, :css => 'toggle' do
|
|
|
|
= f.select field._name.to_sym, field.ordered_category_items.collect { |item| [item.name, item.id] }
|
|
|
|
%button.button.light.edit-categories-link{ :type => 'button', :'data-url' => edit_admin_custom_field_path(@content_type.slug, field) }
|
|
|
|
%span= t('.edit_categories')
|
|
|
|
|