Let admins edit other user's profiles
This commit is contained in:
24
web/templates/show-all-users.html
Normal file
24
web/templates/show-all-users.html
Normal file
@ -0,0 +1,24 @@
|
||||
{{define "page-content"}}
|
||||
<h2>Alle Benutzer</h2>
|
||||
|
||||
<div class="flex flex-col gap-4">
|
||||
{{range .}}
|
||||
<button class="btn" hx-get="/edit-user/{{.ID}}" hx-target="#page-content">
|
||||
<h1 class="font-bold text-2xl">
|
||||
{{.UserName}}
|
||||
({{if eq .Role 0}}
|
||||
Admin
|
||||
{{else if eq .Role 1}}
|
||||
Herausgeber
|
||||
{{else if eq .Role 2}}
|
||||
Redakteur
|
||||
{{else}}
|
||||
Autor
|
||||
{{end}})
|
||||
</h1>
|
||||
<p>{{.FirstName}} {{.LastName}}</p>
|
||||
</button>
|
||||
{{end}}
|
||||
<button class="action-btn" hx-get="/hub" hx-target="#page-content">Zurück</button>
|
||||
</div>
|
||||
{{end}}
|
Reference in New Issue
Block a user