staging #342

Merged
philipp merged 3 commits from staging into main 2024-04-06 18:29:29 +02:00
2 changed files with 50 additions and 18 deletions
Showing only changes of commit 85a61dfdc0 - Show all commits

View File

@ -52,6 +52,10 @@ impl BoatStat {
let name: String = row.get("name");
let location: String = row.get("location");
let year: i32 = row.get("year");
if year == 0 {
continue; // Boat still on water
}
if !years.contains(&year) {
years.push(year);
}

View File

@ -1,8 +1,24 @@
{% import "includes/macros" as macros %}
{% extends "base" %}
{% block content %}
<style>
.dt-input {
color: black;
}
.dt-selector {
width: 70px;
}
.dt-table th{
min-width: 100px;
}
.dt-table td {
border: 1px gray solid;
}
}
</style>
<div class="max-w-screen-lg w-full">
<h1 class="h1">Bootsauswertung</h1>
<div class="text-black dark:text-white">
<table id="basic">
<thead>
<tr>
@ -18,7 +34,11 @@
<td>{{ boat.location }}</td>
{% for year in stat.pot_years | sort | reverse %}
<td>
{% if year~'' in boat.years %}{{ boat.years[year] }}{% endif %}
{% if year~'' in boat.years %}
{{ boat.years[year] }}
{% else %}
0
{% endif %}
</td>
{% endfor %}
</tr>
@ -26,6 +46,14 @@
</tbody>
</table>
</div>
</div>
<script src="/public/jstable.min.js"></script>
<script>new JSTable("#basic");</script>
{% endblock content %}
<script>new JSTable("#basic", {
perPage: 100,
perPageSelect: [10,100],
labels: {
placeholder: 'Suchen (zB "Linz")'
}
});
</script>
{% endblock content %}