fancier boat stats
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
<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> • {{ notification.created_at | date(timezone="Europe/Vienna", format="%d.%m.%Y %H:%M", ) }}
|
||||
<strong>{{ notification.category }}</strong> • {{ notification.created_at | date(timezone="Europe/Vienna", format="%d.%m.%Y %H:%M",) }}
|
||||
</small>
|
||||
<div class="mt-1">{{ notification.message }}</div>
|
||||
</div>
|
||||
|
@ -3,38 +3,29 @@
|
||||
{% block content %}
|
||||
<div class="max-w-screen-lg w-full">
|
||||
<h1 class="h1">Bootsauswertung</h1>
|
||||
<div class="search-wrapper">
|
||||
<label for="name" class="sr-only">Suche</label>
|
||||
<input type="search"
|
||||
name="name"
|
||||
id="filter-js"
|
||||
class="search-bar"
|
||||
placeholder="Suchen nach Bootsnamen...">
|
||||
<table id="basic">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Ort</th>
|
||||
{% for year in stat.pot_years | sort | reverse %}<th>{{ year }}</th>{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for boat in stat.boats %}
|
||||
<tr>
|
||||
<td>{{ boat.name }}</td>
|
||||
<td>{{ boat.location }}</td>
|
||||
{% for year in stat.pot_years | sort | reverse %}
|
||||
<td>
|
||||
{% if year~'' in boat.years %}{{ boat.years[year] }}{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="filter-result-js" class="search-result"></div>
|
||||
<div class="border-r border-l border-gray-200 dark:border-primary-600">
|
||||
{% set_global km = 0 %}
|
||||
{% set_global index = 1 %}
|
||||
{% for s in stat %}
|
||||
<div class="border-t border-gray-200 dark:border-primary-600 {% if loop.last %}border-b{% endif %} bg-white dark:bg-primary-900 text-black dark:text-white flex justify-between items-center px-3 py-1"
|
||||
data-filterable="true"
|
||||
data-filter="{{ s.name }}">
|
||||
<span class="text-sm text-gray-600 dark:text-gray-100 w-10">
|
||||
{% if km != s.rowed_km %}
|
||||
{{ loop.index }}
|
||||
{% set_global index = loop.index %}
|
||||
{% else %}
|
||||
{{ index }}
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="grow">{{ s.name }}</span>
|
||||
<span>{{ s.rowed_km }}
|
||||
km</span>
|
||||
{% set_global km = s.rowed_km %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="container" class="w-full"></div>
|
||||
</div>
|
||||
<script src="/public/logbook.js"></script>
|
||||
{% endblock content %}
|
||||
<script src="/public/jstable.min.js"></script>
|
||||
<script>new JSTable("#basic");</script>
|
||||
{% endblock content %}
|
||||
|
Reference in New Issue
Block a user