Sha256: 363d251c2873f9b6a269b6205e2e0a1641c33b89844a0cf8862d66c16b715842

Contents?: true

Size: 924 Bytes

Versions: 61

Compression:

Stored size: 924 Bytes

Contents

<%
  @values         = []
  @page_total     = Lalala::Page::all.count
  @post_total     = Article::all.count rescue Post::all.count
  @assets_total   = "n/a"
  @user_total     = Lalala::AdminUser::all.count

  # fill array
  @values << ["page",@page_total, nil]
  @values << ["post",@post_total, "/lalala/articles/new"]
  @values << ["file",@assets_total, nil]
  @values << ["user",@user_total, "/lalala/admin_users/new"]

%>
<div class="mod-dashboard">

  <div class="stats count_<%= @values.length %>">
    <ul>
      <% @values.each do |title,val,link| %>
      <li>
        <div class="default">
          <p class="val"><%= val %></p>
          <p class="title"><%= title.pluralize %></p>
        </div>
        <% unless link.nil? %>
        <div class="hover">
          <a href="<%= link %>" class="button">New <%= title %></a>
        </div>
        <% end %>
      </li>
      <% end %>
    </ul>
  </div>

</div>

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
lalala-4.0.0.dev.313 test/dummy/app/views/admin/_stats.html.erb