Sha256: 82c0bf6dce117ffb2ee686f9508aaf6069cb17d3cd6aa5ce7a3ce3202b1b3f5e
Contents?: true
Size: 1.4 KB
Versions: 7
Compression:
Stored size: 1.4 KB
Contents
<%% form_for [:admin, @<%= singular_name %>] do |f| -%> <%%= f.error_messages %> <% 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, :class => 'wymeditor widest' -%> <% 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, :delete_title => t('admin.<%= plural_name %>.<%= singular_name %>.delete') } %> <%% end -%>
Version data entries
7 entries across 7 versions & 1 rubygems