diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index e2aba97a7..6de3650ad 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -774,7 +774,9 @@ div.issue div.subject>div>p { margin-block-start: 0.5em; }
div.issue div.subject h3 {margin-block: 0 0.1em; margin-inline: 0;}
div.issue p.author {margin-block-start: 0.5em; font-size: 93%}
div.issue span.private, div.journal span.private {font-size: 60%;}
-div.issue .next-prev-links {color:var(--oc-gray-6);}
+div.issue .next-prev-links {color: var(--oc-gray-6); margin-block: 1px 0;}
+div.issue .next-prev-links .pagination ul.pages {margin-inline: 0; display: inline-flex;}
+div.issue .next-prev-links .pagination ul.pages li {margin-block-end: 0;}
div.issue .attributes {margin-block-start: 2em;}
div.issue .attributes .attribute {padding-inline-start: 180px; clear: inline-start; min-block-size: 1.8em;}
div.issue .attributes .attribute .label {inline-size: 170px; margin-inline-start: -180px; font-weight: bold; float: inline-start; overflow: clip visible; text-overflow: ellipsis;}
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 94ab1162a..bc957b3ce 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -8,23 +8,37 @@
<% if @prev_issue_id || @next_issue_id %>
- <%= link_to_if @prev_issue_id,
- "\xc2\xab #{l(:label_previous)}",
- (@prev_issue_id ? issue_path(@prev_issue_id) : nil),
- :title => "##{@prev_issue_id}",
- :accesskey => accesskey(:previous) %> |
- <% if @issue_position && @issue_count %>
-
- <%= link_to_if @query_path,
- l(:label_item_position, :position => @issue_position, :count => @issue_count),
- @query_path %>
- |
- <% end %>
- <%= link_to_if @next_issue_id,
- "#{l(:label_next)} \xc2\xbb",
- (@next_issue_id ? issue_path(@next_issue_id) : nil),
- :title => "##{@next_issue_id}",
- :accesskey => accesskey(:next) %>
+
<% end %>
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 42db408af..3ea54226d 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -2627,7 +2627,7 @@ class IssuesControllerTest < Redmine::ControllerTest
assert_select 'div.next-prev-links' do
assert_select 'a[href="/issues/2"]', :text => /Previous/
assert_select 'a[href="/issues/5"]', :text => /Next/
- assert_select 'span.position', :text => "3 of #{count}"
+ assert_select 'li.page.position', :text => "3 of #{count}"
end
end
@@ -2704,7 +2704,12 @@ class IssuesControllerTest < Redmine::ControllerTest
end
assert_response :success
assert_select 'div.next-prev-links' do
- assert_select 'a', :text => /Previous/, :count => 0
+ # "Previous" button for the first issue does not have the "page" class and a link
+ assert_select 'span.pagination ul.pages li.previous', 1
+ assert_select 'span.pagination ul.pages li.previous.page', 0
+ assert_select 'li.previous span', :text => /Previous/
+ assert_select 'li.previous a', :count => 0
+ assert_select 'span.pagination ul.pages li.next.page', 1
assert_select 'a[href="/issues/2"]', :text => /Next/
end
end
@@ -2749,7 +2754,7 @@ class IssuesControllerTest < Redmine::ControllerTest
assert_select 'div.next-prev-links' do
assert_select 'a[href="/issues/7"]', text: /Previous/
assert_select 'a[href="/issues/9"]', text: /Next/
- assert_select 'span.position', text: "7 of 10"
+ assert_select 'li.page.position', text: "7 of 10"
end
end
diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb
index d0763091e..c321f9717 100644
--- a/test/integration/issues_test.rb
+++ b/test/integration/issues_test.rb
@@ -205,7 +205,7 @@ class IssuesTest < Redmine::IntegrationTest
get '/issues/5'
assert_response :success
- assert_select '.next-prev-links .position', :text => '5 of 6'
+ assert_select '.next-prev-links .pagination .page.position', :text => '5 of 6'
end
end
@@ -217,8 +217,8 @@ class IssuesTest < Redmine::IntegrationTest
get '/issues/5'
assert_response :success
- assert_select '.next-prev-links .position', :text => '3 of 5'
- assert_select '.next-prev-links .position a[href^=?]', '/projects/ecookbook/issues?'
+ assert_select '.next-prev-links .pagination .page.position', :text => '3 of 5'
+ assert_select '.next-prev-links .pagination .page.position a[href^=?]', '/projects/ecookbook/issues?'
end
end
@@ -236,7 +236,7 @@ class IssuesTest < Redmine::IntegrationTest
get '/issues/5'
assert_response :success
- assert_select '.next-prev-links .position', :text => '6 of 8'
+ assert_select '.next-prev-links .pagination .page.position', :text => '6 of 8'
end
end