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?
%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 }

View file

@ -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 couldnt be updated due to a bug.