Skip to content

Commit 4a6c3ac

Browse files
ishikawa999Redmine Patch Meetup
authored andcommitted
Change .next-prev-links spanをボタン化
1 parent f3dba0a commit 4a6c3ac

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

app/views/issues/show.html.erb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,27 @@
99
<div class="<%= @issue.css_classes %> details">
1010
<% if @prev_issue_id || @next_issue_id %>
1111
<div class="next-prev-links contextual">
12-
<%= link_to_if @prev_issue_id,
12+
<span class="previous">
13+
<%= link_to_if @prev_issue_id,
1314
"\xc2\xab #{l(:label_previous)}",
1415
(@prev_issue_id ? issue_path(@prev_issue_id) : nil),
1516
:title => "##{@prev_issue_id}",
16-
:accesskey => accesskey(:previous) %> |
17+
:accesskey => accesskey(:previous) %>
18+
</span>
1719
<% if @issue_position && @issue_count %>
1820
<span class="position">
1921
<%= link_to_if @query_path,
2022
l(:label_item_position, :position => @issue_position, :count => @issue_count),
2123
@query_path %>
22-
</span> |
24+
</span>
2325
<% end %>
24-
<%= link_to_if @next_issue_id,
26+
<span class="next">
27+
<%= link_to_if @next_issue_id,
2528
"#{l(:label_next)} \xc2\xbb",
2629
(@next_issue_id ? issue_path(@next_issue_id) : nil),
2730
:title => "##{@next_issue_id}",
2831
:accesskey => accesskey(:next) %>
32+
</span>
2933
</div>
3034
<% end %>
3135

public/stylesheets/application.css

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -777,12 +777,15 @@ textarea#custom_field_default_value {width: 95%; resize:vertical}
777777
input#content_comments {width: 99%}
778778

779779
span.pagination {margin-left:3px; color:#888; display:block;}
780-
.pagination ul.pages {
780+
.pagination ul.pages, .next-prev-links {
781781
margin: 0 5px 0 0;
782782
padding: 0;
783783
display: inline;
784784
}
785-
.pagination ul.pages li {
785+
div.next-prev-links.contextual span {
786+
margin-left: -5px;
787+
}
788+
.pagination ul.pages li, .next-prev-links span {
786789
display: inline-block;
787790
padding: 0;
788791
border: 1px solid #ddd;
@@ -793,14 +796,14 @@ span.pagination {margin-left:3px; color:#888; display:block;}
793796
text-align: center;
794797
}
795798
.pagination ul.pages li a,
796-
.pagination ul.pages li span {
799+
.pagination ul.pages li span, .next-prev-links span a {
797800
padding: 3px 8px;
798801
}
799-
.pagination ul.pages li:first-child {
802+
.pagination ul.pages li:first-child, .next-prev-links span:first-child {
800803
border-top-left-radius: 4px;
801804
border-bottom-left-radius: 4px;
802805
}
803-
.pagination ul.pages li:last-child {
806+
.pagination ul.pages li:last-child, .next-prev-links span:last-child {
804807
border-top-right-radius: 4px;
805808
border-bottom-right-radius: 4px;
806809
}
@@ -809,11 +812,13 @@ span.pagination {margin-left:3px; color:#888; display:block;}
809812
background-color: #628DB6;
810813
border-color: #628DB6;
811814
}
812-
.pagination ul.pages li.page:hover {
815+
.pagination ul.pages li.page:hover, .next-prev-links span:hover {
813816
background-color: #ddd;
814817
}
815818
.pagination ul.pages li.page a:hover,
816-
.pagination ul.pages li.page a:active {
819+
.pagination ul.pages li.page a:active,
820+
.next-prev-links span a:hover,
821+
.next-prev-links span a:active{
817822
color: #169;
818823
text-decoration: inherit;
819824
}

0 commit comments

Comments
 (0)