better code

This commit is contained in:
vfs committed 2026-05-12 12:34:49 +02:00
1 parent 40c3406dcb
commit 4e72beb433
35 files changed
+675 -812

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
{{template "base" .}}
{{define "title"}}Error{{end}}
{{define "body"}}
<div class="page-header">
<h1 class="page-title">Error</h1>
<h2 class="page-title">{{ .We.Message }}</h2>
</div>
{{end}}
+10
View File
@@ -0,0 +1,10 @@
{{template "base" .}}
{{define "title"}}Forbidden{{end}}
{{define "body"}}
<div class="page-header">
<h1 class="page-title">Forbidden</h1>
</div>
{{end}}
+1 -1
View File
@@ -13,7 +13,7 @@
<div style="font-size:13px; color:var(--text-muted); margin-top:8px;">
{{.Issue.StartTime.Format "02.01.2006"}} – {{.Issue.EndTime.Format "02.01.2006"}}
</div>
{{if .CanWriteIssues}}
{{if hasPermission "issues:write"}}
<div style="display:flex; gap:8px; margin-top:16px; flex-wrap:wrap;">
<button class="btn btn--danger"
hx-delete="/issues/{{.Issue.ID}}"
+8 -2
View File
@@ -3,6 +3,8 @@
{{define "title"}}Abstimmungen{{end}}
{{define "body"}}
{{if hasPermission "issues:read"}}
<div class="page-header">
<h1 class="page-title">Abstimmungen</h1>
<p class="page-subtitle">Aktuelle Abstimmungen der Digitalen Partei Österreich</p>
@@ -19,7 +21,7 @@
</div>
<div style="display:flex; gap:8px; margin-top:12px; flex-wrap:wrap;">
<a href="/issues/{{.ID}}" class="btn btn--primary">Details</a>
{{if $.CanWriteIssues}}
{{if hasPermission "issues:write"}}
<button class="btn btn--danger"
hx-delete="/issues/{{.ID}}"
hx-confirm="Abstimmung wirklich löschen?">Löschen</button>
@@ -32,7 +34,11 @@
<p style="color: var(--text-muted);">Keine Abstimmungen vorhanden.</p>
{{end}}
{{if .CanWriteIssues}}
{{else}}
<p style="color: var(--text-muted);">Sie haben keine Berechtigung, die Abstimmungen einzusehen.</p>
{{end}}
{{if hasPermission "issues:write"}}
<details style="margin-top:32px;">
<summary class="btn btn--primary" style="display:inline-block; cursor:pointer; list-style:none;">+ Neue Abstimmung</summary>
<div class="auth-card" style="max-width:520px; margin-top:16px;">