invoice_keeper/app/views/customers/index.html.erb

36 lines
1.2 KiB
Plaintext

<div class="col-md-12">
<div class="content-box-large">
<div class="panel-heading">
<div class="panel-title">Klienci</div>
<div class="panel-options">
<%= link_to raw('<i class="glyphicon glyphicon-file"></i> Nowy klient'), new_customer_path %><br/>
</div>
</div>
<div class="panel-body">
<table class="table table-striped table-bordered">
<tr>
<th>Nazwa</th>
<th>Adres</th>
<th>NIP</th>
<th>Regon</th>
<th>Akcje</th>
</tr>
<% @customers.each do |customer| %>
<tr>
<td><%= customer.name %></td>
<td><%= customer.adress %></td>
<td><%= customer.nip %></td>
<td><%= customer.regon %></td>
<td>
<%= link_to raw('<i class="glyphicon glyphicon-pencil"></i> Edycja'), edit_customer_path(customer), class: "btn btn-primary btn-xs" %>
<%= link_to raw('<i class="glyphicon glyphicon-trash"></i> Usuń'), customer_path(customer), class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Czy na pewno usunąć?' } %>
</td>
</tr>
<% end %>
</table>
</div>
</div>
</div>