mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-04-02 07:01:59 -04:00
tweaked layout, added JS for live totals
This commit is contained in:
@@ -6,14 +6,15 @@
|
||||
data-nested-form
|
||||
data-wrapper-selector=".line-item">
|
||||
|
||||
<p><strong><%= t :label_line_items %></strong></p>
|
||||
<strong><%= t :label_line_items %></strong>
|
||||
|
||||
<table class="list line-items-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t :label_description %></th>
|
||||
<th style="width:120px;"><%= t :label_qty %></th>
|
||||
<th style="width:150px;"><%= t :label_price %></th>
|
||||
<th style="width:60%;"><%= t :label_description %></th>
|
||||
<th style="width:10%;"><%= t :label_qty %></th>
|
||||
<th style="width:10%;"><%= t :label_price %></th>
|
||||
<th style="width:10%;"><%= t :label_total %></th>
|
||||
<% unless readonly %>
|
||||
<th style="width:80px;"></th>
|
||||
<% end %>
|
||||
@@ -29,6 +30,11 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="line-items-grand-total">
|
||||
<strong><%= t :label_total %>:</strong>
|
||||
<span id="line-items-grand-total">0.00</span>
|
||||
</p>
|
||||
|
||||
<% unless readonly %>
|
||||
<template data-nested-form-template>
|
||||
<%= f.fields_for :line_items, LineItem.new, child_index: "NEW_RECORD" do |item_form| %>
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<table class="list line-items-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t :label_description %></th>
|
||||
<th style="width:120px;"><%= t :label_qty %></th>
|
||||
<th style="width:150px;"><%= t :label_price %></th>
|
||||
<th style="width:150px;"><%= t :label_total %></th>
|
||||
<th style="width:70%;"><%= t :label_description %></th>
|
||||
<th style="width:10%;"><%= t :label_qty %></th>
|
||||
<th style="width:10%;"><%= t :label_price %></th>
|
||||
<th style="width:10%;"><%= t :label_total %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
@@ -2,36 +2,39 @@
|
||||
<%= f.hidden_field :id %>
|
||||
<%= f.hidden_field :_destroy %>
|
||||
|
||||
<td>
|
||||
<td data-label="<%= t :label_description %>">
|
||||
<%= f.text_field :description,
|
||||
size: 50,
|
||||
placeholder: l(:label_description),
|
||||
no_label: true,
|
||||
disabled: readonly %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<td data-label="<%= t :label_qty %>">
|
||||
<%= f.number_field :quantity,
|
||||
step: 1,
|
||||
min: 0,
|
||||
style: "width:90px;",
|
||||
class: "qty-field",
|
||||
no_label: true,
|
||||
disabled: readonly %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<td data-label="<%= t :label_price %>">
|
||||
<%= f.number_field :unit_price,
|
||||
step: 0.01,
|
||||
style: "width:120px;",
|
||||
class: "price-field",
|
||||
no_label: true,
|
||||
disabled: readonly %>
|
||||
</td>
|
||||
|
||||
<td class="line-total" data-label="<%= t :label_total %>">
|
||||
0.00
|
||||
</td>
|
||||
|
||||
<% unless readonly %>
|
||||
<td style="text-align:center;">
|
||||
<td class="actions">
|
||||
<button type="button"
|
||||
class="icon-only icon-del"
|
||||
title="<%=l(:label_remove)%>"
|
||||
title="<%= l(:label_remove) %>"
|
||||
data-nested-form-remove>
|
||||
</button>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user