2011-12-19 13:15:11 +00:00
|
|
|
%script{ :type => 'text/html', :id => 'custom_fields_list' }
|
|
|
|
|
|
|
|
%p.empty{ :style => 'display: none' }!= t('.empty')
|
|
|
|
|
|
|
|
%ul
|
|
|
|
|
|
|
|
%hr
|
|
|
|
|
|
|
|
.new-entry
|
|
|
|
|
|
|
|
= text_field_tag 'label', '', :id => '', :placeholder => t('.default_label')
|
|
|
|
|
|
|
|
= select_tag 'type', options_for_select(options_for_custom_field_type)
|
|
|
|
|
|
|
|
%span.actions
|
|
|
|
= link_to t('locomotive.buttons.new_item'), '#', :class => 'add'
|
|
|
|
|
|
|
|
|
|
|
|
%script{ :type => 'text/html', :id => 'custom_field_entry' }
|
|
|
|
|
|
|
|
= f.semantic_fields_for :contents_custom_field, CustomFields::Field.new do |g|
|
|
|
|
|
2012-01-18 00:43:01 +00:00
|
|
|
.handle.col
|
2011-12-19 13:15:11 +00:00
|
|
|
= image_tag 'locomotive/form/icons/drag.png'
|
|
|
|
|
2012-01-18 00:43:01 +00:00
|
|
|
.label-input.col
|
2011-12-19 13:15:11 +00:00
|
|
|
= g.text_field :label, :class => 'label'
|
|
|
|
|
2012-01-18 00:43:01 +00:00
|
|
|
.type-input.col
|
2011-12-21 14:24:39 +00:00
|
|
|
= g.select :type, options_for_custom_field_type, {}, { :class => 'type' }
|
2011-12-19 13:15:11 +00:00
|
|
|
|
2012-01-18 00:43:01 +00:00
|
|
|
.required-input.col
|
|
|
|
= g.check_box :required, :class => 'required', :'data-on-label' => t('.required'), :'data-off-label' => t('.optional')
|
2011-12-19 13:15:11 +00:00
|
|
|
|
|
|
|
%ol.nested{ :style => 'display: none' }
|
|
|
|
|
|
|
|
= g.input :name, :input_html => { :class => 'name' }
|
|
|
|
|
|
|
|
= g.input :hint, :input_html => { :class => 'hint' }
|
|
|
|
|
2012-02-02 15:53:26 +00:00
|
|
|
= g.input :localized, :as => :'Locomotive::Toggle', :wrapper_html => { :class => 'localized' }, :input_html => { :class => 'localized' }
|
2012-01-14 00:38:09 +00:00
|
|
|
|
2011-12-22 15:45:42 +00:00
|
|
|
= g.input :select_options, :as => :'Locomotive::Empty', :wrapper_html => { :class => 'extra select-options', :style => 'display: none' }
|
2011-12-22 01:59:30 +00:00
|
|
|
|
2012-01-09 14:49:59 +00:00
|
|
|
= g.input :text_formatting, :as => :select, :collection => options_for_text_formatting, :include_blank => false, :wrapper_html => { :class => 'extra text-formatting' }, :input_html => { :class => 'text_formatting' }
|
2011-12-22 01:59:30 +00:00
|
|
|
|
2012-02-01 01:01:42 +00:00
|
|
|
= g.input :class_name, :as => :select, :collection => options_for_content_type, :include_blank => false, :wrapper_html => { :class => 'extra class-name', :style => 'display: none' }, :input_html => { :class => 'class_name' }
|
2012-01-31 00:50:09 +00:00
|
|
|
|
2012-02-01 01:01:42 +00:00
|
|
|
= g.input :inverse_of, :as => :select, :collection => [], :wrapper_html => { :class => 'extra inverse-of', :style => 'display: none' }, :input_html => { :class => 'inverse_of' }
|
|
|
|
|
|
|
|
= g.input :ui_enabled, :as => :'Locomotive::Toggle', :wrapper_html => { :class => 'extra ui-enabled' }, :input_html => { :class => 'ui_enabled' }
|
2012-01-31 00:50:09 +00:00
|
|
|
|
2011-12-19 13:15:11 +00:00
|
|
|
%span.actions
|
2011-12-21 14:24:39 +00:00
|
|
|
= link_to 'toggle', '#', :class => 'toggle'
|
2011-12-22 15:45:42 +00:00
|
|
|
= link_to 'x', '#', :class => 'remove', :confirm => t('locomotive.messages.confirm')
|
|
|
|
|
2012-01-18 00:43:01 +00:00
|
|
|
.clear
|
|
|
|
|
2011-12-22 15:45:42 +00:00
|
|
|
|
|
|
|
%script{ :type => 'text/html', :id => 'select_options_list' }
|
|
|
|
|
|
|
|
%ul{ :'data-prompt' => t('.select_options.ask_name') }
|
|
|
|
|
|
|
|
%span.actions
|
|
|
|
= link_to t('locomotive.buttons.new_item'), '#', :class => 'add'
|
|
|
|
|
|
|
|
|
|
|
|
%script{ :type => 'text/html', :id => 'select_option_entry' }
|
|
|
|
|
|
|
|
%li.entry
|
|
|
|
%span.name {{name}}
|
|
|
|
|
|
|
|
%span.actions
|
|
|
|
= link_to 'drag', '#', :class => 'drag'
|
|
|
|
= link_to 'x', '#', :class => 'remove', :confirm => t('locomotive.messages.confirm')
|