cpolis/web/templates/hub.html

58 lines
2.9 KiB
HTML
Raw Normal View History

2024-02-24 15:31:33 +01:00
{{define "page-content"}}
2024-04-01 14:22:59 +02:00
<div class="flex flex-col gap-4">
<button class="btn" hx-get="/logout" hx-target="#page-content">Abmelden</button>
2024-04-02 21:35:34 +02:00
2024-10-27 13:58:19 +01:00
{{if lt .Role 4}}
2024-04-01 14:22:59 +02:00
<div class="mb-3">
<h2>Artikel</h2>
2024-09-09 22:03:31 +02:00
<div class="grid grid-cols-1 md:grid-cols-2 gap-x-4 gap-y-2">
2024-08-30 15:42:53 +02:00
<button class="btn" hx-get="/article/write" hx-target="#page-content">Artikel schreiben</button>
<form class="flex" hx-encoding="multipart/form-data">
<label class="btn text-center" for="docx-upload">Word-Dokument hochladen</label>
<input accept=".docx" class="hidden" id="docx-upload" name="docx-upload" type="file"
hx-post="/docx/upload" />
</form>
2024-09-28 12:17:03 +02:00
<button class="btn" hx-get="/article/all-rejected" hx-target="#page-content">Artikel bearbeiten</button>
2024-10-27 13:58:19 +01:00
{{if lt .Role 3}}<button class="btn" hx-get="/article/all-unpublished-unrejected-and-published-rejected"
2024-09-28 12:17:03 +02:00
hx-target="#page-content">Artikel veröffentlichen</button>{{end}}
2024-10-27 13:58:19 +01:00
{{if lt .Role 2}}<button class="btn" hx-get="/article/all-published/delete"
hx-target="#page-content">Artikel löschen</button>{{end}}
{{if lt .Role 2}}<button class="btn" hx-get="/article/all-published/review-edit"
2024-09-28 12:17:03 +02:00
hx-target="#page-content">Artikel bearbeiten lassen</button>{{end}}
2024-10-27 13:58:19 +01:00
{{if lt .Role 3}}<button class="btn" hx-get="/tag/create" hx-target="#page-content">Neuer
Tag</button>{{end}}
2024-04-01 14:22:59 +02:00
</div>
</div>
{{end}}
2024-04-02 21:35:34 +02:00
2024-10-27 13:58:19 +01:00
{{if lt .Role 2}}
2024-04-01 14:22:59 +02:00
<div class="mb-3">
<h2>Ausgabe</h2>
2024-09-09 22:03:31 +02:00
<div class="grid grid-cols-1 md:grid-cols-2 gap-x-4 gap-y-2">
2024-08-30 15:42:53 +02:00
<button class="btn" hx-get="/issue/this" hx-target="#page-content">Diese Ausgabe</button>
2024-09-01 18:16:09 +02:00
<form class="flex" hx-encoding="multipart/form-data">
2024-10-27 13:58:19 +01:00
<label class="btn text-center" for="pdf-upload">PDF hochladen</label>
2024-09-01 18:16:09 +02:00
<input accept=".pdf" class="hidden" id="pdf-upload" name="pdf-upload" type="file"
hx-post="/pdf/upload" />
</form>
2024-04-01 14:22:59 +02:00
</div>
{{end}}
2024-04-01 14:22:59 +02:00
</div>
2024-04-02 21:35:34 +02:00
2024-10-27 13:58:19 +01:00
{{if lt .Role 4}}
2024-04-01 14:22:59 +02:00
<div class="mb-3">
<h2>Benutzer</h2>
2024-09-09 22:03:31 +02:00
<div class="grid grid-cols-1 md:grid-cols-2 gap-x-4 gap-y-2">
<button class="btn" hx-get="/user/edit/self" hx-target="#page-content">Mein Profil bearbeiten</button>
2024-10-27 13:58:19 +01:00
{{if eq .Role 0}}<button class="btn" hx-get="/user/create" hx-target="#page-content">Benutzer
2024-09-28 12:17:03 +02:00
hinzufügen</button>{{end}}
2024-10-27 13:58:19 +01:00
{{if eq .Role 0}}<button class="btn" hx-get="/user/show-all/edit" hx-target="#page-content">Benutzer
2024-09-28 12:17:03 +02:00
bearbeiten</button>{{end}}
2024-10-27 13:58:19 +01:00
{{if eq .Role 0}}<button class="btn" hx-get="/user/show-all/delete" hx-target="#page-content">Benutzer
2024-09-28 12:17:03 +02:00
löschen</button>{{end}}
2024-04-01 14:22:59 +02:00
</div>
</div>
{{end}}
2024-03-28 08:41:38 +01:00
</div>
2024-03-03 09:16:49 +01:00
{{end}}