Sha256: 0fc939fa5d81dfd20652b0b649efa4cf10266423dd704112194b4f93bc5c4488
Contents?: true
Size: 1.37 KB
Versions: 1
Compression:
Stored size: 1.37 KB
Contents
<table> <thead> <tr> <% model.columns(:display).each do |column| %> <th><%= sort_link_to(model, column) %></th> <% end %> <th>Actions</th> </tr> </thead> <tbody> <% records.each do |record| %> <tr class="<%= cycle('odd', 'even') %>"> <% model.columns(:display).each do |column| %> <td><%= truncate(sanitize(model.display_for(record, column.name).to_s), :length => 20) %></td> <% end %> <td> <% if parent %> <%= link_to 'Edit', :controller => 'admin/kitsune/records', :action => :edit, :model_id => model.object_class, :id => record.id, (parent.class.to_s.underscore+'_id').to_sym => parent.id %> <% else %> <%= link_to 'Edit', :controller => 'admin/kitsune/records', :action => :edit, :model_id => model.object_class, :id => record.id %> <% end %> - <% if parent %> <%= link_to('Delete', url_for(:controller => 'admin/kitsune/records', :model_id => model.object_class, :id => record.id, :action => :destroy, :redirect => (parent.class.to_s.underscore+'_id'), :redirect_id => parent.id), :method => :delete, :confirm => "Are you sure?") %> <% else %> <%= link_to('Delete', url_for(:controller => 'admin/kitsune/records', :model_id => model.object_class, :id => record.id, :action => :destroy), :method => :delete, :confirm => "Are you sure?") %> <% end %> </td> </tr> <% end %> </tbody> </table>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kitsune-0.0.6 | app/views/admin/kitsune/records/_list.html.erb |