add most viewed posts page

This commit is contained in:
r888888888
2017-11-10 16:21:01 -08:00
parent 6c4eb62957
commit 8b1fca4662
8 changed files with 109 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
<div id="c-explore-posts">
<div id="a-popular">
<h1>Most Viewed: <%= @post_set.presenter.date %></h1>
<%= @post_set.presenter.nav_links(self) %>
<%= render "posts/partials/common/inline_blacklist" %>
<%= @post_set.presenter.post_previews_html(self) %>
</div>
</div>
<%= render "posts/partials/common/secondary_links" %>
<% content_for(:page_title) do %>
Most Viewed - <%= Danbooru.config.app_name %>
<% end %>
<% content_for(:html_header) do %>
<meta name="description" content="The most viewed posts per day">
<% end %>

View File

@@ -12,6 +12,8 @@
<li><%= link_to("Appeals", post_appeals_path) %></li>
<li><%= link_to("Flags", post_flags_path) %></li>
<li><%= link_to("Replacements", post_replacements_path) %></li>
<li><%= link_to("Popular", popular_explore_posts_path) %></li>
<li><%= link_to("Most Viewed", viewed_explore_posts_path) %></li>
<% if CurrentUser.can_approve_posts? %>
<li><%= link_to("Moderate", moderator_post_queue_path) %></li>
<% end %>