Sha256: 20e1a6d5c0de5db0689a71c273b980587f73d89ca125d6a7647f903b24195c2e

Contents?: true

Size: 876 Bytes

Versions: 16

Compression:

Stored size: 876 Bytes

Contents

%h2 Edit <%= @name.human.downcase %>

= form_for @<%= @name.element %>, url: cms_<%= @name.element %>_path(@<%= @name.element %>), html: {class: 'form-horizontal'} do |f|
<% @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(CMS::<%= @name %>.count).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

16 entries across 16 versions & 1 rubygems

Version Path
honey-cms-0.3.8 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.3.7 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.3.5 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.3.4 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.3.3 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.3.2 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.3.1 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.3.0 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.2.4 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.2.3 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.2.2 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.2.1 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.2.0 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.1.2 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.1.1 lib/generators/cms/templates/views/edit.html.haml
honey-cms-0.1.0 lib/generators/cms/templates/views/edit.html.haml