Sha256: b342f2ab28ceed3dfbb20f26e46c6388b2c81e7855054ee3b191639eb431d030

Contents?: true

Size: 980 Bytes

Versions: 13

Compression:

Stored size: 980 Bytes

Contents

<%
  applications = admin_user.applications

  if params[:application]
    applications.reject! { |a| a.parameterize != params[:application] }
  end
%>

<div class="span3">
</div>

<div class="span9">

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

  <% if applications.any? %>
    <% applications.each do |app| %>

      <table class="table">

        <thead>
          <tr>
            <th><%= Typus::I18n.t(app) %></th>
          </tr>
        </thead>

        <% admin_user.application(app).map(&:constantize).each do |klass| %>
          <% unless klass.typus_options_for(:hide_from_dashboard) %>
            <tr>
              <td>
                <%= link_to klass.model_name.human(count: 2), :controller => "/admin/#{klass.to_resource}" %>
              </td>
            </tr>
          <% end %>
        <% end %>

      </table>

    <% end %>
  <% else %>
    <div class="notice">
      <%= Typus::I18n.t("No applications detected.") %>
    </div>
  <% end %>

</div>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
brainsome_typus-4.0.0.beta13 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta12 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta11 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta10 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta9 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta8 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta7 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta6 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta5 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta4 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta3 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta2 app/views/admin/dashboard/widgets/_default.html.erb
brainsome_typus-4.0.0.beta1 app/views/admin/dashboard/widgets/_default.html.erb