<% model.columns(:display).each do |column| %>
<%= sanitize(model.display_for(record, column.name).to_s) %> |
<% end %>
<% 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 %>
|
<% end %>