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 Aug 29, 2024
1 parent 9368c9e commit f8bc7e3
Show file tree
Hide file tree
Showing 2 changed files with 20 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>
12 changes: 12 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,8 @@ en:
recent_entries: "Recent diary entries"
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 @@ -612,6 +614,8 @@ en:
comment: Comment
older: "Older Comments"
newer: "Newer Comments"
oldest: "Oldest Comments"
newest: "Newest Comments"
new:
heading: Add a comment to the following diary entry discussion?
doorkeeper:
Expand Down Expand Up @@ -1491,6 +1495,8 @@ en:
resolved: Resolved
older: Older Issues
newer: Newer Issues
oldest: Oldest Issues
newest: Newest Issues
show:
title: "%{status} Issue #%{issue_id}"
reports:
Expand Down Expand Up @@ -2567,6 +2573,8 @@ en:
page:
older: "Older Traces"
newer: "Newer Traces"
oldest: "Oldest Traces"
newest: "Newest Traces"
destroy:
scheduled_for_deletion: "Trace scheduled for deletion"
make_public:
Expand Down Expand Up @@ -2892,6 +2900,8 @@ en:
page:
older: "Older Users"
newer: "Newer Users"
oldest: "Oldest Users"
newest: "Newest Users"
found_users:
one: "%{count} user found"
other: "%{count} users found"
Expand Down Expand Up @@ -3030,6 +3040,8 @@ en:
revoker_name: "Revoked by"
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 f8bc7e3

Please sign in to comment.