diff options
author | elijah <elijah@riseup.net> | 2013-06-17 01:27:01 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-06-17 01:27:01 -0700 |
commit | 8550dcb0096017f94f855cad75dc61da63d92970 (patch) | |
tree | 3eb3bd07d06de1f58db5851cfd21dff11a4db159 /help/app/helpers | |
parent | 8b7621793fe5f8fa55c955045a71821c53d4759f (diff) |
new ui - ticket navigation
Diffstat (limited to 'help/app/helpers')
-rw-r--r-- | help/app/helpers/tickets_helper.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/help/app/helpers/tickets_helper.rb b/help/app/helpers/tickets_helper.rb index bd2c069..8b4ff71 100644 --- a/help/app/helpers/tickets_helper.rb +++ b/help/app/helpers/tickets_helper.rb @@ -1,7 +1,7 @@ module TicketsHelper def status - params[:open_status] || 'open' + params[:open_status] end def admin @@ -14,8 +14,14 @@ module TicketsHelper end def link_to_status(new_status) - label = new_status + ' issues' - link_to label, :open_status => new_status, :admin_status => admin, :sort_order => order + if new_status == "open" + label = t(:open_tickets) + elsif new_status == "closed" + label = t(:closed_tickets) + elsif new_status == "all" + label = t(:all_tickets) + end + link_to label, tickets_path(:open_status => new_status, :admin_status => admin, :sort_order => order) end def link_to_order(order_field) @@ -35,8 +41,14 @@ module TicketsHelper direction = 'desc' end + if order_field == 'updated' + label = t(:updated) + elsif order_field == 'created' + label = t(:created) + end + link_to :sort_order => order_field + '_at_' + direction, :open_status => status, :admin_status => admin do - arrow + order_field + ' at' + arrow + label end end |