Sha256: fe3634d49e1be3ccc271ef29e4f4c7b60305fccbe16454cdd5f43ef37c47d236

Contents?: true

Size: 733 Bytes

Versions: 8

Compression:

Stored size: 733 Bytes

Contents

<!-- List of all available models -->

<h2><%= Typus::I18n.t("Site Administration") %></h2>

<table>

  <thead>
    <tr>
      <th><%= Typus::I18n.t("Model name") %></th>
      <th><%= Typus::I18n.t("Records") %></th>
      <th></th>
    </tr>
  </thead>

  <% admin_user.models.map { |i| i.constantize }.each do |klass| %>
    <tr class="<%= cycle("even", "odd") %>">
      <td><%= link_to klass.model_name.human.pluralize, :controller => "/admin/#{klass.to_resource}" %></td>
      <td width="30px" align="right"><%= klass.count %></td>
      <td width="80px" align="right">
        <%= link_to Typus::I18n.t("Add New"), :controller => "/admin/#{klass.to_resource}", :action => 'new' %>
      </td>
    </tr>
  <% end %>

</table>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
typus-3.1.2 app/views/admin/dashboard/widgets/_models_extended.html.erb
typus-3.1.1 app/views/admin/dashboard/widgets/_models_extended.html.erb
typus-3.1.0 app/views/admin/dashboard/widgets/_models_extended.html.erb
typus-3.1.0.rc19 app/views/admin/dashboard/widgets/_models_extended.html.erb
typus-3.1.0.rc18 app/views/admin/dashboard/widgets/_models_extended.html.erb
typus-3.1.0.rc17 app/views/admin/dashboard/widgets/_models_extended.html.erb
typus-3.1.0.rc16 app/views/admin/dashboard/widgets/_models_extended.html.erb
typus-3.1.0.rc15 app/views/admin/dashboard/widgets/_models_extended.html.erb