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.26 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.25 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.24 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.23 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.22 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.21 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.20 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.19 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.18 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.17 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.16 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.15 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.14 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.13 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.12 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.11 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.9 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.8 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.7 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.2.6 app/views/admin/base/_associated_resources_table.html.erb