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

Version Path
typus-1.0.0.pre5 app/views/admin/helpers/dashboard/_applications.html.erb
typus-1.0.0.pre4 app/views/admin/helpers/dashboard/_applications.html.erb
typus-1.0.0.pre3 app/views/admin/helpers/dashboard/_applications.html.erb
typus-1.0.0.pre2 app/views/admin/helpers/dashboard/_applications.html.erb
typus-1.0.0.pre app/views/admin/helpers/dashboard/_applications.html.erb