Sha256: db8f2d2181fe845a223dfd6099eaf449b9fca0c5db022e5fb3d1b3524d70ca50

Contents?: true

Size: 725 Bytes

Versions: 1

Compression:

Stored size: 725 Bytes

Contents

<% applications.each do |app, models| %>

  <table>

    <thead>
      <tr>
        <th colspan="2"><%= _t(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), _t("Add"), admin_items_path.merge(:action => "new") %>
        </td>
      </tr>

    <% end %>

  </table>

<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
typus-1.0.0.pre6 app/views/admin/helpers/dashboard/_applications.html.erb