init
This commit is contained in:
29
views/index.ejs
Normal file
29
views/index.ejs
Normal file
@@ -0,0 +1,29 @@
|
||||
<a href="/customers/new" class="btn btn-primary mb-3">Dodaj klienta</a>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Imię</th>
|
||||
<th>Nazwisko</th>
|
||||
<th>Miasto</th>
|
||||
<th>Telefon</th>
|
||||
<th>Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% customers.forEach(c => { %>
|
||||
<tr>
|
||||
<td><%= c.firstName %></td>
|
||||
<td><%= c.lastName %></td>
|
||||
<td><%= c.city %></td>
|
||||
<td><%= c.phone %></td>
|
||||
<td>
|
||||
<a href="/customers/<%= c.id %>" class="btn btn-sm btn-info">Pokaż</a>
|
||||
<a href="/customers/<%= c.id %>/edit" class="btn btn-sm btn-warning">Edytuj</a>
|
||||
<form action="/customers/<%= c.id %>?_method=DELETE" method="post" style="display:inline">
|
||||
<button class="btn btn-sm btn-danger" onclick="return confirm('Usunąć?')">Usuń</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user