Sha256: 2b07d324e90ab44b64c39cd86c72f6408c9f20b83ca4bdab283c86ffd143b5b8
Contents?: true
Size: 1.55 KB
Versions: 15
Compression:
Stored size: 1.55 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><%= sanitize(model.display_for(record, column.name).to_s) %></td> <% end %> <td> <% unless model.disabled?(:edit) %> <% 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 %> <% end %> <% unless model.disabled?(:edit) || model.disabled?(:delete) %> - <% end %> <% unless model.disabled?(:delete) %> <% 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 %> <% end %> </td> </tr> <% end %> </tbody> </table>
Version data entries
15 entries across 15 versions & 2 rubygems