Initial commit: Frühstückskonten Verwaltung Web-App

This commit is contained in:
Alf
2026-07-14 08:26:25 +02:00
commit 9ad54ae241
2301 changed files with 300595 additions and 0 deletions

39
views/items.ejs Normal file
View File

@ -0,0 +1,39 @@
<%- include('layout', { title: 'Artikel' }) %>
<% override body %>
<h2>Artikelverwaltung</h2>
<div class="actions">
<a href="/items/new" class="btn">Neuen Artikel anlegen</a>
</div>
<table class="data-table">
<thead>
<tr>
<th>Name</th>
<th>Preis</th>
<th>Beschreibung</th>
<th>Aktionen</th>
</tr>
</thead>
<tbody>
<% items.forEach(item => { %>
<tr>
<td><%= item.name %></td>
<td><%= item.price.toFixed(2) %> €</td>
<td><%= item.description || '-' %></td>
<td>
<a href="/items/<%= item.id %>/edit">Bearbeiten</a>
|
<form action="/items/<%= item.id %>/delete" method="POST" style="display: inline;">
<button type="submit" class="btn-danger"
onclick="return confirm('Artikel wirklich löschen?')">Löschen</button>
</form>
</td>
</tr>
<% }); %>
</tbody>
</table>
<p>Gesamt: <%= items.length %> Artikel</p>
<% end %>