Skip to content

チケットの前,次をページネーションのようにボタンにしたい #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions app/views/issues/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,27 @@
<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,
<span class="previous">
<%= 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) %> |
:accesskey => accesskey(:previous) %>
</span>
<% 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> |
</span>
<% end %>
<%= link_to_if @next_issue_id,
<span class="next">
<%= 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>
</div>
<% end %>

Expand Down
19 changes: 12 additions & 7 deletions public/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -779,12 +779,15 @@ textarea#custom_field_default_value {width: 95%; resize:vertical}
input#content_comments {width: 99%}

span.pagination {margin-left:3px; color:#888; display:block;}
.pagination ul.pages {
.pagination ul.pages, .next-prev-links {
margin: 0 5px 0 0;
padding: 0;
display: inline;
}
.pagination ul.pages li {
div.next-prev-links.contextual span {
margin-left: -5px;
}
.pagination ul.pages li, .next-prev-links span {
display: inline-block;
padding: 0;
border: 1px solid #ddd;
Expand All @@ -795,14 +798,14 @@ span.pagination {margin-left:3px; color:#888; display:block;}
text-align: center;
}
.pagination ul.pages li a,
.pagination ul.pages li span {
.pagination ul.pages li span, .next-prev-links span a {
padding: 3px 8px;
}
.pagination ul.pages li:first-child {
.pagination ul.pages li:first-child, .next-prev-links span:first-child {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.pagination ul.pages li:last-child {
.pagination ul.pages li:last-child, .next-prev-links span:last-child {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
Expand All @@ -811,11 +814,13 @@ span.pagination {margin-left:3px; color:#888; display:block;}
background-color: #628DB6;
border-color: #628DB6;
}
.pagination ul.pages li.page:hover {
.pagination ul.pages li.page:hover, .next-prev-links span:hover {
background-color: #ddd;
}
.pagination ul.pages li.page a:hover,
.pagination ul.pages li.page a:active {
.pagination ul.pages li.page a:active,
.next-prev-links span a:hover,
.next-prev-links span a:active{
color: #169;
text-decoration: inherit;
}
Expand Down