Sha256: e807ddbc0f73ae75c4ab2f8892b01ab0a7becf38ed9d15232837f57badc78d46

Contents?: true

Size: 1.4 KB

Versions: 3

Compression:

Stored size: 1.4 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) %>">
    <%=raw 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) %>">
    <%=raw render :partial => form_partial_for_column(column, renders_as), :locals => { :column => column } -%>
  </li>
  <% end -%>
  <% end -%>
</ol>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_scaffold_vho-3.0.16 frontends/default/views/_form.html.erb
active_scaffold_vho-3.0.15 frontends/default/views/_form.html.erb
active_scaffold_vho-3.0.14 frontends/default/views/_form.html.erb