summaryrefslogtreecommitdiff
path: root/engines/support/app/helpers/tickets_helper.rb
diff options
context:
space:
mode:
authorazul <azul@leap.se>2014-07-10 11:06:20 +0200
committerazul <azul@leap.se>2014-07-10 11:06:20 +0200
commitc9dd5a342f902b27aec73af24776025a03feda48 (patch)
tree83472ae6cb3bbab1479e585e90de1fad9f45382b /engines/support/app/helpers/tickets_helper.rb
parentdc740e4311101bf7297996788b25a99edafbe759 (diff)
parent7b368ac4825686458be38460d8a77f4e9e0139ef (diff)
Merge pull request #174 from azul/bugfix/admin-navigates-all-tickets
Admin navigates all tickets - fixes #5879
Diffstat (limited to 'engines/support/app/helpers/tickets_helper.rb')
-rw-r--r--engines/support/app/helpers/tickets_helper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/support/app/helpers/tickets_helper.rb b/engines/support/app/helpers/tickets_helper.rb
index 7db31dc..58b67ea 100644
--- a/engines/support/app/helpers/tickets_helper.rb
+++ b/engines/support/app/helpers/tickets_helper.rb
@@ -36,7 +36,8 @@ module TicketsHelper
def link_to_status(new_status)
label = ".#{new_status}"
- link_to_navigation label, auto_tickets_path(open_status: new_status, sort_order: search_order)
+ link_to_navigation label, auto_tickets_path(open_status: new_status),
+ active: search_status == new_status
end
def link_to_order(order_field)
@@ -45,11 +46,12 @@ module TicketsHelper
# for not-currently-filtered field link to descending direction
direction ||= 'desc'
label = ".#{order_field}"
- link_to_navigation label, auto_tickets_path(sort_order: order_field + '_at_' + direction, open_status: search_status),
+ link_to_navigation label,
+ auto_tickets_path(sort_order: order_field + '_at_' + direction),
+ active: search_order.start_with?(order_field),
icon: icon
end
-
def new_direction_for_order(order_field)
# return if we're not filtering by this field
return unless search_order.start_with?(order_field)