Sha256: 00efc8a6734762fa1662834ec24ce129720fe0891eb88e825640eef9c00ce144
Contents?: true
Size: 1.46 KB
Versions: 29
Compression:
Stored size: 1.46 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> <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> <th><%= labelize_attribute_name(title_column(association_class)) %></th> </tr> </thead> <tbody class="associated-resources-index <%= 'sortable' if positionable?(association_class) %>"> <% f.object.send(association).each do |item| %> <% title_column_or_id = title_column(item.class) || "id" %> <% resource_title = item.send(title_column_or_id) %> <tr class="associated-resource"> <td> <%= image_tag "drag-handle.png", :class => "handle" %> </td> <td> <span class='associated-resource-label'><%= resource_title %></span> <%= f.admin_fields_for association, item do |f| %> <%= f.hidden_field(:position, :class => "associated-resource-position") %> <% end %> </td> </tr> <% end %> </tbody> </table> <% end %>
Version data entries
29 entries across 29 versions & 1 rubygems