Nach dem Login landet jeder Nutzer (auch ein Admin, jeder Login gehört
zu einem Account) auf der normalen Startseite — ohne einen Link zu
/admin in der Navigation war der Admin-Bereich für einen Admin ohne
die URL im Kopf praktisch unerreichbar (genau das hat der Nutzer nach
dem Login gemeldet).
navData{IsAdmin} wird jetzt von jeder angemeldeten Seite (Start,
Beiträge, Beitrag-Detail, alle Admin-Seiten) an den gemeinsamen
"nav"-Template-Block durchgereicht; der Link erscheint nur für
role=admin. Test deckt beide Fälle ab (Admin sieht den Link, Mandant
nicht).
49 lines
1.5 KiB
HTML
49 lines
1.5 KiB
HTML
{{define "index"}}<!doctype html>
|
|
<html lang="de">
|
|
<head>{{template "head" .}}</head>
|
|
<body>
|
|
{{template "nav" .Nav}}
|
|
<div class="page">
|
|
<h1>Pre-Publish-Prüfung</h1>
|
|
<p>Caption und Plattform eingeben, um auf Kennzeichnungsrisiken zu prüfen.</p>
|
|
|
|
<form hx-post="/pruefen" hx-target="#ergebnis" hx-swap="innerHTML">
|
|
<label for="platform">Plattform</label>
|
|
<select id="platform" name="platform" required>
|
|
<option value="instagram">Instagram</option>
|
|
<option value="tiktok">TikTok</option>
|
|
</select>
|
|
|
|
<label for="post_type">Beitragstyp</label>
|
|
<select id="post_type" name="post_type" required>
|
|
<option value="feed">Feed</option>
|
|
<option value="reel">Reel</option>
|
|
<option value="story">Story</option>
|
|
<option value="video">Video</option>
|
|
</select>
|
|
|
|
<label for="consideration">Gegenleistung</label>
|
|
<select id="consideration" name="consideration" required>
|
|
<option value="">— bitte wählen —</option>
|
|
<option value="bezahlt">Bezahlt</option>
|
|
<option value="sachbezug">Sachbezug (Produkt, Einladung, ...)</option>
|
|
<option value="keine">Keine</option>
|
|
<option value="unklar">Unklar</option>
|
|
</select>
|
|
<p class="hinweis">
|
|
Das kann die Prüfung nicht aus der Caption erraten — nur wer
|
|
einreicht, weiß, ob eine Gegenleistung vorlag.
|
|
</p>
|
|
|
|
<label for="caption">Caption</label>
|
|
<textarea id="caption" name="caption" rows="6" required></textarea>
|
|
|
|
<button type="submit">Prüfen</button>
|
|
</form>
|
|
|
|
<div id="ergebnis"></div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
{{end}}
|