Commit 8626ec2685666c8f75cfeb16a2ed8c263659cc8d
Exists in
master
and in
1 other branch
Merge pull request #120 from boblail/show-sort
Indicate the column which is being used to sort problems
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
app/helpers/sort_helper.rb
@@ -7,7 +7,7 @@ module SortHelper | @@ -7,7 +7,7 @@ module SortHelper | ||
7 | order = (current && (@order == "asc")) ? "desc" : "asc" | 7 | order = (current && (@order == "asc")) ? "desc" : "asc" |
8 | url = request.path + "?sort=#{field}&order=#{order}" | 8 | url = request.path + "?sort=#{field}&order=#{order}" |
9 | options = {} | 9 | options = {} |
10 | - options.merge(:class => "current") if current | 10 | + options.merge!(:class => "current #{order}") if current |
11 | link_to(name, url, options) | 11 | link_to(name, url, options) |
12 | end | 12 | end |
13 | 13 |
public/stylesheets/application.css
@@ -820,3 +820,5 @@ table.errs tr td.message .inline_comment em.commenter { | @@ -820,3 +820,5 @@ table.errs tr td.message .inline_comment em.commenter { | ||
820 | color: #777; | 820 | color: #777; |
821 | } | 821 | } |
822 | 822 | ||
823 | +.current.asc:after { content: ' ↑'; } | ||
824 | +.current.desc:after { content: ' ↓'; } | ||
823 | \ No newline at end of file | 825 | \ No newline at end of file |