diff --git a/app/views/group_orders/_switch_order.html.haml b/app/views/group_orders/_switch_order.html.haml index 76443524..9fbe15ee 100644 --- a/app/views/group_orders/_switch_order.html.haml +++ b/app/views/group_orders/_switch_order.html.haml @@ -1,9 +1,10 @@ -- orders = Order.open.started.reject{ |order| order == current_order } +- orders = Order.open.started - unless orders.empty? - %h2= t '.title' - %ul.unstyled + %ul.nav.nav-pills.nav-stacked + .nav-header= t '.title' - orders.each do |order| - %li - = link_to_ordering(order, 'data-confirm_switch_order' => true) - - if order.ends - = t '.remaining', remaining: time_ago_in_words(order.ends) + %li( class='#{ order == current_order ? "active" : ""}' + data-toggle='tooltip' + data-placement='left' + title='#{t('.remaining', remaining: time_ago_in_words(order.ends))}') + = link_to_ordering(order, 'data-confirm_switch_order' => true){ order.ends ? order.name : order.name } diff --git a/config/locales/en.yml b/config/locales/en.yml index 59e94385..53c2cfca 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1101,7 +1101,7 @@ en: sum: Sum title: Your order result for %{order} switch_order: - remaining: "%{remaining} remaining" + remaining: "%{remaining} until order closes" title: Current orders update: error_general: The order couldn’t be updated due to a bug.