mirror of
https://github.com/redmine/redmine.git
synced 2026-04-04 11:39:36 +02:00
Align issue previous/next link styling with pagination buttons (#43885).
Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@24543 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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;}
|
||||
|
||||
@@ -8,23 +8,37 @@
|
||||
<div class="<%= @issue.css_classes %> details">
|
||||
<% if @prev_issue_id || @next_issue_id %>
|
||||
<div class="next-prev-links contextual">
|
||||
<%= 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 %>
|
||||
<span class="position">
|
||||
<%= link_to_if @query_path,
|
||||
l(:label_item_position, :position => @issue_position, :count => @issue_count),
|
||||
@query_path %>
|
||||
</span> |
|
||||
<% 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) %>
|
||||
<span class="pagination">
|
||||
<ul class="pages">
|
||||
<li class="<%= @prev_issue_id ? 'previous page' : 'previous' %>">
|
||||
<% if @prev_issue_id %>
|
||||
<%= link_to "\xc2\xab #{l(:label_previous)}",
|
||||
issue_path(@prev_issue_id),
|
||||
:title => "##{@prev_issue_id}",
|
||||
:accesskey => accesskey(:previous) %>
|
||||
<% else %>
|
||||
<%= content_tag(:span, "\xc2\xab #{l(:label_previous)}") %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% if @issue_position && @issue_count %>
|
||||
<li class="page position">
|
||||
<%= link_to_if @query_path,
|
||||
l(:label_item_position, :position => @issue_position, :count => @issue_count),
|
||||
@query_path %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="<%= @next_issue_id ? 'next page' : 'next' %>">
|
||||
<% if @next_issue_id %>
|
||||
<%= link_to "#{l(:label_next)} \xc2\xbb",
|
||||
issue_path(@next_issue_id),
|
||||
:title => "##{@next_issue_id}",
|
||||
:accesskey => accesskey(:next) %>
|
||||
<% else %>
|
||||
<%= content_tag(:span, "#{l(:label_next)} \xc2\xbb") %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user