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