From a847d86121c4f09b76dbeaaab927faad6797ca9e Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Mon, 20 Feb 2023 22:32:07 +0100 Subject: [PATCH] group order make order details collapse --- app/views/group_orders/_form.html.haml | 59 +++++++++++++------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/app/views/group_orders/_form.html.haml b/app/views/group_orders/_form.html.haml index 9fe446b3..e462cc27 100644 --- a/app/views/group_orders/_form.html.haml +++ b/app/views/group_orders/_form.html.haml @@ -23,37 +23,38 @@ - title t('.title'), false .row-fluid - .well.pull-left + .well.span9 %h2= @order.name - %dl.dl-horizontal - - unless @order.note.blank? - %dt= heading_helper Order, :note - %dd= @order.note - %dt= heading_helper Order, :created_by - %dd= show_user_link(@order.created_by) - %dt= heading_helper Order, :ends - %dd= format_time(@order.ends) - %dt= heading_helper Order, :pickup - %dd= format_date(@order.pickup) - - unless @order.stockit? or @order.supplier.min_order_quantity.blank? - %dt= heading_helper Supplier, :min_order_quantity, short: true - %dd= @order.supplier.min_order_quantity - %dt= t '.sum_amount' - %dd= number_to_currency @order.sum - - unless @group_order.new_record? - %dt= heading_helper GroupOrder, :updated_by - %dd - = show_user(@group_order.updated_by) - (#{format_time(@group_order.updated_on)}) - %dt= heading_helper Ordergroup, :account_balance - %dd= number_to_currency(@ordering_data[:account_balance]) - - unless FoodsoftConfig[:charge_members_manually] - %dt= heading_helper Ordergroup, :available_funds - %dd= number_to_currency(@ordering_data[:available_funds]) - - .well.pull-right + %a(href='#tab1' data-toggle="collapse") + Show Details + #tab1.collapse + %dl.dl-horizontal + - unless @order.note.blank? + %dt= heading_helper Order, :note + %dd= @order.note + %dt= heading_helper Order, :created_by + %dd= show_user_link(@order.created_by) + %dt= heading_helper Order, :ends + %dd= format_time(@order.ends) + %dt= heading_helper Order, :pickup + %dd= format_date(@order.pickup) + - unless @order.stockit? or @order.supplier.min_order_quantity.blank? + %dt= heading_helper Supplier, :min_order_quantity, short: true + %dd= @order.supplier.min_order_quantity + %dt= t '.sum_amount' + %dd= number_to_currency @order.sum + - unless @group_order.new_record? + %dt= heading_helper GroupOrder, :updated_by + %dd + = show_user(@group_order.updated_by) + (#{format_time(@group_order.updated_on)}) + %dt= heading_helper Ordergroup, :account_balance + %dd= number_to_currency(@ordering_data[:account_balance]) + - unless FoodsoftConfig[:charge_members_manually] + %dt= heading_helper Ordergroup, :available_funds + %dd= number_to_currency(@ordering_data[:available_funds]) + .well.span3 = render 'switch_order', current_order: @order - .row-fluid .well.clear .form-search