Sha256: ef6fdfa860bec66690851428846910ec41d4b293f4be99a20f3eb2e2674d0a74

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

<%= render PandaCms::Admin::ContainerComponent.new do |component| %>
  <% component.with_heading(text: "Dashboard", level: 1) do |heading| %>
    <%# heading.with_button(action: :add, text: "Add Menu", link: new_admin_menu_path) %>
  <% end %>

  <div class="">
    <dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
      <div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
        <dt class="truncate text-sm font-medium text-gray-500">Page Views Today</dt>
        <dd class="mt-1 text-3xl font-medium tracking-tight text-gray-900"><%= PandaCms::Visit.group_by_day(:created_at, last: 1).count.values.first %></dd>
      </div>
      <div class="overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6">
        <dt class="truncate text-sm font-medium text-gray-500">Page Views In Last Week</dt>
        <dd class="mt-1 text-3xl font-medium tracking-tight text-gray-900"><%= PandaCms::Visit.group_by_week(:created_at, last: 1).count.values.first %></dd>
      </div>
    </dl>
  </div>

<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
panda_cms-0.3.12 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.3.11 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.3.10 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.3.9 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.3.8 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.3.7 app/views/panda_cms/admin/dashboard/show.html.erb