mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-02 08:21:57 -04:00
Fixed the UI, now working
This commit is contained in:
@@ -1,11 +1,24 @@
|
|||||||
<% @issue.line_items.build if @issue.line_items.empty? %>
|
<% @issue.line_items.build if @issue.line_items.empty? %>
|
||||||
|
|
||||||
<div data-nested-form data-wrapper-selector=".line-item">
|
<div class="box tabular" data-nested-form data-wrapper-selector=".line-item">
|
||||||
<div data-nested-form-container>
|
<p><strong>Line Items</strong></p>
|
||||||
<%= f.fields_for :line_items do |item_form| %>
|
|
||||||
<%= render "line_items/line_item_fields", f: item_form %>
|
<table class="list line-items-table">
|
||||||
<% end %>
|
<thead>
|
||||||
</div>
|
<tr>
|
||||||
|
<th>Description</th>
|
||||||
|
<th style="width:120px;">Quantity</th>
|
||||||
|
<th style="width:150px;">Unit Price</th>
|
||||||
|
<th style="width:80px;"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody data-nested-form-container>
|
||||||
|
<%= f.fields_for :line_items do |item_form| %>
|
||||||
|
<%= render "line_items/line_item_fields", f: item_form %>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<template data-nested-form-template>
|
<template data-nested-form-template>
|
||||||
<%= f.fields_for :line_items, LineItem.new, child_index: "NEW_RECORD" do |item_form| %>
|
<%= f.fields_for :line_items, LineItem.new, child_index: "NEW_RECORD" do |item_form| %>
|
||||||
@@ -13,5 +26,9 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<button type="button" data-nested-form-add>Add Line Item</button>
|
<p>
|
||||||
|
<button type="button" class="icon icon-add" data-nested-form-add>
|
||||||
|
Add Line Item
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,13 +1,34 @@
|
|||||||
<div class="line-item">
|
<tr class="line-item">
|
||||||
<%= f.hidden_field :id %>
|
<%= f.hidden_field :id %>
|
||||||
|
|
||||||
<%= f.text_field :description, placeholder: "Description" %>
|
|
||||||
<%= f.number_field :quantity, step: 1, placeholder: "Quantity" %>
|
|
||||||
<%= f.number_field :unit_price, step: 0.01, placeholder: "Unit Price" %>
|
|
||||||
|
|
||||||
<%= f.hidden_field :_destroy %>
|
<%= f.hidden_field :_destroy %>
|
||||||
|
|
||||||
<button type="button" data-nested-form-remove>
|
<td>
|
||||||
Remove
|
<%= f.text_field :description,
|
||||||
</button>
|
size: 50,
|
||||||
</div>
|
placeholder: "Description",
|
||||||
|
:no_label => true %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<%= f.number_field :quantity,
|
||||||
|
step: 1,
|
||||||
|
min: 1,
|
||||||
|
style: "width:90px;",
|
||||||
|
:no_label => true %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<%= f.number_field :unit_price,
|
||||||
|
step: 0.01,
|
||||||
|
style: "width:120px;",
|
||||||
|
:no_label => true %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td style="text-align:center;">
|
||||||
|
<button type="button"
|
||||||
|
class="icon-only icon-del"
|
||||||
|
title="Remove"
|
||||||
|
data-nested-form-remove>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
Reference in New Issue
Block a user