Orderfooter design improvements.

This commit is contained in:
Benjamin Meichsner 2009-11-08 19:26:28 +01:00
parent b8e336b9e8
commit 5e9ffa7cb1
4 changed files with 39 additions and 23 deletions

View File

@ -45,11 +45,11 @@
<td><%=h order_article.article.origin %></td> <td><%=h order_article.article.origin %></td>
<td><%= number_to_currency(@price[i]) %></td> <td><%= number_to_currency(@price[i]) %></td>
<td><span id="missing_units_<%= i %>"><%= if @order.stockit? <td><span id="missing_units_<%= i %>"><%= if @order.stockit?
order_article.article.quantity_available order_article.article.quantity_available
else else
missing_units = @unit[i] - (((@quantity[i] + @others_quantity[i]) % @unit[i]) + @tolerance[i] + @others_tolerance[i]) missing_units = @unit[i] - (((@quantity[i] + @others_quantity[i]) % @unit[i]) + @tolerance[i] + @others_tolerance[i])
missing_units < 0 ? 0 : missing_units missing_units < 0 ? 0 : missing_units
end%></span></td> end%></span></td>
<td class="quantity"> <td class="quantity">
<input type="hidden" id="q_<%= i %>" name="<%= "ordered[#{order_article.id}][quantity]" %>" value="<%= @quantity[i] %>" size="2" /> <input type="hidden" id="q_<%= i %>" name="<%= "ordered[#{order_article.id}][quantity]" %>" value="<%= @quantity[i] %>" size="2" />
<span id="q_used_<%= i %>" class="used"><%= @used_quantity[i] %></span> + <span id="q_used_<%= i %>" class="used"><%= @used_quantity[i] %></span> +
@ -58,30 +58,28 @@
<%= button_to_function('-', "decreaseQuantity(#{i})") %> <%= button_to_function('-', "decreaseQuantity(#{i})") %>
</td> </td>
<% if not @order.stockit? -%> <% if not @order.stockit? -%>
<td class="tolerance"> <td class="tolerance">
<input type="hidden" id="t_<%= i %>" name="<%= "ordered[#{order_article.id}][tolerance]" %>" value="<%= @tolerance[i] %>" size="2" /> <input type="hidden" id="t_<%= i %>" name="<%= "ordered[#{order_article.id}][tolerance]" %>" value="<%= @tolerance[i] %>" size="2" />
<% if (@unit[i] > 1) -%> <% if (@unit[i] > 1) -%>
<span id="t_used_<%= i %>" class="used"><%= @used_tolerance[i] %></span> + <span id="t_used_<%= i %>" class="used"><%= @used_tolerance[i] %></span> +
<span id="t_unused_<%= i %>" class="unused"><%= @tolerance[i] - @used_tolerance[i] %></span> <span id="t_unused_<%= i %>" class="unused"><%= @tolerance[i] - @used_tolerance[i] %></span>
<%= button_to_function('+', "increaseTolerance(#{i})") %> <%= button_to_function('+', "increaseTolerance(#{i})") %>
<%= button_to_function('-', "decreaseTolerance(#{i})") %> <%= button_to_function('-', "decreaseTolerance(#{i})") %>
<% end -%> <% end -%>
</td> </td>
<% end %> <% end %>
<td id="td_price_<%= i %>" style="text-align:right; padding-right:10px; width:4em"><span id="price_<%= i %>_display"><%= number_to_currency(article_total, :unit => "") %></span> € <td id="td_price_<%= i %>" style="text-align:right; padding-right:10px; width:4em"><span id="price_<%= i %>_display"><%= number_to_currency(article_total, :unit => "") %></span> €
<div class="article-info" id="article-info_<%= order_article.id %>" style="display:none"> <div class="article-info" id="article-info_<%= order_article.id %>" style="display:none">
<h3><%= order_article.article.name -%></h3>
<div class="right"> <div class="right">
Volle Gebinde: <span id="units_<%= i %>"><%= order_article.units_to_order %></span><br/> Volle Gebinde: <span id="units_<%= i %>"><%= order_article.units_to_order %></span><br/>
Gesamt-Einheiten: <span id="q_total_<%= i %>"><%= @quantity[i] + @others_quantity[i] %></span><br/> Gesamt-Einheiten: <span id="q_total_<%= i %>"><%= @quantity[i] + @others_quantity[i] %></span><br/>
Gesamt-Toleranz: <span id="t_total_<%= i %>"><%= @tolerance[i] + @others_tolerance[i] %></span><br/> Gesamt-Toleranz: <span id="t_total_<%= i %>"><%= @tolerance[i] + @others_tolerance[i] %></span><br/>
</div> </div>
<div class="left"> <div class="left">
<b><%= order_article.article.name -%></b> Hersteller: <%= order_article.article.manufacturer -%><br />
<p> Gebinde: <%= @order.stockit? ? order_article.article.quantity_available : @unit[i] %> * <%=h order_article.article.unit %><br/>
Hersteller: <%= order_article.article.manufacturer -%><br /> Notiz: <%= order_article.article.note -%><br />
Gebinde: <%= @order.stockit? ? order_article.article.quantity_available : @unit[i] %> * <%=h order_article.article.unit %><br/>
Notiz: <%= order_article.article.note -%><br />
</p>
</div> </div>
</div> </div>
</td> </td>

View File

@ -440,15 +440,21 @@ table#order {
background-color: red; } background-color: red; }
#order-footer { #order-footer {
min-width: 975px;
right: 15px; right: 15px;
left: 15px; } left: 15px; }
.article-info { .article-info {
z-index: 2; z-index: 2;
width: 50em; width: 45em;
height: 8em; height: 8em;
border: none; border: none;
left: 30px; } left: 30px; }
.article-info h3 {
text-align: center;
margin: 0;
margin-bottom: 5px;
width: 100%; }
#newComment { #newComment {
margin: 1em; } margin: 1em; }

View File

@ -440,15 +440,21 @@ table#order {
background-color: red; } background-color: red; }
#order-footer { #order-footer {
min-width: 975px;
right: 15px; right: 15px;
left: 15px; } left: 15px; }
.article-info { .article-info {
z-index: 2; z-index: 2;
width: 50em; width: 45em;
height: 8em; height: 8em;
border: none; border: none;
left: 30px; } left: 30px; }
.article-info h3 {
text-align: center;
margin: 0;
margin-bottom: 5px;
width: 100%; }
#newComment { #newComment {
margin: 1em; } margin: 1em; }

View File

@ -477,14 +477,20 @@ table#order
input:disabled input:disabled
background-color: red background-color: red
#order-footer #order-footer
min-width: 975px
right: 15px right: 15px
left: 15px left: 15px
.article-info .article-info
z-index: 2 z-index: 2
width: 50em width: 45em
height: 8em height: 8em
border: none border: none
left: 30px left: 30px
h3
text-align: center
margin: 0
margin-bottom: 5px
width: 100%
// ********* Comments // ********* Comments
#newComment #newComment
:margin 1em :margin 1em