Sha256: 86427da872e059649f58cdbf8874f37e597ce01dd283bce9b66b16b95988f18e
Contents?: true
Size: 1.39 KB
Versions: 10
Compression:
Stored size: 1.39 KB
Contents
<% subsection_id ||= nil %> <ol class="form" <%= "id=#{subsection_id}" unless subsection_id.nil? %> <%= 'style="display: none;"' if columns.collapsed -%>> <% columns.each :for => @record do |column| %> <% renders_as = column_renders_as(column) %> <% if renders_as == :subsection -%> <% subsection_id = sub_section_id(:sub_section => column.label) %> <li class="sub-section"> <h5><%= column.label %></h5> <%= render :partial => 'form', :locals => { :columns => column, :subsection_id => subsection_id} %> <%= link_to_visibility_toggle(subsection_id, {:default_visible => !column.collapsed}) -%> </li> <% elsif column.readonly_association? next %> <% elsif renders_as == :subform and !override_form_field?(column) -%> <li class="sub-form <%= active_scaffold_config_for(column.association.klass).subform.layout %>-sub-form <%= column.css_class unless column.css_class.nil? || column.css_class.is_a?(Proc) %>" id="<%= sub_form_id(:association => column.name) %>"> <%= render :partial => form_partial_for_column(column, renders_as), :locals => { :column => column } -%> </li> <% else -%> <li class="form-element <%= 'required' if column.required? %> <%= column.css_class unless column.css_class.nil? || column.css_class.is_a?(Proc) %>"> <%= render :partial => form_partial_for_column(column, renders_as), :locals => { :column => column } -%> </li> <% end -%> <% end -%> </ol>
Version data entries
10 entries across 10 versions & 2 rubygems