diff options
| author | Glandos <bugs-github@antipoul.fr> | 2020-05-21 20:47:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-21 20:47:56 +0200 |
| commit | e10ea6c776339342dae098524742722c99d6b2bf (patch) | |
| tree | 7eb768145e8c110444a6f11b0f6dd7bb5020be9f /ihatemoney/templates/history.html | |
| parent | 3f46beade39d545a9421be140004222b6ee8146d (diff) | |
| download | ihatemoney-mirror-e10ea6c776339342dae098524742722c99d6b2bf.zip ihatemoney-mirror-e10ea6c776339342dae098524742722c99d6b2bf.tar.gz ihatemoney-mirror-e10ea6c776339342dae098524742722c99d6b2bf.tar.bz2 | |
Add a unified balance table for all sidebar pages (#618)
Diffstat (limited to 'ihatemoney/templates/history.html')
| -rw-r--r-- | ihatemoney/templates/history.html | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/ihatemoney/templates/history.html b/ihatemoney/templates/history.html index 9cf66a7..d9f2b4d 100644 --- a/ihatemoney/templates/history.html +++ b/ihatemoney/templates/history.html @@ -98,23 +98,7 @@ {% block sidebar %} <div id="table_overflow"> - <table class="balance table"> - <thead> - <tr class="d-none d-md-table-row"> - <th>{{ _("Who?") }}</th> - <th class="balance-value">{{ _("Balance") }}</th> - </tr> - </thead> - {% set balance = g.project.balance %} - {% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id]|round(2) != 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]|round(2) > 0 %}positive{% elif balance[member.id]|round(2) < 0 %}negative{% endif %}"> - {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} - </td> - </tr> - {% endfor %} - </table> + {{ balance_table(show_weight=False, show_header=True) }} </div> {% endblock %} |
