Sha256: 9f3d6cb3e1ff1bd27fed4b9b7fd78a0aeadac5c39891a053e6edc9ba80efe021

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

<% options ||= {} %>
<%= content_tag :div, field.html_options do -%>
  <% if field.visible?(form.object) -%>
    <% if field.nested? -%>
      <div class="nested">
        <div class="title-switcher up"><%= form.label field.name %></div>
        
        <%= form.simple_fields_for field.name.to_sym do |nested| %>
          <%= render :partial => "nested_field", :locals => { :form => nested, :field => field }  %>
        <% end -%>
        
        <% if field.multiply? %>
          <div class="nested_bottom">
            <%= manage_add_child_link t('manage.buttons.add_nested_field'), form, field, {:partial=>"nested_field"} %>
          </div>
        <% end -%>

        <% if field.sort? %>
          <script type="text/javascript">
            $(document).ready(function(){
              window['sunrise'].initSortFields("#<%= field.dom_id %>");
            });
          </script>
        <% end -%>
      </div>
    <% elsif field.association? -%>
      <%= form.association field.name.to_sym, field.input_options.merge(options) %>
    <% else -%>
      <%= form.input field.name, field.input_options.merge(options)  %>
    <% end -%>
  <% end -%>
<% end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sunrise-cms-1.0.0 app/views/sunrise/manager/_field.html.erb