This commit is contained in:
philipp 2023-04-06 18:58:12 +02:00
commit 932a66bdbb
5 changed files with 11 additions and 13 deletions

View File

@ -2,8 +2,6 @@
- [ ] Allow sign-outs only >2h before event - [ ] Allow sign-outs only >2h before event
# Notes / Bugfixes # Notes / Bugfixes
- [ ] User loggedin status not present on user admin interface (header/footer not rendering) [ph]
- [ ] Mobile Breakpoint: Add user broken user admin interface [mb]
# Frontend Process # Frontend Process
´cd frontend´ ´cd frontend´

View File

@ -6,7 +6,7 @@
<div class="max-w-screen-lg w-full"> <div class="max-w-screen-lg w-full">
<h1 class="text-center text-3xl uppercase tracking-wide font-bold text-primary-900">Users</h1> <h1 class="text-center text-3xl uppercase tracking-wide font-bold text-primary-900">Users</h1>
<form action="/admin/user/new" method="post" class="mt-4 bg-primary-900 rounded-md text-white px-3 pb-3 pt-2 flex items-end md:items-center justify-between"> <form action="/admin/user/new" method="post" class="mt-4 bg-primary-900 rounded-md text-white px-3 pb-3 pt-2 sm:flex items-end justify-between">
<div class="w-full"> <div class="w-full">
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neuen User hinzufügen</h2> <h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neuen User hinzufügen</h2>
<div class="grid md:grid-cols-3"> <div class="grid md:grid-cols-3">
@ -19,8 +19,8 @@
</div> </div>
</div> </div>
</div> </div>
<div> <div class="text-right">
<input value="Hinzufügen" type="submit" class="w-28 rounded-md bg-primary-500 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"/> <input value="Hinzufügen" type="submit" class="w-28 mt-2 sm:mt-0 rounded-md bg-primary-500 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"/>
</div> </div>
</form> </form>
@ -37,9 +37,9 @@
<input type="hidden" name="id" value="{{ user.id }}" /> <input type="hidden" name="id" value="{{ user.id }}" />
<div class="font-bold mb-1">{{ user.name }}</div> <div class="font-bold mb-1">{{ user.name }}</div>
<div class="grid md:grid-cols-3"> <div class="grid md:grid-cols-3">
<label for="is_guest{{ loop.index }}" class="flex items-center cursor-pointer hover:text-gray-900"><input type="checkbox" id="is_guest{{ loop.index }}" name="is_guest" {% if user.is_guest %} checked="true"{% endif %} class="h-4 w-4 accent-primary-600 mr-2"/> Gast</label> {{ macros::checkbox(label='Gast', name='is_guest' ~ loop.index , checked=user.is_guest) }}
<label for="is_cox{{ loop.index }}" class="flex items-center cursor-pointer hover:text-gray-900"><input type="checkbox" id="is_cox{{ loop.index }}" name="is_cox" {% if user.is_cox %} checked="true"{% endif %} class="h-4 w-4 accent-primary-600 mr-2"/> Steuerberechtigter</label> {{ macros::checkbox(label='Steuerberechtigter', name='is_cox' ~ loop.index , checked=user.is_cox) }}
<label for="is_admin{{ loop.index }}" class="flex items-center cursor-pointer hover:text-gray-900"><input type="checkbox" id="is_admin{{ loop.index }}" name="is_admin" {% if user.is_admin %} checked="true"{% endif %} class="h-4 w-4 accent-primary-600 mr-2"/> Admin</label> {{ macros::checkbox(label='Admin', name='is_admin' ~ loop.index , checked=user.is_admin) }}
</div> </div>
{% if user.pw %} {% if user.pw %}
<a class="inline-block mt-1 text-primary-600 hover:text-primary-900 underline" href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a> <a class="inline-block mt-1 text-primary-600 hover:text-primary-900 underline" href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a>

View File

@ -1,5 +1,5 @@
<footer class="bg-primary-950 text-white w-full flex justify-center p-3"> <footer class="bg-primary-950 text-white w-full flex justify-center p-3">
<div class="max-w-screen-lg w-full flex justify-between"> <div class="max-w-screen-xl w-full flex justify-between">
<div> <div>
<span class="text-[#ff0000]">&hearts;</span> ASKÖ Ruderverein Donau Linz <span class="text-[#ff0000]">&hearts;</span> ASKÖ Ruderverein Donau Linz
</div> </div>

View File

@ -1,6 +1,6 @@
{% macro header(loggedin_user) %} {% macro header(loggedin_user) %}
<header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full"> <header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full">
<div class="max-w-screen-lg w-full flex justify-between"> <div class="max-w-screen-xl w-full flex justify-between">
<div> <div>
Hallo {{ loggedin_user.name }} Hallo {{ loggedin_user.name }}
</div> </div>

View File

@ -3,7 +3,7 @@
{% extends "base" %} {% extends "base" %}
{% block content %} {% block content %}
<div class="max-w-screen-lg w-full grid sm:grid-cols-2 lg:grid-cols-3 gap-4"> <div class="max-w-screen-xl w-full grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
{% if flash %} {% if flash %}
{% if flash.0 == "success" %} {% if flash.0 == "success" %}
<div class="sm:col-span-2 lg:col-span-3 bg-[#4ade80] text-white px-3 py-1 rounded-md text-center"> <div class="sm:col-span-2 lg:col-span-3 bg-[#4ade80] text-white px-3 py-1 rounded-md text-center">
@ -94,7 +94,7 @@
<div class="p-2 border border-t-0 border-primary-100 mb-4 rounded-b-md"> <div class="p-2 border border-t-0 border-primary-100 mb-4 rounded-b-md">
{% if planned_event.rower | length > 0 %} {% if planned_event.rower | length > 0 %}
{% for rower in planned_event.rower %} {% for rower in planned_event.rower %}
{{ rower.name }} <span class="hidden">(angemeldet seit {{ rower.registered_at }})</span> {{ rower.name }} <span class="hidden">(angemeldet seit {{ rower.registered_at }})</span><br/>
{% endfor %} {% endfor %}
{% else %} {% else %}
Keine Ruderer angemeldet Keine Ruderer angemeldet
@ -161,7 +161,7 @@
<div class="p-2 border border-t-0 border-primary-100 mb-4 rounded-b-md"> <div class="p-2 border border-t-0 border-primary-100 mb-4 rounded-b-md">
{% if trip.rower | length > 0 %} {% if trip.rower | length > 0 %}
{% for rower in trip.rower %} {% for rower in trip.rower %}
{{ rower.name }} <span class="hidden">(angemeldet seit {{ rower.registered_at }})</span> {{ rower.name }} <span class="hidden">(angemeldet seit {{ rower.registered_at }})</span><br/>
{% endfor %} {% endfor %}
{% else %} {% else %}
Keine Ruderer angemeldet Keine Ruderer angemeldet