Reformat statistics template

This commit is contained in:
Alexis Métaireau 2024-12-26 08:46:44 +01:00
parent 5bb311ecc2
commit 13fbeecc43
No known key found for this signature in database
GPG key ID: 1C21B876828E5FF2

View file

@ -1,40 +1,48 @@
{% extends "sidebar_table_layout.html" %} {% extends "sidebar_table_layout.html" %} {% block sidebar %}
<div id="table_overflow" class="statistics mr-md-n3">
{% block sidebar %} {{ balance_table(show_weight=False, show_header=True) }}
<div id="table_overflow" class="statistics mr-md-n3"> </div>
{{ balance_table(show_weight=False, show_header=True) }} {% endblock %} {% block content %}
</div> <div class="d-flex flex-column">
{% endblock %} <table id="bill_table" class="split_bills table table-striped ml-md-n3">
<thead>
<tr>
{% block content %} <th class="d-md-none">{{ _("Who?") }}</th>
<div class="d-flex flex-column"> <th>{{ _("Paid") }}</th>
<table id="bill_table" class="split_bills table table-striped ml-md-n3"> <th>{{ _("Expenses") }}</th>
<thead><tr><th class="d-md-none">{{ _("Who?") }}</th><th>{{ _("Paid") }}</th><th>{{ _("Expenses") }}</th><th>{{ _("Transferred") }}</th><th>{{ _("Received") }}</th></tr></thead> <th>{{ _("Transferred") }}</th>
<tbody> <th>{{ _("Received") }}</th>
{% for stat in members_stats|sort(attribute='member.name') %} </tr>
<tr> </thead>
<td class="d-md-none">{{ stat.member.name }}</td> <tbody>
<td>{{ stat.paid|currency }}</td> {% for stat in members_stats|sort(attribute='member.name') %}
<td>{{ stat.spent|currency }}</td> <tr>
<td>{{ stat.transferred|currency }}</td> <td class="d-md-none">{{ stat.member.name }}</td>
<td>{{ stat.received|currency }}</td> <td>{{ stat.paid|currency }}</td>
</tr> <td>{{ stat.spent|currency }}</td>
{% endfor %} <td>{{ stat.transferred|currency }}</td>
</tbody> <td>{{ stat.received|currency }}</td>
</table> </tr>
<h2>{{ _("Expenses by month") }}</h2> {% endfor %}
<table id="monthly_stats" class="table table-striped"> </tbody>
<thead><tr><th>{{ _("Period") }}</th><th>{{ _("Expenses") }}</th></tr></thead> </table>
<tbody> <h2>{{ _("Expenses by month") }}</h2>
{% for month in months %} <table id="monthly_stats" class="table table-striped">
<tr> <thead>
<td>{{ month|dateformat("MMMM yyyy") }}</td> <tr>
<td>{{ monthly_stats[month.year][month.month]|currency }}</td> <th>{{ _("Period") }}</th>
</tr> <th>{{ _("Expenses") }}</th>
{% endfor %} </tr>
</tbody> </thead>
</table> <tbody>
</div> {% for month in months %}
<tr>
<td>{{ month|dateformat("MMMM yyyy") }}</td>
<td>{{ monthly_stats[month.year][month.month]|currency }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %} {% endblock %}