Files
danbooru/app/views/explore/posts/popular.html.erb
evazion e8590afa6d popular posts: fix date range handling.
* Fix the next button for the weekly timescale to jump to the next week,
  not the next day.
* Show the start and end dates for the weekly timescale.
* Use `Time.zone.today` instead of `Date.today` to respect the user's
  timezone setting.
2020-02-23 17:26:08 -06:00

31 lines
974 B
Plaintext

<% page_title "Popular Posts" %>
<% meta_description "The most popular posts per #{@scale}" %>
<%= render "posts/partials/common/secondary_links" %>
<div id="c-explore-posts">
<div id="a-popular">
<h1>
Popular:
<% if @scale == "day" %>
<%= @date.strftime("%B %d, %Y") %>
<% elsif @scale == "week" %>
<%= @min_date.strftime("%B %d, %Y") %> - <%= @max_date.strftime("%B %d, %Y") %>
<% elsif @scale == "month" %>
<%= @date.strftime("%B %Y") %>
<% end %>
</h1>
<p id="popular-nav-links">
<%= render "explore/posts/nav_links", date: @date, selected_scale: @scale, scale: "day" %>
<%= render "explore/posts/nav_links", date: @date, selected_scale: @scale, scale: "week" %>
<%= render "explore/posts/nav_links", date: @date, selected_scale: @scale, scale: "month" %>
</p>
<%= render "posts/partials/common/inline_blacklist" %>
<%= post_previews_html(@posts) %>
</div>
</div>