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

30 lines
1.2 KiB
Plaintext

<div class="col-md-12 panel-default">
<div class="content-box-header panel-heading">
<div class="panel-title">Klienci - obsługa</div>
<div class="panel-options">
<%= link_to raw('<i class="glyphicon glyphicon-file text-success"></i> Nowy klient'), new_client_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>Opis</th>
<th>Akcje</th>
</tr>
<% @clients.each do |client| %>
<tr>
<td><%= link_to client.name, { controller: :notes, action: :index, client_id: client.id } %></td>
<td><%= client.description %></td>
<td>
<%= link_to raw('<i class="glyphicon glyphicon-pencil"></i> Edycja'), edit_client_path(client), class: "btn btn-primary btn-xs" %>
<%= link_to raw('<i class="glyphicon glyphicon-trash"></i> Usuń'), client_path(client), class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Czy na pewno usunąć?' } %>
</td>
</tr>
<% end %>
</table>
</div>
</div>