Sha256: 4ea506385bd25f9800f4e50bac5f8707adaf25235d491ccd6f925c5973d5f09b

Contents?: true

Size: 812 Bytes

Versions: 8

Compression:

Stored size: 812 Bytes

Contents

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

  <dl class="grid grid-cols-1 gap-5 mt-5 sm:grid-cols-3">
    <%= render PandaCms::Admin::StatisticsComponent.new(metric: "Views Today", value: PandaCms::Visit.group_by_day(:visited_at, last: 1).count.values.first) %>
    <%= render PandaCms::Admin::StatisticsComponent.new(metric: "Views Last Week", value: PandaCms::Visit.group_by_week(:visited_at, last: 1).count.values.first) %>
    <%= render PandaCms::Admin::StatisticsComponent.new(metric: "Views Last Month", value: PandaCms::Visit.group_by_month(:visited_at, last: 1).count.values.first) %>
  </dl>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
panda_cms-0.5.7 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.5.6 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.5.5 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.5.4 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.5.3 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.5.2 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.5.1 app/views/panda_cms/admin/dashboard/show.html.erb
panda_cms-0.5.0 app/views/panda_cms/admin/dashboard/show.html.erb