Sha256: eb55537bae3a32c4c31bbe6d57de6c792e11d0e4a9e91d5b05dff4722c76fdf4

Contents?: true

Size: 1.1 KB

Versions: 6

Compression:

Stored size: 1.1 KB

Contents

- 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'

- 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?
      = f.input field._alias.to_sym, :label => field.label, :hint => field.hint, :required => required
    - elsif field.text?
      = 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')
        

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
locomotive_cms-0.0.2.5 app/views/admin/contents/_form.html.haml
locomotive_cms-0.0.2.4 app/views/admin/contents/_form.html.haml
locomotive_cms-0.0.2.3 app/views/admin/contents/_form.html.haml
locomotive_cms-0.0.2.2 app/views/admin/contents/_form.html.haml
locomotive_cms-0.0.2.1 app/views/admin/contents/_form.html.haml
locomotive_cms-0.0.2 app/views/admin/contents/_form.html.haml