Skip to content

Commit

Permalink
Add oldest/newest links to shared pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Apr 17, 2024
1 parent 920c39d commit 434dd87
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/views/shared/_pagination.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<nav>
<ul class="pagination">
<%= pagination_item(newer_id && @params.merge(:before => nil, :after => nil)) do %>
<%= previous_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block", :count => 2 %>
<%= t :newest, :scope => translation_scope %>
<% end %>
<%= pagination_item(newer_id && @params.merge(:before => nil, :after => newer_id)) do %>
<%= previous_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block" %>
<%= t :newer, :scope => translation_scope %>
Expand All @@ -8,5 +12,9 @@
<%= t :older, :scope => translation_scope %>
<%= next_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block" %>
<% end %>
<%= pagination_item(older_id && @params.merge(:before => nil, :after => 0)) do %>
<%= t :oldest, :scope => translation_scope %>
<%= next_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block", :count => 2 %>
<% end %>
</ul>
</nav>
10 changes: 10 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ en:
pagination:
older: Older Entries
newer: Newer Entries
oldest: Oldest Entries
newest: Newest Entries
edit:
title: Edit Diary Entry
marker_text: Diary entry location
Expand Down Expand Up @@ -598,6 +600,8 @@ en:
comments_pagination:
older: "Older Comments"
newer: "Newer Comments"
oldest: "Oldest Comments"
newest: "Newest Comments"
subscribe:
heading: Subscribe to the following diary entry discussion?
button: Subscribe to discussion
Expand Down Expand Up @@ -2538,6 +2542,8 @@ en:
pagination:
older: "Older Traces"
newer: "Newer Traces"
oldest: "Oldest Traces"
newest: "Newest Traces"
trace:
pending: "PENDING"
count_points:
Expand Down Expand Up @@ -2853,6 +2859,8 @@ en:
pagination:
older: "Older Users"
newer: "Newer Users"
oldest: "Oldest Users"
newest: "Newest Users"
suspended:
title: Account Suspended
heading: Account Suspended
Expand Down Expand Up @@ -2997,6 +3005,8 @@ en:
pagination:
older: "Older Blocks"
newer: "Newer Blocks"
oldest: "Oldest Blocks"
newest: "Newest Blocks"
navigation:
all_blocks: "All Blocks"
blocks_on_me: "Blocks on Me"
Expand Down

0 comments on commit 434dd87

Please sign in to comment.