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/users.ejs Normal file
View File

@ -0,0 +1,39 @@
<%- include('layout', { title: 'Benutzerverwaltung' }) %>
<% override body %>
<h2>Benutzerverwaltung</h2>
<div class="actions">
<a href="/users/new" class="btn">Neuen Benutzer anlegen</a>
</div>
<table class="data-table">
<thead>
<tr>
<th>Benutzername</th>
<th>Rolle</th>
<th>Aktionen</th>
</tr>
</thead>
<tbody>
<% users.forEach(user => { %>
<tr>
<td><%= user.username %></td>
<td><%= user.role %></td>
<td>
<% if (user.id !== currentUser.id) { %>
<form action="/users/<%= user.id %>/delete" method="POST" style="display: inline;">
<button type="submit" class="btn-danger"
onclick="return confirm('Benutzer wirklich löschen?')">Löschen</button>
</form>
<% else %>
<span class="disabled">(Eigener Account)</span>
<% } %>
</td>
</tr>
<% }); %>
</tbody>
</table>
<p>Gesamt: <%= users.length %> Benutzer</p>
<% end %>