From c3761095e75c47e32cf0e6827618239a0447e844 Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Wed, 22 Feb 2023 14:29:46 +0100 Subject: [PATCH] group order fix dancing quantity buttons --- app/views/group_orders/_form.html.haml | 18 +++++++++++------- app/views/group_orders/show.html.haml | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/views/group_orders/_form.html.haml b/app/views/group_orders/_form.html.haml index f6a31563..b61d601a 100644 --- a/app/views/group_orders/_form.html.haml +++ b/app/views/group_orders/_form.html.haml @@ -25,9 +25,12 @@ .alert.alert-error#balance-alert{style: ('display:none')} =t 'group_orders.errors.balance_alert' .row-fluid - .well.span3 - = render 'switch_order', current_order: @order - .well.span8 + .span2 + .well + = render 'switch_order', current_order: @order + .well + = render 'explanations' + .well.span9 %h2= @order.name %a(href='#tab1' data-toggle="collapse") =t '.details' @@ -82,10 +85,11 @@ %span{id: "missing_units_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:missing_units] %td.quantity - %input{id: "q_#{order_article.id}", name: "group_order[group_order_articles_attributes][#{order_article.id}][quantity]", type: "hidden", value: @ordering_data[:order_articles][order_article.id][:quantity], 'data-min' => (@ordering_data[:order_articles][order_article.id][:quantity] if @order.boxfill?), 'data-max' => (@ordering_data[:order_articles][order_article.id][:quantity]+@ordering_data[:order_articles][order_article.id][:missing_units] if @order.boxfill?)}/ - %span.used{id: "q_used_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:used_quantity] - + - %span.unused{id: "q_unused_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:quantity] - @ordering_data[:order_articles][order_article.id][:used_quantity] + .outer{style: "diyplay: inline-block; float: left; width: 50px;"} + %input{id: "q_#{order_article.id}", name: "group_order[group_order_articles_attributes][#{order_article.id}][quantity]", type: "hidden", value: @ordering_data[:order_articles][order_article.id][:quantity], 'data-min' => (@ordering_data[:order_articles][order_article.id][:quantity] if @order.boxfill?), 'data-max' => (@ordering_data[:order_articles][order_article.id][:quantity]+@ordering_data[:order_articles][order_article.id][:missing_units] if @order.boxfill?)}/ + %span.used{id: "q_used_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:used_quantity] + + + %span.unused{id: "q_unused_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:quantity] - @ordering_data[:order_articles][order_article.id][:used_quantity] .btn-group %a.btn.btn-ordering{'data-decrease_quantity' => order_article.id} %i.icon-minus diff --git a/app/views/group_orders/show.html.haml b/app/views/group_orders/show.html.haml index c82fbcdc..c2932025 100644 --- a/app/views/group_orders/show.html.haml +++ b/app/views/group_orders/show.html.haml @@ -8,9 +8,9 @@ .row-fluid - .well.span3 + .well.span2 = render 'switch_order', current_order: @order - .well.span8 + .well.span9 %h2= t '.articles.title' =render 'order_details'