notification #301

Merged
philipp merged 12 commits from notification into staging 2024-03-21 20:51:47 +01:00
3 changed files with 256 additions and 247 deletions
Showing only changes of commit de1b6b76c9 - Show all commits

View File

@ -16,178 +16,176 @@
<header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full z-10"> <header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full z-10">
<div class="max-w-screen-xl w-full flex justify-between items-center"> <div class="max-w-screen-xl w-full flex justify-between items-center">
<div class="w-1/3 truncate"> <div class="w-1/3 truncate">
<a href="/"> <a href="/">
{{ loggedin_user.name }} {{ loggedin_user.name }}
</a> </a>
</div> </div>
<div> <div>
{% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} {% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
<a href="#" <a href="#"
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer" class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
data-sidebar="true" data-sidebar="true"
data-trigger="sidebar" data-trigger="sidebar"
data-header="Ergo Challenge" data-header="Ergo Challenge"
data-body="#mobile-menu-guest"> data-body="#mobile-menu-guest">
{% include "includes/book" %} {% include "includes/book" %}
<span class="sr-only">Ergo</span> <span class="sr-only">Ergo</span>
</a> </a>
<div class="hidden"> <div class="hidden">
<div id="mobile-menu-guest"> <div id="mobile-menu-guest">
<a href="/ergo" class="block w-100 py-2 hover:text-primary-600 border-t">Ergo</a> <a href="/ergo" class="block w-100 py-2 hover:text-primary-600 border-t">Ergo</a>
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% if "scheckbuch" not in loggedin_user.roles %} {% if "scheckbuch" not in loggedin_user.roles %}
<a href="#" <a href="#"
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer" class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
data-sidebar="true" data-sidebar="true"
data-trigger="sidebar" data-trigger="sidebar"
data-header="Menü" data-header="Menü"
data-body="#mobile-menu"> data-body="#mobile-menu">
{% include "includes/book" %} {% include "includes/book" %}
<span class="sr-only">Logbuch</span> <span class="sr-only">Logbuch</span>
</a> </a>
<div class="hidden"> <div class="hidden">
<div id="mobile-menu"> <div id="mobile-menu">
<a href="/log" class="block w-100 py-2 hover:text-primary-600">Ausfahrt eintragen</a> <a href="/log" class="block w-100 py-2 hover:text-primary-600">Ausfahrt eintragen</a>
<a href="/log/show" <a href="/log/show"
class="block w-100 py-2 hover:text-primary-600 border-t">Logbuch</a> class="block w-100 py-2 hover:text-primary-600 border-t">Logbuch</a>
{% if "admin" in loggedin_user.roles or "Vorstand" in loggedin_user.roles %} {% if "admin" in loggedin_user.roles or "Vorstand" in loggedin_user.roles %}
<a href="/admin/user" <a href="/admin/user"
class="block w-100 py-2 hover:text-primary-600 border-t"> class="block w-100 py-2 hover:text-primary-600 border-t">Userverwaltung</a>
Userverwaltung {% endif %}
</a> {% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
{% endif %} <a href="/ergo" class="block w-100 py-2 hover:text-primary-600 border-t">Ergo</a>
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} {% endif %}
<a href="/ergo" class="block w-100 py-2 hover:text-primary-600 border-t">Ergo</a> <a href="/stat" class="block w-100 py-2 hover:text-primary-600 border-t">Statistik</a>
{% endif %} <a href="/stat/boats"
<a href="/stat" class="block w-100 py-2 hover:text-primary-600 border-t">Statistik</a> class="block w-100 py-2 hover:text-primary-600 border-t">Bootsauswertung</a>
<a href="/stat/boats" {% if "admin" in loggedin_user.roles %}
class="block w-100 py-2 hover:text-primary-600 border-t">Bootsauswertung</a> <a href="/admin/boat"
{% if "admin" in loggedin_user.roles %} class="block w-100 py-2 hover:text-primary-600 border-t">Boote</a>
<a href="/admin/boat" {% endif %}
class="block w-100 py-2 hover:text-primary-600 border-t">Boote</a> <a href="/boatdamage"
{% endif %} class="block w-100 py-2 hover:text-primary-600 border-t">Bootsschaden</a>
<a href="/boatdamage" </div>
class="block w-100 py-2 hover:text-primary-600 border-t">Bootsschaden</a> </div>
</div> {% endif %}
</div> <a href="/auth/logout"
{% endif %} class="inline-flex justify-center rounded-md bg-gray-200 ml-1 px-3 py-2 text-sm font-semibold text-primary-950 hover:bg-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer">
<a href="/auth/logout" <svg class="inline h-4"
class="inline-flex justify-center rounded-md bg-gray-200 ml-1 px-3 py-2 text-sm font-semibold text-primary-950 hover:bg-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"> width="24"
<svg class="inline h-4" height="24"
width="24" viewbox="0 0 24 24"
height="24" fill="none"
viewbox="0 0 24 24" stroke="currentColor"
fill="none" stroke-width="2"
stroke="currentColor" stroke-linecap="round"
stroke-width="2" stroke-linejoin="round"
stroke-linecap="round" class="feather feather-log-out">
stroke-linejoin="round" <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
class="feather feather-log-out"> <polyline points="16 17 21 12 16 7"></polyline>
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path> <line x1="21" y1="12" x2="9" y2="12"></line>
<polyline points="16 17 21 12 16 7"></polyline> </svg>
<line x1="21" y1="12" x2="9" y2="12"></line> <span class="sr-only">Ausloggen</span>
</svg> </a>
<span class="sr-only">Ausloggen</span>
</a>
</div>
</div> </div>
</header>
<div class="h-8"></div>
{% endmacro header %}
{% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false, accept='') %}
<div class="{{ wrapper_class }}">
<label for="{{ name }}"
class="{% if hide_label %} sr-only {% else %} text-sm text-gray-600 dark:text-white {% endif %}">
{{ label }}
</label>
<input {% if type=='datetime-local' %}onclick='if (!this.value) setCurrentdate(this)'{% endif %}
{% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %}
name="{{ name }}"
type="{{ type }}"
{% if required %}required{% endif %}
value="{{ value }}"
class="input {{ class }}"
placeholder="{% if hide_label %}{{ label }}{% endif %}"
{% if min is defined %}min="{{ min }}"{% endif %}
{% if autofocus %}autofocus{% endif %}
{% if accept %}accept="{{ accept }}"{% endif %}
{% if pattern %}pattern="{{ pattern }}"{% endif %}
{% if readonly %}readonly{% endif %}>
</div> </div>
{% endmacro input %} </header>
{% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %} <div class="h-8"></div>
<label for="{{ name }}{{ id }}" {% endmacro header %}
class="flex items-center cursor-pointer text-black dark:text-white hover:text-gray-900 dark:hover:text-gray-100 {{ class }}"> {% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false, accept='') %}
<input type="checkbox" <div class="{{ wrapper_class }}">
id="{{ name }}{{ id }}" <label for="{{ name }}"
name="{{ name }}" class="{% if hide_label %} sr-only {% else %} text-sm text-gray-600 dark:text-white {% endif %}">
{% if checked %}checked{% endif %}
{% if disabled %}disabled{% endif %}
class="h-4 w-4 accent-primary-600 dark:accent-primary-200 mr-2" />
{{ label }} {{ label }}
</label> </label>
{% endmacro checkbox %} <input {% if type=='datetime-local' %}onclick='if (!this.value) setCurrentdate(this)'{% endif %}
{% macro select(label, data, name='trip_type', default='', id='', selected_id='', display='', extras='', class='', wrapper_class='', required=false, show_seats=false, new_last_entry='') %} {% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %}
<div class="{{ wrapper_class }}"> name="{{ name }}"
<label for="{{ name }}" class="text-sm text-gray-600 dark:text-gray-100">{{ label }}</label> type="{{ type }}"
{% if display == '' %} {% if required %}required{% endif %}
{% set display = ["name"] %} value="{{ value }}"
{% endif %} class="input {{ class }}"
<select name="{{ name }}" placeholder="{% if hide_label %}{{ label }}{% endif %}"
{% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %} {% if min is defined %}min="{{ min }}"{% endif %}
class="input rounded-md {{ class }}" {% if autofocus %}autofocus{% endif %}
{% if required %}required="required"{% endif %}> {% if accept %}accept="{{ accept }}"{% endif %}
{% if default %}<option selected value>{{ default }}</option>{% endif %} {% if pattern %}pattern="{{ pattern }}"{% endif %}
{% for d in data %} {% if readonly %}readonly{% endif %}>
<option value="{{ d.id }}" {% if d.id == selected_id %}selected{% endif %} {% if extras != '' %} {% for extra in extras %} {% if extra != 'on_water' and d[extra] %} data-{{ extra }}={{ d[extra] }} {% else %} {% if d[extra] %}disabled{% endif %} {% endif %} {% endfor %} {% endif %} {% if show_seats %} data-custom-properties='{"amount_seats": {{ d["amount_seats"] }}, "owner": "{{ d["owner"] }}", "default_destination": "{{ d["default_destination"] }}", "boat_in_ottensheim": {{ d["location_id"] == 2 }}}'{% endif %}> </div>
{% for displa in display -%} {% endmacro input %}
{%- if d[displa] -%} {% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %}
{{- d[displa] -}} <label for="{{ name }}{{ id }}"
{%- else -%} class="flex items-center cursor-pointer text-black dark:text-white hover:text-gray-900 dark:hover:text-gray-100 {{ class }}">
{{- displa -}} <input type="checkbox"
{%- endif -%} id="{{ name }}{{ id }}"
{%- endfor %} name="{{ name }}"
</option> {% if checked %}checked{% endif %}
{% endfor %} {% if disabled %}disabled{% endif %}
{% if new_last_entry %}<option value="-1">{{ new_last_entry }}</option>{% endif %} class="h-4 w-4 accent-primary-600 dark:accent-primary-200 mr-2" />
</select> {{ label }}
</div> </label>
{% endmacro select %} {% endmacro checkbox %}
{% macro alert(message, type, class='') %} {% macro select(label, data, name='trip_type', default='', id='', selected_id='', display='', extras='', class='', wrapper_class='', required=false, show_seats=false, new_last_entry='') %}
<div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">{{ message }}</div> <div class="{{ wrapper_class }}">
{% endmacro alert %} <label for="{{ name }}" class="text-sm text-gray-600 dark:text-gray-100">{{ label }}</label>
{% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white', trip_details_id='', allow_removing=false) %} {% if display == '' %}
<div class="text-{{ color }} bg-{{ bg }} text-center p-1 mt-1 rounded-t-md"> {% set display = ["name"] %}
{{ header }} {% endif %}
{{ empty_seats }} <select name="{{ name }}"
</div> {% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %}
<div class="p-2 border border-t-0 border-{{ bg }} mb-4 rounded-b-md"> class="input rounded-md {{ class }}"
{% if participants | length > 0 %} {% if required %}required="required"{% endif %}>
{% for rower in participants %} {% if default %}<option selected value>{{ default }}</option>{% endif %}
{{ rower.name }} {% for d in data %}
{% if rower.is_guest %}<small class="text-gray-600 dark:text-gray-100">(Scheckbuch)</small>{% endif %} <option value="{{ d.id }}" {% if d.id == selected_id %}selected{% endif %} {% if extras != '' %} {% for extra in extras %} {% if extra != 'on_water' and d[extra] %} data-{{ extra }}={{ d[extra] }} {% else %} {% if d[extra] %}disabled{% endif %} {% endif %} {% endfor %} {% endif %} {% if show_seats %} data-custom-properties='{"amount_seats": {{ d["amount_seats"] }}, "owner": "{{ d["owner"] }}", "default_destination": "{{ d["default_destination"] }}", "boat_in_ottensheim": {{ d["location_id"] == 2 }}}'{% endif %}>
{% if rower.is_real_guest %} {% for displa in display -%}
<small class="text-gray-600 dark:text-gray-100">(Gast)</small> {%- if d[displa] -%}
{% if allow_removing %} {{- d[displa] -}}
<a href="/planned/remove/{{ trip_details_id }}/{{ rower.name }}" {%- else -%}
class="btn btn-attention btn-fw">Abmelden</a> {{- displa -}}
{% endif %} {%- endif -%}
{%- endfor %}
</option>
{% endfor %}
{% if new_last_entry %}<option value="-1">{{ new_last_entry }}</option>{% endif %}
</select>
</div>
{% endmacro select %}
{% macro alert(message, type, class='') %}
<div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">{{ message }}</div>
{% endmacro alert %}
{% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white', trip_details_id='', allow_removing=false) %}
<div class="text-{{ color }} bg-{{ bg }} text-center p-1 mt-1 rounded-t-md">
{{ header }}
{{ empty_seats }}
</div>
<div class="p-2 border border-t-0 border-{{ bg }} mb-4 rounded-b-md">
{% if participants | length > 0 %}
{% for rower in participants %}
{{ rower.name }}
{% if rower.is_guest %}<small class="text-gray-600 dark:text-gray-100">(Scheckbuch)</small>{% endif %}
{% if rower.is_real_guest %}
<small class="text-gray-600 dark:text-gray-100">(Gast)</small>
{% if allow_removing %}
<a href="/planned/remove/{{ trip_details_id }}/{{ rower.name }}"
class="btn btn-attention btn-fw">Abmelden</a>
{% endif %} {% endif %}
<span class="hidden">(angemeldet seit {% endif %}
{{ rower.registered_at }})</span> <span class="hidden">(angemeldet seit
<br /> {{ rower.registered_at }})</span>
{% endfor %} <br />
{% else %} {% endfor %}
{{ text }} {% else %}
{% endif %} {{ text }}
</div> {% endif %}
{% endmacro box %} </div>
{% macro faq(question, answer) %} {% endmacro box %}
<div> {% macro faq(question, answer) %}
<h2 class="flex mb-4 text-lg font-bold text-primary-900">{{ question }}</h2> <div>
<p class="text-primary-950">{{ answer | safe }}</p> <h2 class="flex mb-4 text-lg font-bold text-primary-900">{{ question }}</h2>
</div> <p class="text-primary-950">{{ answer | safe }}</p>
{% endmacro faq %} </div>
{% endmacro faq %}

View File

@ -1,18 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" class="flex-shrink-0 w-6 h-6 inline-block" height="100%" viewBox="0 0 583 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> <svg width="100%"
class="flex-shrink-0 w-6 h-6 inline-block"
height="100%"
viewBox="0 0 583 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:space="preserve"
xmlns:serif="http://www.serif.com/"
style="fill-rule:evenodd;
clip-rule:evenodd;
stroke-linejoin:round;
stroke-miterlimit:2">
<g transform="matrix(1,0,0,1,-1574,-536.199)"> <g transform="matrix(1,0,0,1,-1574,-536.199)">
<g transform="matrix(1,0,0,1,0,10.8235)"> <g transform="matrix(1,0,0,1,0,10.8235)">
<g transform="matrix(0.948324,0.317305,0.307947,-0.920356,-304.665,1886.18)"> <g transform="matrix(0.948324,0.317305,0.307947,-0.920356,-304.665,1886.18)">
<rect x="1838.29" y="1006.52" width="17.353" height="644.204" style="fill:white;fill-opacity:0.7;"/> <rect x="1838.29" y="1006.52" width="17.353" height="644.204" style="fill:white;fill-opacity:0.7;" />
</g> </g>
<path d="M1944.68,934.772C1921.09,896.523 1932.18,782.181 1974.56,655.531C1990.23,608.676 2009.04,563.787 2029.1,525.376L2156.88,568.132C2149.78,610.876 2137.79,658.046 2122.11,704.901C2079.26,832.966 2018.43,931.728 1976.52,946.409L2085.08,568.504L1944.68,934.772Z" style="fill:white;fill-opacity:0.7;"/> <path d="M1944.68,934.772C1921.09,896.523 1932.18,782.181 1974.56,655.531C1990.23,608.676 2009.04,563.787 2029.1,525.376L2156.88,568.132C2149.78,610.876 2137.79,658.046 2122.11,704.901C2079.26,832.966 2018.43,931.728 1976.52,946.409L2085.08,568.504L1944.68,934.772Z" style="fill:white;fill-opacity:0.7;" />
</g> </g>
<g transform="matrix(-1,0,0,1,3730.88,10.8235)"> <g transform="matrix(-1,0,0,1,3730.88,10.8235)">
<g transform="matrix(0.948324,0.317305,0.307947,-0.920356,-304.665,1886.18)"> <g transform="matrix(0.948324,0.317305,0.307947,-0.920356,-304.665,1886.18)">
<rect x="1838.29" y="1006.52" width="17.353" height="644.204" style="fill:white;fill-opacity:0.7;"/> <rect x="1838.29" y="1006.52" width="17.353" height="644.204" style="fill:white;fill-opacity:0.7;" />
</g> </g>
<path d="M1944.68,934.772C1921.09,896.523 1932.18,782.181 1974.56,655.531C1990.23,608.676 2009.04,563.787 2029.1,525.376L2156.88,568.132C2149.78,610.876 2137.79,658.046 2122.11,704.901C2079.26,832.966 2018.43,931.728 1976.52,946.409L2085.08,568.504L1944.68,934.772Z" style="fill:white;fill-opacity:0.7;"/> <path d="M1944.68,934.772C1921.09,896.523 1932.18,782.181 1974.56,655.531C1990.23,608.676 2009.04,563.787 2029.1,525.376L2156.88,568.132C2149.78,610.876 2137.79,658.046 2122.11,704.901C2079.26,832.966 2018.43,931.728 1976.52,946.409L2085.08,568.504L1944.68,934.772Z" style="fill:white;fill-opacity:0.7;" />
</g> </g>
</g> </g>
</svg> </svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -4,62 +4,57 @@
<div class="max-w-screen-lg w-full"> <div class="max-w-screen-lg w-full">
<h1 class="h1">Ruderassistent</h1> <h1 class="h1">Ruderassistent</h1>
<div class="grid gap-3 my-5"> <div class="grid gap-3 my-5">
<div class="m-auto"> <div class="m-auto">
<a href="/planned" class="btn btn-primary flex items-center justify-center"> <a href="/planned"
{% include "includes/rowing-icon" %} class="btn btn-primary flex items-center justify-center">
<span class="text-xl px-3">Geplante Ausfahrten</span> {% include "includes/rowing-icon" %}
</a> <span class="text-xl px-3">Geplante Ausfahrten</span>
</div> </a>
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" </div>
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert"> role="alert">
<h2 class="h2">Nachrichten</h2> <h2 class="h2">Nachrichten</h2>
<div class="divide-y"> <div class="divide-y">
{% for notification in notifications %}
{% if not notification.read_at %}
<div class="relative flex justify-between items-center p-3">
<div class="grow me-4">
<small class="uppercase text-gray-600 dark:text-gray-100">
<strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }}
</small>
<div class="mt-1">
{{ notification.message }}
</div>
</div>
<div>
{% if not notification.read_at %}
<a href="/notification/{{ notification.id }}/read" class="inline-block">
<button class="btn btn-primary"
type="button">
&#10003;
<span class="sr-only">Notification gelesen</span>
</button>
</a>
{% endif %}
</div>
</div>
{% endif %}
{% endfor %}
</div>
<details class="py-3 bg-gray-200 dark:bg-primary-950 rounded-b-md">
<summary class="px-3">Vergangene Nachrichten</summary>
<div class="divide-y text-sm">
{% for notification in notifications %} {% for notification in notifications %}
{% if notification.read_at %} {% if not notification.read_at %}
<div class="p-3 relative"> <div class="relative flex justify-between items-center p-3">
<small class="uppercase text-gray-600 dark:text-gray-100"> <div class="grow me-4">
<strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }} <small class="uppercase text-gray-600 dark:text-gray-100">
</small> <strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }}
<div class="mt-1"> </small>
{{ notification.message }} <div class="mt-1">{{ notification.message }}</div>
</div> </div>
<div>
{% if not notification.read_at %}
<a href="/notification/{{ notification.id }}/read" class="inline-block">
<button class="btn btn-primary" type="button">
&#10003;
<span class="sr-only">Notification gelesen</span>
</button>
</a>
{% endif %}
</div>
</div> </div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div>
<details class="py-3 bg-gray-200 dark:bg-primary-950 rounded-b-md">
<summary class="px-3">Vergangene Nachrichten</summary>
<div class="divide-y text-sm">
{% for notification in notifications %}
{% if notification.read_at %}
<div class="p-3 relative">
<small class="uppercase text-gray-600 dark:text-gray-100">
<strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }}
</small>
<div class="mt-1">{{ notification.message }}</div>
</div>
{% endif %}
{% endfor %}
</div> </div>
</details> </details>
</div> </div>
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} {% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert"> role="alert">
<h2 class="h2">Ergo</h2> <h2 class="h2">Ergo</h2>
@ -71,8 +66,8 @@
</ul> </ul>
</div> </div>
</div> </div>
{% endif %} {% 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 %} {% 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="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert"> role="alert">
<h2 class="h2">Aktives Vereinsmitglied</h2> <h2 class="h2">Aktives Vereinsmitglied</h2>
@ -97,8 +92,8 @@
</li> </li>
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
{% if "scheckbuch" in loggedin_user.roles %} {% if "scheckbuch" in loggedin_user.roles %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert"> role="alert">
<h2 class="h2">Scheckbuch</h2> <h2 class="h2">Scheckbuch</h2>
@ -108,39 +103,43 @@
</li> </li>
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
{% if "schnupper-betreuer" in loggedin_user.roles %} {% if "schnupper-betreuer" in loggedin_user.roles %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert"> role="alert">
<h2 class="h2">Schnupper-Betreuer</h2> <h2 class="h2">Schnupper-Betreuer</h2>
<ul class="list-none ms-2 divide-y divide-gray-200 dark:divide-primary-600"> <ul class="list-none ms-2 divide-y divide-gray-200 dark:divide-primary-600">
<li class="py-1"> <li class="py-1">
<a href="/admin/schnupper" class="block w-100 py-2 hover:text-primary-600">Schnuppern</a> <a href="/admin/schnupper"
class="block w-100 py-2 hover:text-primary-600">Schnuppern</a>
</li> </li>
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
{% if "Vorstand" in loggedin_user.roles %} {% if "Vorstand" in loggedin_user.roles %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert"> role="alert">
<h2 class="h2">Vorstand</h2> <h2 class="h2">Vorstand</h2>
<ul class="list-none ms-2 divide-y divide-gray-200 dark:divide-primary-600"> <ul class="list-none ms-2 divide-y divide-gray-200 dark:divide-primary-600">
<li class="py-1"> <li class="py-1">
<a href="/admin/user/fees" class="block w-100 py-2 hover:text-primary-600">Übersicht User Gebühren</a> <a href="/admin/user/fees"
class="block w-100 py-2 hover:text-primary-600">Übersicht User Gebühren</a>
</li> </li>
<li class="py-1"> <li class="py-1">
<a href="/admin/user/scheckbuch" class="block w-100 py-2 hover:text-primary-600">Scheckbuch</a> <a href="/admin/user/scheckbuch"
class="block w-100 py-2 hover:text-primary-600">Scheckbuch</a>
</li> </li>
<li class="py-1"> <li class="py-1">
<a href="/admin/user" class="block w-100 py-2 hover:text-primary-600">User</a> <a href="/admin/user" class="block w-100 py-2 hover:text-primary-600">User</a>
</li> </li>
<li class="py-1"> <li class="py-1">
<a href="/board/boathouse" class="block w-100 py-2 hover:text-primary-600">Bootshaus</a> <a href="/board/boathouse"
class="block w-100 py-2 hover:text-primary-600">Bootshaus</a>
</li> </li>
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
{% if "admin" in loggedin_user.roles %} {% if "admin" in loggedin_user.roles %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert"> role="alert">
<h2 class="h2">Admin</h2> <h2 class="h2">Admin</h2>
@ -162,7 +161,7 @@
</li> </li>
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert"> role="alert">
<h2 class="h2">Allgemein</h2> <h2 class="h2">Allgemein</h2>
@ -175,6 +174,6 @@
</li> </li>
</ul> </ul>
</div> </div>
</div>
</div> </div>
</div> {% endblock content %}
{% endblock content %}