rowt/templates/index.html.tera
philipp 9d14dae4a7
All checks were successful
CI/CD Pipeline / test (push) Successful in 8m58s
CI/CD Pipeline / deploy-staging (push) Successful in 4m18s
CI/CD Pipeline / deploy-main (push) Has been skipped
notification (#282)
Reviewed-on: #282
2024-03-20 16:19:12 +01:00

200 lines
11 KiB
Plaintext

{% import "includes/macros" as macros %}
{% extends "base" %}
{% block content %}
<div class="max-w-screen-lg w-full">
<h1 class="h1">Ruderassistent</h1>
<div class="grid gap-3">
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">
<h2 class="h2">Nachrichten</h2>
<div class="text-sm p-3">
{% for notification in notifications %}
{% if not notification.read_at %}
<div class="relative flex bg-clip-border rounded-xl bg-white text-gray-700 shadow-md w-full flex-row">
<div class="p-6">
<h6 class="block mb-4 font-sans text-base antialiased font-semibold leading-relaxed tracking-normal text-gray-700 uppercase">
{{ notification.category }}
</h6>
<h4 class="block mb-2 font-sans text-2xl antialiased font-semibold leading-snug tracking-normal text-blue-gray-900">
{{ notification.message }}
</h4>
<p class="block mb-8 font-sans text-base antialiased font-normal leading-relaxed text-gray-700">
{{ notification.created_at | date(format="%d.%m.%Y %H:%M") }}
</p>
{% if not notification.read_at %}
<a href="/notification/{{ notification.id }}/read" class="inline-block">
<button class="flex items-center gap-2 px-6 py-3 font-sans text-xs font-bold text-center text-gray-900 uppercase align-middle transition-all rounded-lg select-none disabled:opacity-50 disabled:shadow-none disabled:pointer-events-none hover:bg-gray-900/10 active:bg-gray-900/20"
type="button">Als gelesen markieren</button>
</a>
{% endif %}
</div>
</div>
{% endif %}
{% endfor %}
<details>
<summary>Vergangene Nachrichten</summary>
{% for notification in notifications %}
{% if notification.read_at %}
<div class="relative flex bg-clip-border rounded-xl bg-white text-gray-700 shadow-md w-full flex-row">
<div class="p-6">
<h6 class="block mb-4 font-sans text-base antialiased font-semibold leading-relaxed tracking-normal text-gray-700 uppercase">
{{ notification.category }}
</h6>
<h4 class="block mb-2 font-sans text-2xl antialiased font-semibold leading-snug tracking-normal text-blue-gray-900">
{{ notification.message }}
</h4>
<p class="block mb-8 font-sans text-base antialiased font-normal leading-relaxed text-gray-700">
{{ notification.created_at | date(format="%d.%m.%Y %H:%M") }}
</p>
</div>
</div>
{% endif %}
{% endfor %}
</details>
</div>
</div>
</div>
<div class="grid gap-3">
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">
<h2 class="h2">Allgemein</h2>
<div class="text-sm p-3">
<ul class="list-disc ms-2">
<li class="py-1">
<a href="https://wiki.rudernlinz.at/ruderassistent#faq"
target="_blank"
class="link-primary">FAQ (extern)</a>
</li>
</ul>
</div>
</div>
</div>
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
<div class="grid gap-3">
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">
<h2 class="h2">Ergo</h2>
<div class="text-sm p-3">
<ul class="list-disc ms-2">
<li class="py-1">
<a href="/ergo" class="link-primary">Ergo</a>
</li>
</ul>
</div>
</div>
</div>
{% endif %}
{% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %}
<div class="grid gap-3">
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">
<h2 class="h2">Aktives Vereinsmitglied</h2>
<div class="text-sm p-3">
<ul class="list-disc ms-2">
<li class="py-1">
<a href="/planned" class="link-primary">Geplante Ausfahrten</a>
</li>
<li class="py-1">
<a href="/log" class="link-primary">Ausfahrt eintragen</a>
</li>
<li class="py-1">
<a href="/log/show" class="link-primary">Logbuch</a>
</li>
<li class="py-1">
<a href="/stat" class="link-primary">Statistik</a>
</li>
<li class="py-1">
<a href="/stat/boats" class="link-primary">Bootsauswertung</a>
</li>
<li class="py-1">
<a href="/boatdamage" class="link-primary">Bootsschaden</a>
</li>
</ul>
</div>
</div>
</div>
{% endif %}
{% if "scheckbuch" in loggedin_user.roles %}
<div class="grid gap-3">
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">
<h2 class="h2">Scheckbuch</h2>
<div class="text-sm p-3">
<ul class="list-disc ms-2">
<li class="py-1">
<a href="/planned" class="link-primary">Geplante Ausfahrten</a>
</li>
</ul>
</div>
</div>
</div>
{% endif %}
{% if "schnupper-betreuer" in loggedin_user.roles %}
<div class="grid gap-3">
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">
<h2 class="h2">Schnupper-Betreuer</h2>
<div class="text-sm p-3">
<ul class="list-disc ms-2">
<li class="py-1">
<a href="/admin/schnupper" class="link-primary">Schnuppern</a>
</li>
</ul>
</div>
</div>
</div>
{% endif %}
{% if "Vorstand" in loggedin_user.roles %}
<div class="grid gap-3">
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">
<h2 class="h2">Vorstand</h2>
<div class="text-sm p-3">
<ul class="list-disc ms-2">
<li class="py-1">
<a href="/admin/user/fees" class="link-primary">Übersicht User Gebühren</a>
</li>
<li class="py-1">
<a href="/admin/user/scheckbuch" class="link-primary">Scheckbuch</a>
</li>
<li class="py-1">
<a href="/admin/user" class="link-primary">User</a>
</li>
<li class="py-1">
<a href="/board/boathouse" class="link-primary">Bootshaus</a>
</li>
</ul>
</div>
</div>
</div>
{% endif %}
{% if "admin" in loggedin_user.roles %}
<div class="grid gap-3">
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">
<h2 class="h2">Admin</h2>
<div class="text-sm p-3">
<ul class="list-disc ms-2">
<li class="py-1">
<a href="/admin/boat" class="link-primary">Boote</a>
</li>
<li class="py-1">
<a href="/admin/user" class="link-primary">User</a>
</li>
<li class="py-1">
<a href="/admin/mail" class="link-primary">Mail (beautifully layouted)</a>
</li>
<li class="py-1">
<a href="/admin/rss" class="link-primary">Logs</a>
</li>
<li class="py-1">
<a href="/admin/list" class="link-primary">Fingerabdruck-Liste überprüfen</a>
</li>
</ul>
</div>
</div>
</div>
{% endif %}
</div>
{% endblock content %}