34 lines
1.3 KiB
Plaintext
34 lines
1.3 KiB
Plaintext
<div class="col-md-12 panel-default">
|
|
<div class="content-box-header panel-heading">
|
|
<div class="panel-title">Produkty</div>
|
|
|
|
<div class="panel-options">
|
|
<%= link_to raw('<i class="glyphicon glyphicon-file text-success"></i> Nowy produkt'), new_product_path, class: "text-primary" %><br/>
|
|
</div>
|
|
</div>
|
|
<div class="content-box-large box-with-header">
|
|
<table class="table table-striped table-bordered">
|
|
<tr>
|
|
<th>Nazwa</th>
|
|
<th>Wartość netto</th>
|
|
<th>VAT</th>
|
|
<th>Jednostka miary</th>
|
|
<th>Akcje</th>
|
|
</tr>
|
|
|
|
<% @products.each do |product| %>
|
|
<tr>
|
|
<td><%= product.name %></td>
|
|
<td><%= number_with_precision(product.netto_price, precision: 2) %></td>
|
|
<td><%= product.vat.name %></td>
|
|
<td><%= product.qnt_name %></td>
|
|
<td>
|
|
<%= link_to raw('<i class="glyphicon glyphicon-pencil"></i> Edycja'), edit_product_path(product), class: "btn btn-primary btn-xs" %>
|
|
<%= link_to raw('<i class="glyphicon glyphicon-trash"></i> Usuń'), product_path(product), class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Czy na pewno usunąć?' } %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
</div>
|
|
</div>
|