Sha256: 6bfce7aecd7a09830773e08926f1d8dcf671d47e7b39ea4398443570a3abe174

Contents?: true

Size: 1.73 KB

Versions: 17

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

17 entries across 17 versions & 1 rubygems

Version Path
fullstack-admin-0.1.52 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.51 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.50 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.49 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.48 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.47 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.46 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.45 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.44 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.43 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.42 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.41 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.40 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.39 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.38 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.37 app/views/admin/base/_associated_resources_table.html.erb
fullstack-admin-0.1.36 app/views/admin/base/_associated_resources_table.html.erb