summaryrefslogtreecommitdiff
path: root/engines/support/app/views/tickets/_tabs.html.haml
diff options
context:
space:
mode:
authorazul <azul@leap.se>2014-05-30 18:02:20 +0200
committerazul <azul@leap.se>2014-05-30 18:02:20 +0200
commit9f04e4c8e50f1dc5a7ff6f2e58974254731a6bc4 (patch)
tree84db71a6e52c47bc2f2f1aabce578ce367fcb0e8 /engines/support/app/views/tickets/_tabs.html.haml
parent568a5c243f0a0ef90807c96b19643ec341994bbb (diff)
parent9e3be686ff2751707369894382293924420830d0 (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/views/tickets/_tabs.html.haml')
-rw-r--r--engines/support/app/views/tickets/_tabs.html.haml18
1 files changed, 7 insertions, 11 deletions
diff --git a/engines/support/app/views/tickets/_tabs.html.haml b/engines/support/app/views/tickets/_tabs.html.haml
index 445a909..7872bb5 100644
--- a/engines/support/app/views/tickets/_tabs.html.haml
+++ b/engines/support/app/views/tickets/_tabs.html.haml
@@ -3,21 +3,17 @@
-#
- unless action?(:new) or action?(:create)
%ul.nav.nav-pills.pull-right.slim
- %li{:class=> ("active" if search_order.start_with? 'created_at')}
- = link_to_order('created')
- %li{:class=> ("active" if search_order.start_with? 'updated_at')}
- = link_to_order('updated')
+ - %w(created updated).each do |order|
+ %li{:class=> ("active" if search_order.start_with? order)}
+ = link_to_order(order)
-#
-# STATUS FILTER TABS
-#
%ul.nav.nav-tabs
- if logged_in?
- %li{:class => ("active" if search_status == 'open')}
- = link_to_status 'open'
- %li{:class => ("active" if search_status == 'closed')}
- = link_to_status 'closed'
- %li{:class => ("active" if search_status == 'all')}
- = link_to_status 'all'
+ - %w(open closed all).each do |status|
+ %li{:class => ("active" if search_status == status)}
+ = link_to_status status
%li{:class => ("active" if action?(:new) || action?(:create))}
- = link_to icon(:plus, :black) + t(:new_ticket), auto_new_ticket_path
+ = link_to icon(:plus, :black) + t(".new", cascade: true), auto_new_ticket_path