forked from Ruderverein-Donau-Linz/rowt
		
	Merge branch 'main' of gitlab.com:PhilippHofer/rot
This commit is contained in:
		@@ -1,6 +1,11 @@
 | 
			
		||||
# TODO
 | 
			
		||||
- [ ] Allow sign-outs only >2h before event
 | 
			
		||||
 | 
			
		||||
# Icons
 | 
			
		||||
- Regatta: 🏅
 | 
			
		||||
- Lange Ausfahrt: 💪
 | 
			
		||||
- Wanderfahrt: ⛱
 | 
			
		||||
 | 
			
		||||
# Notes / Bugfixes
 | 
			
		||||
- [] delete flag user administration
 | 
			
		||||
- [] max_people = 0 -> Rot hervorheben, dass Ausfahrt abgesagt wurde?
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										0
									
								
								templates/dynamics/popup.html.tera
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								templates/dynamics/popup.html.tera
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										17
									
								
								templates/dynamics/sidebar.html.tera
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								templates/dynamics/sidebar.html.tera
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
<div class="sidebar slide-in from-right" id="sidebar" aria-modal="false">
 | 
			
		||||
    <div class="bg-primary-900 text-white px-2 py-3 flex justify-between sidebar-header">
 | 
			
		||||
        <div>
 | 
			
		||||
        <span class="ps-1 header-js">
 | 
			
		||||
            Überschrift  (wird ersetzt)
 | 
			
		||||
        </span>
 | 
			
		||||
        </div>
 | 
			
		||||
        <button type="button" title="Ausfahrt erstellen schließen" class="sidebar-close border-0 bg-primary-100 focus:bg-primary-50 text-black flex items-center justify-center transform rotate-45"
 | 
			
		||||
        data-trigger="sidebar">
 | 
			
		||||
        {% include "includes/plus-icon" %}
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="body-js px-2 pt-2" style="margin-top: 63px; margin-bottom: 157px">
 | 
			
		||||
        Formular wird ersetzt
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="sidebar-overlay" data-trigger="sidebar"></div>
 | 
			
		||||
							
								
								
									
										14
									
								
								templates/forms/event.html.tera
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								templates/forms/event.html.tera
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
{% import "includes/macros" as macros %}
 | 
			
		||||
 | 
			
		||||
<div class="hidden">
 | 
			
		||||
  <form action="/admin/planned-event" method="post" class="grid gap-3" id="addEventForm">
 | 
			
		||||
    <input class="day-js" type="hidden" name="day" value="" />
 | 
			
		||||
    {{ macros::input(label='Titel (z.B. Firmenrudern)', name='name', type='input', required=true) }}
 | 
			
		||||
    {{ macros::input(label='Startzeit', name='planned_starting_time', type='time', required=true) }}
 | 
			
		||||
    {{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', required=true, min='0') }}
 | 
			
		||||
    {{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='max_people', type='number', required=true, min='0') }}
 | 
			
		||||
    {{ macros::checkbox(label='Gäste erlauben', name='max_allow_guestspeople') }}
 | 
			
		||||
    {{ macros::input(label='Anmerkungen', name='notes', type='input') }}
 | 
			
		||||
    <input value="Erstellen" class="w-full btn btn-primary" type="submit" />
 | 
			
		||||
  </form>
 | 
			
		||||
</div>
 | 
			
		||||
							
								
								
									
										11
									
								
								templates/forms/trip.html.tera
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								templates/forms/trip.html.tera
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
{% import "includes/macros" as macros %}
 | 
			
		||||
 | 
			
		||||
<div class="hidden">
 | 
			
		||||
    <form action="/cox/trip" method="post" class="grid gap-3" id="sidebarForm">
 | 
			
		||||
        <input class="day-js" type="hidden" name="day" value="" />
 | 
			
		||||
        {{ macros::input(label='Startzeit (zB "10:00")', name='planned_starting_time', type='time', required=true) }}
 | 
			
		||||
        {{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='max_people', type='number', required=true, min='0') }}
 | 
			
		||||
        {{ macros::input(label='Anmerkungen', name='notes', type='input') }}
 | 
			
		||||
        <input value="Erstellen" class="w-full btn btn-primary" type="submit" />
 | 
			
		||||
    </form>
 | 
			
		||||
</div>
 | 
			
		||||
							
								
								
									
										16
									
								
								templates/includes/buttons.html.tera
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								templates/includes/buttons.html.tera
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
{% if loggedin_user.is_cox %}
 | 
			
		||||
<div class="sm:col-span-2 lg:col-span-3 grid md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3">
 | 
			
		||||
  <button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-days" id="filterdays-js" aria-pressed="false">
 | 
			
		||||
    {% include "includes/funnel-icon" %}
 | 
			
		||||
    Tage mit Ausfahrten
 | 
			
		||||
  </button>
 | 
			
		||||
  <button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-coxs" id="filtertrips-js" aria-pressed="false">
 | 
			
		||||
    {% include "includes/funnel-icon" %}
 | 
			
		||||
    Steuerleute gesucht
 | 
			
		||||
  </button>
 | 
			
		||||
  <button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-months" id="filtermonth-js" aria-pressed="false" data-month="{{ now() | date(format='%m') }}">
 | 
			
		||||
    {% include "includes/funnel-icon" %}
 | 
			
		||||
    Aktuellen Monat anzeigen
 | 
			
		||||
  </button>
 | 
			
		||||
</div>
 | 
			
		||||
{% endif %}
 | 
			
		||||
@@ -46,7 +46,7 @@
 | 
			
		||||
