Sha256: 92f33c0d4161ebb9c13449d14e95112a2c382561979c02cde36620f561254d1c

Contents?: true

Size: 752 Bytes

Versions: 8

Compression:

Stored size: 752 Bytes

Contents

<% current_user.applications.each do |app| %>

  <table>

    <thead>
      <tr>
        <th colspan="2"><%= _t(app) %></th>
      </tr>
    </thead>

    <% current_user.application(app).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

8 entries across 8 versions & 1 rubygems

Version Path
typus-3.0.2 app/views/admin/helpers/dashboard/_applications.html.erb
typus-3.0.1 app/views/admin/helpers/dashboard/_applications.html.erb
typus-3.0.0 app/views/admin/helpers/dashboard/_applications.html.erb
typus-1.0.0.pre13 app/views/admin/helpers/dashboard/_applications.html.erb
typus-1.0.0.pre12 app/views/admin/helpers/dashboard/_applications.html.erb
typus-1.0.0.pre11 app/views/admin/helpers/dashboard/_applications.html.erb
typus-1.0.0.pre10 app/views/admin/helpers/dashboard/_applications.html.erb
typus-1.0.0.pre9 app/views/admin/helpers/dashboard/_applications.html.erb