Sha256: 676bb70ecba25db5c780ecfd3065991e956ec9c422fd30b47b51bed71fb2b8b3

Contents?: true

Size: 1.74 KB

Versions: 12

Compression:

Stored size: 1.74 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" charset="utf-8" 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

12 entries across 12 versions & 1 rubygems

Version Path
fullstack-admin-0.1.35 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.34 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.33 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.32 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.30 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.29 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.28 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.27 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.26 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.25 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.24 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.23 app/views/admin/base/_associated_resources_table.html.erb