From 5e9ffa7cb1c6ac0d5b8039ae84ddf4e5a2a02bb4 Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Sun, 8 Nov 2009 19:26:28 +0100 Subject: [PATCH] Orderfooter design improvements. --- app/views/ordering/order.rhtml | 38 +++++++++++++++---------------- public/stylesheets/main.css | 8 ++++++- public/stylesheets/print.css | 8 ++++++- public/stylesheets/sass/main.sass | 8 ++++++- 4 files changed, 39 insertions(+), 23 deletions(-) diff --git a/app/views/ordering/order.rhtml b/app/views/ordering/order.rhtml index 839e4296..af5e332a 100644 --- a/app/views/ordering/order.rhtml +++ b/app/views/ordering/order.rhtml @@ -45,11 +45,11 @@ <%=h order_article.article.origin %> <%= number_to_currency(@price[i]) %> <%= if @order.stockit? - order_article.article.quantity_available - else - missing_units = @unit[i] - (((@quantity[i] + @others_quantity[i]) % @unit[i]) + @tolerance[i] + @others_tolerance[i]) - missing_units < 0 ? 0 : missing_units - end%> + order_article.article.quantity_available + else + missing_units = @unit[i] - (((@quantity[i] + @others_quantity[i]) % @unit[i]) + @tolerance[i] + @others_tolerance[i]) + missing_units < 0 ? 0 : missing_units + end%> " value="<%= @quantity[i] %>" size="2" /> <%= @used_quantity[i] %> + @@ -58,30 +58,28 @@ <%= button_to_function('-', "decreaseQuantity(#{i})") %> <% if not @order.stockit? -%> - - " value="<%= @tolerance[i] %>" size="2" /> - <% if (@unit[i] > 1) -%> - <%= @used_tolerance[i] %> + - <%= @tolerance[i] - @used_tolerance[i] %> - <%= button_to_function('+', "increaseTolerance(#{i})") %> - <%= button_to_function('-', "decreaseTolerance(#{i})") %> - <% end -%> - + + " value="<%= @tolerance[i] %>" size="2" /> + <% if (@unit[i] > 1) -%> + <%= @used_tolerance[i] %> + + <%= @tolerance[i] - @used_tolerance[i] %> + <%= button_to_function('+', "increaseTolerance(#{i})") %> + <%= button_to_function('-', "decreaseTolerance(#{i})") %> + <% end -%> + <% end %> <%= number_to_currency(article_total, :unit => "") %> diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 907ddbc0..fad7e99a 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -440,15 +440,21 @@ table#order { background-color: red; } #order-footer { + min-width: 975px; right: 15px; left: 15px; } .article-info { z-index: 2; - width: 50em; + width: 45em; height: 8em; border: none; left: 30px; } + .article-info h3 { + text-align: center; + margin: 0; + margin-bottom: 5px; + width: 100%; } #newComment { margin: 1em; } diff --git a/public/stylesheets/print.css b/public/stylesheets/print.css index bab3639f..977a2a35 100644 --- a/public/stylesheets/print.css +++ b/public/stylesheets/print.css @@ -440,15 +440,21 @@ table#order { background-color: red; } #order-footer { + min-width: 975px; right: 15px; left: 15px; } .article-info { z-index: 2; - width: 50em; + width: 45em; height: 8em; border: none; left: 30px; } + .article-info h3 { + text-align: center; + margin: 0; + margin-bottom: 5px; + width: 100%; } #newComment { margin: 1em; } diff --git a/public/stylesheets/sass/main.sass b/public/stylesheets/sass/main.sass index c03ece96..52252cc0 100644 --- a/public/stylesheets/sass/main.sass +++ b/public/stylesheets/sass/main.sass @@ -477,14 +477,20 @@ table#order input:disabled background-color: red #order-footer + min-width: 975px right: 15px left: 15px .article-info z-index: 2 - width: 50em + width: 45em height: 8em border: none left: 30px + h3 + text-align: center + margin: 0 + margin-bottom: 5px + width: 100% // ********* Comments #newComment :margin 1em