clean repo
This commit is contained in:
@ -1,82 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<!-- Basic Page Needs
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<meta charset="utf-8">
|
||||
<title>Ro(wing)T(rips)</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- Mobile Specific Metas
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- CSS
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link rel="stylesheet" href="/public/css/normalize.css">
|
||||
<link rel="stylesheet" href="/public/css/skeleton.css">
|
||||
<style>
|
||||
.button{
|
||||
font-size: 25px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Favicon
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<link rel="icon" type="image/png" href="public/images/favicon.png">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
{% if user %}
|
||||
<div class="bg-gray p-1 mb-3">
|
||||
<div class="container content-center-end">
|
||||
{% if user.is_admin %}
|
||||
<a class="button mb-0 mr-2" href="/">🚣</a>
|
||||
<a class="button mb-0 mr-2" href="/user">👥</a>
|
||||
{% endif %}
|
||||
<a class="button button-primary mb-0 font-base light" href="/logout">LOGOUT</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Primary Page Layout
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<div class="container">
|
||||
{% if flash %}
|
||||
{% if flash.0 == "success" %}
|
||||
<div class="row">
|
||||
<div class="one-column p-1 text-white bg-green mb-3 light text-center">
|
||||
{{ flash.1 }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if flash.0 == "error" %}
|
||||
<div class="row">
|
||||
<div class="one-column p-1 text-white bg-red mb-3 bold text-center">
|
||||
{{ flash.1 }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
{% block content %}
|
||||
|
||||
{% endblock content %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- End Document
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -1,204 +0,0 @@
|
||||
{% extends "base" %}
|
||||
{% block content %}
|
||||
|
||||
<h1 class="bold">Ausfahrten</h1>
|
||||
{% for day_with_trip in data %}
|
||||
{% set day = day_with_trip.day %}
|
||||
{% set day_string = day.day | date(format="%Y-%m-%d") %}
|
||||
{% set_global default_trips = [] %}
|
||||
{% set_global indep_trips = [] %}
|
||||
{% for trip in day_with_trip.trips %}
|
||||
{% if trip.trip.begin or trip.trip.cox_id %}
|
||||
{% set_global indep_trips = indep_trips | concat(with=trip) %}
|
||||
{% else %}
|
||||
{% set_global default_trips = default_trips | concat(with=trip) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% set cox = default_trips | filter(attribute="user.is_cox", value=true) %}
|
||||
{% set amount_cox = cox | length %}
|
||||
{% set cox_needed = amount_cox < day.planned_amount_cox %}
|
||||
|
||||
<div class="bg-gray p-3 mb-1 data-block" data-needed="{{ cox_needed}}">
|
||||
<strong class="block">{{ day.day | date(format="%A, %d.%m.%Y", locale="de_AT")}}</strong>
|
||||
|
||||
{% if user.is_cox %}
|
||||
<details class="text-right">
|
||||
<summary class="button">NEUE AUSFAHRT</summary>
|
||||
<form method="post" class="text-left" action="/register">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
<input type="hidden" name="day" value="{{ day_string }}" />
|
||||
<div class="row content-align-bottom">
|
||||
<input class="u-full-width" type="hidden" id="name" name="name" value="{{ user.name }}" />
|
||||
<div class="six columns">
|
||||
<label for="time">Time</label>
|
||||
<input class="u-full-width" type="text" id="time" name="time" value="17:00" />
|
||||
</div>
|
||||
<div class="six columns">
|
||||
<input class="button-primary" type="submit" value="Speichern">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</details>
|
||||
{% endif %}
|
||||
{% if user.is_admin %}
|
||||
<details class="text-right" style="margin-top: -3rem;">
|
||||
<summary class="button">✎</summary>
|
||||
<form method="post" class="text-left" action="/day">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
<input type="hidden" name="day" value="{{ day_string }}" />
|
||||
<div class="row content-align-bottom">
|
||||
<div class="three columns">
|
||||
<label for="planned_amount_cox">Steuerpersonen</label>
|
||||
<input class="u-full-width" type="number" id="planned_amount_cox" name="planned_amount_cox" value="{{ day.planned_amount_cox }}">
|
||||
</div>
|
||||
<div class="three columns">
|
||||
<label for="planned_starting_time">Abfahrtszeit</label>
|
||||
<input class="u-full-width" type="time" id="planned_starting_time" name="planned_starting_time" value="{% if day.planned_starting_time %}{{ day.planned_starting_time }}{% else %}17:00{%endif%}">
|
||||
</div>
|
||||
<div class="three columns">
|
||||
<label for="open_registration">Registrierung offen</label>
|
||||
<input class="u-full-width" type="checkbox" id="open_registration" name="open_registration" {% if not day or day.open_registration %} checked="true" {% endif %}/>
|
||||
</div>
|
||||
<div class="three columns">
|
||||
<input class="button-primary" type="submit" value="Speichern">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</details>
|
||||
{% endif %}
|
||||
|
||||
{% if day.planned_amount_cox > 0%}
|
||||
{% set rowers = default_trips | filter(attribute="user.is_cox", value=false) | sort(attribute="trip.created") %}
|
||||
{% if cox_needed %}
|
||||
{% set cox_left = day.planned_amount_cox - amount_cox %}
|
||||
<div class="block text-red">Es {{ cox_left | pluralize(singular="wird", plural="werden")}} noch {{ cox_left }} Steuerperson{{ cox_left | pluralize(plural="en")}} gesucht!</div>
|
||||
{% endif %}
|
||||
{% set_global user_registered = false %}
|
||||
<strong class="block mt-1">Abfahrtszeit: {{ day.planned_starting_time }} Uhr</strong>
|
||||
|
||||
<div style="max-width: 75%">{{ default_trips | length }} angemeldete Person{{ default_trips | length | pluralize(plural="en") }}: {{ cox | length }} Steuerperson{{ cox | length | pluralize(plural="en") }} ({% for c in cox %}{{ c.user.name }} {% if c.user.name == user.name %}
|
||||
{% set_global user_registered = true %}
|
||||
<form method="post" action="/register">
|
||||
<input type="hidden" name="_method" value="delete" />
|
||||
<input type="hidden" name="id" value="{{ c.trip.id }}" />
|
||||
<input type="submit" value="Abmelden" style="float: left;" />
|
||||
</form>
|
||||
{% endif %} {% endfor %}), {{ rowers | length }} Ruderer:</div>
|
||||
|
||||
<ol style="max-width: 75%">
|
||||
{% for r in rowers %}
|
||||
<li>
|
||||
{{ r.user.name }} (angemeldet seit {{ r.trip.created | date(format="%d.%m. %H:%M", timezone="Europe/Vienna") }})
|
||||
{% if r.user.name == user.name %}
|
||||
{% set_global user_registered = true %}
|
||||
<form method="post" action="/register">
|
||||
<input type="hidden" name="_method" value="delete" />
|
||||
<input type="hidden" name="id" value="{{ r.trip.id }}" />
|
||||
<input type="submit" value="Abmelden" />
|
||||
|
||||
</form>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
{% if day.open_registration or user.is_cox %}
|
||||
{% if not user_registered or user.add_different_user %}
|
||||
<details class="text-right" style="margin-top: -6rem;">
|
||||
<summary class="button">+</summary>
|
||||
<form method="post" class="text-left" action="/register">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
<input type="hidden" name="day" value="{{ day_string }}" />
|
||||
<div class="row content-align-bottom">
|
||||
<div class="six columns">
|
||||
{% if user.add_different_user %}
|
||||
<label for="name">Name</label>
|
||||
<input class="u-full-width" type="text" id="name" name="name" value="{{ user.name }}" />
|
||||
{% else %}
|
||||
<input class="u-full-width" type="hidden" id="name" name="name" value="{{ user.name }}" />
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="six columns">
|
||||
<input class="button-primary" type="submit" value="Speichern">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</details>
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Anmeldung an diesem Tag leider nicht möglich (zB bei USI Kursen)
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for trip in indep_trips %}
|
||||
{% set_global user_registered = false %}
|
||||
{% if trip.trip.begin %}
|
||||
{{trip.user.name}} @ {{trip.trip.begin}}
|
||||
{% set rowers = indep_trips | filter(attribute="trip.cox_id", value=trip.trip.id) | sort(attribute="trip.created")%}
|
||||
{% if trip.user.name == user.name and rowers | length == 0 %}
|
||||
{% set_global user_registered = true %}
|
||||
<form method="post" action="/register">
|
||||
<input type="hidden" name="_method" value="delete" />
|
||||
<input type="hidden" name="id" value="{{ trip.trip.id }}" />
|
||||
<input type="submit" value="Abmelden" style="float: left;" />
|
||||
</form>
|
||||
{% endif %}
|
||||
:
|
||||
<ol>
|
||||
{% for r in rowers %}
|
||||
<li>
|
||||
{{ r.user.name }} (angemeldet seit {{ r.trip.created | date(format="%d.%m. %H:%M", timezone="Europe/Vienna") }})
|
||||
{% if r.user.name == user.name %}
|
||||
{% set_global user_registered = true %}
|
||||
<form method="post" action="/register">
|
||||
<input type="hidden" name="_method" value="delete" />
|
||||
<input type="hidden" name="id" value="{{ r.trip.id }}" />
|
||||
<input type="submit" value="Abmelden" />
|
||||
|
||||
</form>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% if not user_registered or user.add_different_user %}
|
||||
<details class="text-right">
|
||||
<summary class="button">+</summary>
|
||||
<form method="post" class="text-left" action="/register">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
<input type="hidden" name="day" value="{{ day_string }}" />
|
||||
<input type="hidden" name="cox_id" value="{{ trip.trip.id }}" />
|
||||
<div class="row content-align-bottom">
|
||||
<div class="six columns">
|
||||
|
||||
{% if user.add_different_user %}
|
||||
<label for="name">Name</label>
|
||||
<input class="u-full-width" type="text" id="name" name="name" value="{{ user.name }}" />
|
||||
{% else %}
|
||||
<input class="u-full-width" type="hidden" id="name" name="name" value="{{ user.name }}" />
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="six columns">
|
||||
<input class="button-primary" type="submit" value="Speichern">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</details>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if user.is_cox %}
|
||||
<a class="button button-primary light font-base mb-3" href="/?all">Alle heurigen Ausfahrten anzeigen</a>
|
||||
{% endif %}
|
||||
|
||||
{% endblock content %}
|
||||
|
@ -1,18 +0,0 @@
|
||||
{% extends "base" %}
|
||||
{% block content %}
|
||||
|
||||
<div class="content-center-all full-height">
|
||||
<form action="/name" method="post" class="p-3 bg-gray">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
|
||||
<label for="name">Bitte deinen Namen eingeben</label>
|
||||
<input type="text" class="w-full" id="name" name="name"/>
|
||||
|
||||
<label for="pw">(Optional) Passwort eingeben</label>
|
||||
<input type="password" class="w-full" id="pw" name="pw"/>
|
||||
|
||||
<input type="submit" class="button button-primary mb-0 d-block w-full b" value="Weiter"/>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,7 +0,0 @@
|
||||
<details>
|
||||
<summary class="button">+</summary>
|
||||
<form method="post" action="/register">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
|
||||
</form>
|
||||
</details>
|
@ -1,46 +0,0 @@
|
||||
{% extends "base" %}
|
||||
{% block content %}
|
||||
|
||||
<table class="u-full-width">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Pw</th>
|
||||
<th>Add Different User</th>
|
||||
<th>Cox</th>
|
||||
<th>Admin</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<form action="/user/{{ user.id }}" method="post">
|
||||
<input type="hidden" name="_method" value="put" />
|
||||
<td>{{user.name}}</td>
|
||||
<td>
|
||||
{% if user.pw %}
|
||||
<input type="checkbox" checked disabled>
|
||||
{% endif %}
|
||||
<input type="password" name="pw" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="add_different_user" {% if user.add_different_user %} checked="true"{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="is_cox" {% if user.is_cox %} checked="true"{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="is_admin" {% if user.is_admin %} checked="true"{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<input class="button-primary" type="submit" value="Speichern">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endblock content %}
|
||||
|
Reference in New Issue
Block a user