mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Some love for the dashboard view
This commit is contained in:
parent
800dcba2c8
commit
0fcc2c72ec
1 changed files with 14 additions and 13 deletions
|
@ -1,20 +1,21 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table id="bill_table" class="list_bills common-table zebra-striped">
|
<table id="bill_table" class="table table-striped">
|
||||||
<thead><tr><th>{{ _("Project") }}</th><th>{{ _("Number of members") }}</th><th>{{ _("Number of bills") }}</th><th>{{_("Newest bill")}}</th><th>{{_("Oldest bill")}}</th></tr></thead>
|
<thead><tr><th>{{ _("Project") }}</th><th>{{ _("Number of members") }}</th><th>{{ _("Number of bills") }}</th><th>{{_("Newest bill")}}</th><th>{{_("Oldest bill")}}</th></tr></thead>
|
||||||
<tbody>{% for project in projects %}
|
<tbody>{% for project in projects|sort(attribute='name') %}
|
||||||
<tr>
|
<tr class="{{ loop.cycle("odd", "even") }}">
|
||||||
<td>{{ project.name }}</td><td>{{ project.members | count }}</td><td>{{ project.get_bills().count() }}</td>
|
<td>{{ project.name }}</td><td>{{ project.members | count }}</td><td>{{ project.get_bills().count() }}</td>
|
||||||
{% if project.has_bills() %}
|
{% if project.has_bills() %}
|
||||||
<td>{{ project.get_bills().all()[0].date }}</td>
|
<td>{{ project.get_bills().all()[0].date }}</td>
|
||||||
<td>{{ project.get_bills().all()[-1].date }}</td>
|
<td>{{ project.get_bills().all()[-1].date }}</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}</tbody>
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue