Skip to content

Commit 2dd0539

Browse files
committed
added buttons to better navigate through failed tasks
1 parent df684d7 commit 2dd0539

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

lib/resque/server/public/style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ body { padding:0; margin:0; }
7878
#main ul.failed li dl dd.error pre { margin-top:3px; line-height:1.3;}
7979

8080
#main p.pagination { background:#efefef; padding:10px; overflow:hidden;}
81+
#main p.pagination a.separated-right { padding-right: 10px; }
82+
#main p.pagination a.separated-left { padding-left: 10px; }
8183
#main p.pagination a.less { float:left;}
8284
#main p.pagination a.more { float:right;}
8385

lib/resque/server/views/next_more.erb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<% if start - 20 >= 0 || start + 20 <= size %>
22
<p class='pagination'>
33
<% if start - 20 >= 0 %>
4-
<a href="<%= current_page %>?start=<%= start - 20 %>" class='less'>&laquo; less</a>
4+
&nbsp;<a href="<%= current_page %>?start=0" class='less separated-right'>&laquo;&laquo;</a>&nbsp;
5+
<% end %>
6+
<% if start - 20 >= 0 %>
7+
&nbsp;<a href="<%= current_page %>?start=<%= start - 20 %>" class='less'>&laquo; less</a>&nbsp;
58
<% end %>
69
<% if start + 20 <= size %>
7-
<a href="<%= current_page %>?start=<%= start + 20 %>" class='more'>more &raquo;</a>
10+
<% page = (size % 20 == 0 ? (size-20) : ((size) - (size % 20)) )%>
11+
&nbsp;<a href="<%= current_page %>?start=<%= page %>" class='more separated-left'>&raquo;&raquo;</a>
812
<% end %>
13+
<% if start + 20 <= size %>
14+
&nbsp;<a href="<%= current_page %>?start=<%= start + 20 %>" class='more'>more &raquo;</a>&nbsp;
15+
<% end %>
916
</p>
1017
<%end%>

0 commit comments

Comments
 (0)