1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

Members are now sorted by name in the balance.

This commit is contained in:
Tinmn 2011-11-26 14:24:48 +01:00
parent 2a6ccaa0cf
commit 2cadead381

View file

@ -137,15 +137,13 @@
<div id="table_overflow">
<table class="balance">
{% set balance = g.project.balance %}
{% for member in g.project.members %}
{% if member.activated or balance[member.id] != 0 %}
{% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id] != 0 %}
<tr id="bal-member-{{ member.id }}" action={% if member.activated %}delete{% else %}reactivate{% endif %}>
<td class="balance-name">{{ member.name }}</td>
<td class="balance-value {% if balance[member.id] > 0 %}positive{% elif balance[member.id] < 0 %}negative{% endif %}">
{% if balance[member.id] > 0 %}+{% endif %}{{ balance[member.id] }}
</td>
</tr>
{% endif %}
{% endfor %}
</table>
</div>