diff options
author | azul <azul@leap.se> | 2014-05-30 18:02:20 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2014-05-30 18:02:20 +0200 |
commit | 9f04e4c8e50f1dc5a7ff6f2e58974254731a6bc4 (patch) | |
tree | 84db71a6e52c47bc2f2f1aabce578ce367fcb0e8 /engines/support/app/helpers | |
parent | 568a5c243f0a0ef90807c96b19643ec341994bbb (diff) | |
parent | 9e3be686ff2751707369894382293924420830d0 (diff) |
Merge pull request #167 from azul/feature/i18n-for-ticket-system0.5.2-rc
Feature/i18n for ticket system
Diffstat (limited to 'engines/support/app/helpers')
-rw-r--r-- | engines/support/app/helpers/tickets_helper.rb | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/engines/support/app/helpers/tickets_helper.rb b/engines/support/app/helpers/tickets_helper.rb index 7af50d6..11b02e4 100644 --- a/engines/support/app/helpers/tickets_helper.rb +++ b/engines/support/app/helpers/tickets_helper.rb @@ -35,13 +35,7 @@ module TicketsHelper # def link_to_status(new_status) - 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 + label = t(:".#{new_status}", cascade: true) link_to label, auto_tickets_path(:open_status => new_status, :sort_order => search_order) end @@ -62,11 +56,7 @@ module TicketsHelper direction = 'desc' end - if order_field == 'updated' - label = t(:updated) - elsif order_field == 'created' - label = t(:created) - end + label = t(:".#{order_field}", cascade: true) link_to auto_tickets_path(:sort_order => order_field + '_at_' + direction, :open_status => search_status) do arrow + label |