Added ability to delete other users

This commit is contained in:
2024-04-12 08:46:34 +02:00
parent 0f0471b84c
commit 21fd3403b2
7 changed files with 92 additions and 21 deletions

View File

@ -2,12 +2,12 @@
<h2>Alle Benutzer</h2>
<div class="flex flex-col gap-4">
{{range .}}
<button class="btn" hx-get="/edit-user/{{.ID}}" hx-target="#page-content">
{{range .Users}}
<button class="btn" hx-get="/{{$.Action}}/{{.ID}}" hx-target="#page-content">
<h1 class="font-bold text-2xl">
{{.UserName}}
({{if eq .Role 0}}
Admin
Administrator
{{else if eq .Role 1}}
Herausgeber
{{else if eq .Role 2}}