Sha256: 67830a1403e307e9ebaf22398f0cd4a2a5328605daa6d9909fff5eadcbce0b92

Contents?: true

Size: 692 Bytes

Versions: 12

Compression:

Stored size: 692 Bytes

Contents

<% @type.attributes.each do |attribute| -%>
.control-group
  = f.label :<%= attribute.field_name %>, class: 'control-label'
<% if attribute.orderable? -%>
  .controls
    = f.<%= attribute.form_type %> :<%= attribute.name %>, 1.upto(f.object.order_scope.count + 1).to_a
<% elsif attribute.reference? -%>
  .controls
    = f.<%= attribute.form_type %> :<%= attribute.field_name %>, CMS::<%= attribute.reference_to %>.all.collect {|r| [ r.<%= attribute.options['reference_label'] %>, r.id ] }
<% else -%>
  .controls
    = f.<%= attribute.form_type %> :<%= attribute.name %>
<% end -%>
<% end -%>
.form-actions
  = f.submit 'Save', class: 'btn btn-primary', :'data-disable-with' => 'Saving...'

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
honey-cms-0.4.8 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.4.7 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.4.6 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.4.5 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.4.2 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.4.1 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.4.0 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.3.13 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.3.12 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.3.11 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.3.10 lib/generators/cms/templates/views/_fields.html.haml
honey-cms-0.3.9 lib/generators/cms/templates/views/_fields.html.haml