Sha256: bc06315f31fb7738285723a712fb3f51bcb647e7eca795f7876e078e6af10510
Contents?: true
Size: 723 Bytes
Versions: 5
Compression:
Stored size: 723 Bytes
Contents
<% applications.each do |app, models| %> <table> <thead> <tr> <th colspan="2"><%= _(app) %></th> </tr> </thead> <% models.each do |model| %> <% klass = model.constantize klass_human_name = klass.model_name.human.gsub("/", " ").pluralize admin_items_path = { :controller => "admin/#{klass.to_resource}" } %> <tr class="<%= cycle("even", "odd") %>"> <td> <%= link_to klass_human_name, admin_items_path %> </td> <td class="right"> <%= link_to_if @current_user.can?("create", klass), _("Add"), admin_items_path.merge(:action => "new") %> </td> </tr> <% end %> </table> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems