Sha256: 30a361e1496a4405be1863523300d91f7549e921e0233b7d0bdd7f9574d469f9

Contents?: true

Size: 1.28 KB

Versions: 14

Compression:

Stored size: 1.28 KB

Contents

<%%= error_messages_for :<%= singular_name %> -%>
<%% form_for [:admin, @<%= singular_name %>] do |f| -%>
  <% attributes.each_with_index do |attribute, index| %>
  <div class='field'>
    <%%= f.label :<%= attribute.name %> -%>
<% if attribute.type.to_s == 'image' -%>
    <%%= render :partial => "/shared/admin/image_picker", :locals => {
      :f => f,
      :field => :<%= "#{attribute.name}_id".gsub("_id_id", "_id") %>,
      :image => @<%= singular_name %>.<%= attribute.name.gsub("_id", "") %>,
      :toggle_image_display => false
    } %>
<% elsif attribute.type.to_s == 'resource' %>
    <%%= render :partial => "/shared/admin/resource_picker", :locals => {
      :f => f,
      :field => :<%= "#{attribute.name}_id".gsub("_id_id", "_id") %>,
      :resource => @<%= singular_name %>.<%= attribute.name.gsub("_id", "") %>,
    } %>
<% elsif attribute.field_type.to_s == "text_area" -%>
    <%%= f.text_area :<%= attribute.name %>, :rows => 20, :cols => 140, :class => 'wymeditor' -%>
<% else -%>
    <%%= f.<%= attribute.field_type -%> :<%= attribute.name -%><%= ", :class => 'larger'" if (index == 0 && attribute.field_type == :text_field) -%> -%>
<% end -%>
  </div>
  <% end %>
  <%%= render :partial => "/shared/admin/form_actions", :locals => {:f => f, :continue_editing => false} %>
<%% end -%>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
refinerycms-0.9.6.34 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.33 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.32 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.31 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.30 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.29 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.28 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.27 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.26 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.25 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.24 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.23 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.22 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb
refinerycms-0.9.6.21 vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb