Sha256: 212279242d241baa08bc7e0bf77cd0beca39aa5a3d939070a514a26373cb601b

Contents?: true

Size: 1.73 KB

Versions: 29

Compression:

Stored size: 1.73 KB

Contents

<% association_class = f.object.class.reflect_on_association(association).klass %>
<% resource_name = f.object.class.name.demodulize.underscore %>


<%= f.inputs t(association, :scope => 'fullstack.admin.resources', :default => association.to_s.humanize), :class => "associated-resources" do %>

<table class="table table-bordered table-striped index-table <%= 'positionable' if positionable?(association_class) %>" >
    <thead>
      <tr>
        <% if positionable?(association_class) %>
        <th style="width:20px"><%= tag :i,  :class => "icon icon-th-list", :"data-toggle" => "tooltip", :title => t('fullstack.admin.drag_to_sort_items', :default => "Drag to sort items") %></th>
        <% end %>
        <th><%= labelize_attribute_name(title_column(association_class)) %></th><th style="width:30%;"><%= t('fullstack.admin.actions', :default => "Actions") %></th></tr>
    </thead>
    <tbody class="associated-resources-index <%= 'sortable' if positionable?(association_class) %>">
      
      <% i = 0 %>
      <%= f.admin_fields_for association do |f| %>
      <%= render :partial => "nested_form", :locals => { :index => i, :f => f, :resource_name => resource_name, :association => association } %>
        <% i += 1 %>
      <% end %>    
      
    </tbody>
   
  </table>
  
  <script type="text/html" class="resource-fields-template">
    <%= f.admin_fields_for(association, association_class.new, :child_index => "___index___") do |f| %>
      <%= render :partial => "nested_form", :locals => {:index => "___index___", :f => f, :resource_name => resource_name, :association => association} %>
    <% end %>
  </script>

  <%= button t('fullstack.admin.add', :default => "Add"), "javascript:void(0);", :class => "btn-add-associated-resource" %>
  
<% end %>

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
fullstack-admin-0.2.5 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.4 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.3 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.2 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.1 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.56 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.55 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.54 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.53 app/views/admin/base/_associated_resources_table.html.erb