forked from Ruderverein-Donau-Linz/rowt
add notifications; fixes #127
This commit is contained in:
@ -3,6 +3,57 @@
|
||||
{% 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">
|
||||
|
Reference in New Issue
Block a user