<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 }} <span class="hidden">(angemeldet seit {{ rower.registered_at }})</span><br />
 | 
			
		||||
      {{ rower.name }} {% if rower.is_guest %} <small class="text-muted">(Gast)</small> {% endif %}<span class="hidden">(angemeldet seit {{ rower.registered_at }})</span><br />
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
  {% else %}
 | 
			
		||||
    {{ text }}
 | 
			
		||||
 
 | 
			
		||||
@@ -10,22 +10,7 @@
 | 
			
		||||
 | 
			
		||||
  <h1 class="h1 sm:col-span-2 lg:col-span-3">Ausfahrten</h1>
 | 
			
		||||
 | 
			
		||||
  {% if loggedin_user.is_cox %}
 | 
			
		||||
    <div class="sm:col-span-2 lg:col-span-3 grid md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3">
 | 
			
		||||
      <button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-days" id="filterdays-js" aria-pressed="false">
 | 
			
		||||
        {% include "includes/funnel-icon" %}
 | 
			
		||||
        Tage mit Ausfahrten
 | 
			
		||||
      </button>
 | 
			
		||||
      <button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-coxs" id="filtertrips-js" aria-pressed="false">
 | 
			
		||||
        {% include "includes/funnel-icon" %}
 | 
			
		||||
        Steuerleute gesucht
 | 
			
		||||
      </button>
 | 
			
		||||
      <button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-months" id="filtermonth-js" aria-pressed="false" data-month="{{ now() | date(format='%m') }}">
 | 
			
		||||
        {% include "includes/funnel-icon" %}
 | 
			
		||||
        Aktuellen Monat anzeigen
 | 
			
		||||
      </button>
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% include "includes/buttons" %}
 | 
			
		||||
 | 
			
		||||
  {% for day in days %}
 | 
			
		||||
  {% set amount_trips = day.planned_events | length + day.trips | length %}
 | 
			
		||||
@@ -253,51 +238,8 @@
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
{# --- START Add Trip Sidebar --- #}
 | 
			
		||||
<div class="sidebar slide-in from-right" id="sidebar" aria-modal="false">
 | 
			
		||||
  <div class="bg-primary-900 text-white px-2 py-3 flex justify-between sidebar-header">
 | 
			
		||||
    <div>
 | 
			
		||||
      <span class="ps-1 header-js">
 | 
			
		||||
        Überschrift  (wird ersetzt)
 | 
			
		||||
      </span>
 | 
			
		||||
    </div>
 | 
			
		||||
    <button type="button" title="Ausfahrt erstellen schließen" class="sidebar-close border-0 bg-primary-100 focus:bg-primary-50 text-black flex items-center justify-center transform rotate-45"
 | 
			
		||||
      data-trigger="sidebar">
 | 
			
		||||
      {% include "includes/plus-icon" %}
 | 
			
		||||
    </button>
 | 
			
		||||
  </div>
 | 
			
		||||
  <div class="body-js px-2 pt-2" style="margin-top: 63px; margin-bottom: 157px">
 | 
			
		||||
      Formular wird ersetzt
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
<div class="sidebar-overlay" data-trigger="sidebar"></div>
 | 
			
		||||
{# --- END Add Trip Sidebar --- #}
 | 
			
		||||
 | 
			
		||||
{# --- START Form Add Trip --- #}
 | 
			
		||||
<div class="hidden">
 | 
			
		||||
  <form action="/cox/trip" method="post" class="grid gap-3" id="sidebarForm">
 | 
			
		||||
    <input class="day-js" type="hidden" name="day" value="" />
 | 
			
		||||
    {{ macros::input(label='Startzeit (zB "10:00")', name='planned_starting_time', type='time', required=true) }}
 | 
			
		||||
    {{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='max_people', type='number', required=true, min='0') }}
 | 
			
		||||
    {{ macros::input(label='Anmerkungen', name='notes', type='input') }}
 | 
			
		||||
    <input value="Erstellen" class="w-full btn btn-primary" type="submit" />
 | 
			
		||||
  </form>
 | 
			
		||||
</div>
 | 
			
		||||
{# --- END Form Add Trip --- #}
 | 
			
		||||
 | 
			
		||||
{# --- START Form Add Event --- #}
 | 
			
		||||
<div class="hidden">
 | 
			
		||||
  <form action="/admin/planned-event" method="post" class="grid gap-3" id="addEventForm">
 | 
			
		||||
    <input class="day-js" type="hidden" name="day" value="" />
 | 
			
		||||
    {{ macros::input(label='Titel (z.B. Firmenrudern)', name='name', type='input', required=true) }}
 | 
			
		||||
    {{ macros::input(label='Startzeit', name='planned_starting_time', type='time', required=true) }}
 | 
			
		||||
    {{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', required=true, min='0') }}
 | 
			
		||||
    {{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='max_people', type='number', required=true, min='0') }}
 | 
			
		||||
    {{ macros::checkbox(label='Gäste erlauben', name='max_allow_guestspeople') }}
 | 
			
		||||
    {{ macros::input(label='Anmerkungen', name='notes', type='input') }}
 | 
			
		||||
    <input value="Erstellen" class="w-full btn btn-primary" type="submit" />
 | 
			
		||||
  </form>
 | 
			
		||||
</div>
 | 
			
		||||
{# --- END Form Add Event --- #}
 | 
			
		||||
{% include "dynamics/sidebar" %}
 | 
			
		||||
{% include "forms/trip" %}
 | 
			
		||||
{% include "forms/event" %}
 | 
			
		||||
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user