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

@ -55,9 +55,7 @@
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
</a>
{% endif %} {% endif %}
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} {% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
<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>
@ -96,8 +94,8 @@
</div> </div>
</header> </header>
<div class="h-8"></div> <div class="h-8"></div>
{% endmacro header %} {% 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='') %} {% 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 }}"> <div class="{{ wrapper_class }}">
<label for="{{ name }}" <label for="{{ name }}"
class="{% if hide_label %} sr-only {% else %} text-sm text-gray-600 dark:text-white {% endif %}"> class="{% if hide_label %} sr-only {% else %} text-sm text-gray-600 dark:text-white {% endif %}">
@ -117,8 +115,8 @@
{% if pattern %}pattern="{{ pattern }}"{% endif %} {% if pattern %}pattern="{{ pattern }}"{% endif %}
{% if readonly %}readonly{% endif %}> {% if readonly %}readonly{% endif %}>
</div> </div>
{% endmacro input %} {% endmacro input %}
{% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %} {% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %}
<label for="{{ name }}{{ id }}" <label for="{{ name }}{{ id }}"
class="flex items-center cursor-pointer text-black dark:text-white hover:text-gray-900 dark:hover:text-gray-100 {{ class }}"> class="flex items-center cursor-pointer text-black dark:text-white hover:text-gray-900 dark:hover:text-gray-100 {{ class }}">
<input type="checkbox" <input type="checkbox"
@ -129,8 +127,8 @@
class="h-4 w-4 accent-primary-600 dark:accent-primary-200 mr-2" /> class="h-4 w-4 accent-primary-600 dark:accent-primary-200 mr-2" />
{{ label }} {{ label }}
</label> </label>
{% endmacro checkbox %} {% endmacro checkbox %}
{% macro select(label, data, name='trip_type', default='', id='', selected_id='', display='', extras='', class='', wrapper_class='', required=false, show_seats=false, new_last_entry='') %} {% 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="{{ wrapper_class }}"> <div class="{{ wrapper_class }}">
<label for="{{ name }}" class="text-sm text-gray-600 dark:text-gray-100">{{ label }}</label> <label for="{{ name }}" class="text-sm text-gray-600 dark:text-gray-100">{{ label }}</label>
{% if display == '' %} {% if display == '' %}
@ -155,11 +153,11 @@
{% if new_last_entry %}<option value="-1">{{ new_last_entry }}</option>{% endif %} {% if new_last_entry %}<option value="-1">{{ new_last_entry }}</option>{% endif %}
</select> </select>
</div> </div>
{% endmacro select %} {% endmacro select %}
{% macro alert(message, type, class='') %} {% macro alert(message, type, class='') %}
<div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">{{ message }}</div> <div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">{{ message }}</div>
{% endmacro alert %} {% 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) %} {% 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"> <div class="text-{{ color }} bg-{{ bg }} text-center p-1 mt-1 rounded-t-md">
{{ header }} {{ header }}
{{ empty_seats }} {{ empty_seats }}
@ -184,10 +182,10 @@
{{ text }} {{ text }}
{% endif %} {% endif %}
</div> </div>
{% endmacro box %} {% endmacro box %}
{% macro faq(question, answer) %} {% macro faq(question, answer) %}
<div> <div>
<h2 class="flex mb-4 text-lg font-bold text-primary-900">{{ question }}</h2> <h2 class="flex mb-4 text-lg font-bold text-primary-900">{{ question }}</h2>
<p class="text-primary-950">{{ answer | safe }}</p> <p class="text-primary-950">{{ answer | safe }}</p>
</div> </div>
{% endmacro faq %} {% 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

@ -5,7 +5,8 @@
<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"
class="btn btn-primary flex items-center justify-center">
{% include "includes/rowing-icon" %} {% include "includes/rowing-icon" %}
<span class="text-xl px-3">Geplante Ausfahrten</span> <span class="text-xl px-3">Geplante Ausfahrten</span>
</a> </a>
@ -21,15 +22,12 @@
<small class="uppercase text-gray-600 dark:text-gray-100"> <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") }} <strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }}
</small> </small>
<div class="mt-1"> <div class="mt-1">{{ notification.message }}</div>
{{ notification.message }}
</div>
</div> </div>
<div> <div>
{% if not notification.read_at %} {% if not notification.read_at %}
<a href="/notification/{{ notification.id }}/read" class="inline-block"> <a href="/notification/{{ notification.id }}/read" class="inline-block">
<button class="btn btn-primary" <button class="btn btn-primary" type="button">
type="button">
&#10003; &#10003;
<span class="sr-only">Notification gelesen</span> <span class="sr-only">Notification gelesen</span>
</button> </button>
@ -40,7 +38,6 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
<details class="py-3 bg-gray-200 dark:bg-primary-950 rounded-b-md"> <details class="py-3 bg-gray-200 dark:bg-primary-950 rounded-b-md">
<summary class="px-3">Vergangene Nachrichten</summary> <summary class="px-3">Vergangene Nachrichten</summary>
<div class="divide-y text-sm"> <div class="divide-y text-sm">
@ -50,9 +47,7 @@
<small class="uppercase text-gray-600 dark:text-gray-100"> <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") }} <strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }}
</small> </small>
<div class="mt-1"> <div class="mt-1">{{ notification.message }}</div>
{{ notification.message }}
</div>
</div> </div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
@ -115,7 +110,8 @@
<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>
@ -126,16 +122,19 @@
<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>
@ -177,4 +176,4 @@
</div> </div>
</div> </div>
</div> </div>
{% endblock content %} {% endblock content %}