group order make 'current orders' more obvious

This commit is contained in:
Philipp Rothmann 2023-02-20 22:33:42 +01:00
parent ae09bbaced
commit 5e9bd17606
2 changed files with 9 additions and 8 deletions

View file

@ -1,9 +1,10 @@
- orders = Order.open.started.reject{ |order| order == current_order } - orders = Order.open.started
- unless orders.empty? - unless orders.empty?
%h2= t '.title' %ul.nav.nav-pills.nav-stacked
%ul.unstyled .nav-header= t '.title'
- orders.each do |order| - orders.each do |order|
%li %li( class='#{ order == current_order ? "active" : ""}'
= link_to_ordering(order, 'data-confirm_switch_order' => true) data-toggle='tooltip'
- if order.ends data-placement='left'
= t '.remaining', remaining: time_ago_in_words(order.ends) 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 }

View file

@ -1101,7 +1101,7 @@ en:
sum: Sum sum: Sum
title: Your order result for %{order} title: Your order result for %{order}
switch_order: switch_order:
remaining: "%{remaining} remaining" remaining: "%{remaining} until order closes"
title: Current orders title: Current orders
update: update:
error_general: The order couldnt be updated due to a bug. error_general: The order couldnt be updated due to a bug.