From cf7bd572489aad17bf60026c6618d0ff49f822a9 Mon Sep 17 00:00:00 2001 From: Jocelyn Delalande Date: Sun, 4 Feb 2018 13:10:57 +0100 Subject: Remove unused CSS odd/even classes That was forgotten from fe39258630e55d4a3e1297a01a1c8fd39bad3a4e --- ihatemoney/templates/dashboard.html | 2 +- ihatemoney/templates/settle_bills.html | 2 +- ihatemoney/templates/statistics.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ihatemoney/templates') diff --git a/ihatemoney/templates/dashboard.html b/ihatemoney/templates/dashboard.html index b1220bd..807e3e2 100644 --- a/ihatemoney/templates/dashboard.html +++ b/ihatemoney/templates/dashboard.html @@ -4,7 +4,7 @@ {% for project in projects|sort(attribute='name') %} - + {% if project.has_bills() %} diff --git a/ihatemoney/templates/settle_bills.html b/ihatemoney/templates/settle_bills.html index b67a9b8..7ec5e29 100644 --- a/ihatemoney/templates/settle_bills.html +++ b/ihatemoney/templates/settle_bills.html @@ -22,7 +22,7 @@ {% for bill in bills %} - + diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html index 061c629..ae1c80e 100644 --- a/ihatemoney/templates/statistics.html +++ b/ihatemoney/templates/statistics.html @@ -22,7 +22,7 @@ {% for member in members %} - + -- cgit v1.1 From 389c7b8bcd2813d8549858265432859259942fd6 Mon Sep 17 00:00:00 2001 From: Jocelyn Delalande Date: Sat, 3 Feb 2018 17:49:12 +0100 Subject: Remove dead code --- ihatemoney/templates/statistics.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ihatemoney/templates') diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html index ae1c80e..ee59cb9 100644 --- a/ihatemoney/templates/statistics.html +++ b/ihatemoney/templates/statistics.html @@ -5,7 +5,7 @@
{{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}{{_("Actions")}}
{{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }}{{ project.get_bills().all()[0].date }}
{{ _("Who pays?") }}{{ _("To whom?") }}{{ _("How much?") }}
{{ bill.ower }} {{ bill.receiver }} {{ "%0.2f"|format(bill.amount) }}
{{ _("Who?") }}{{ _("Paid") }}{{ _("Spent") }}{{ _("Balance") }}
{{ member.name }} {{ "%0.2f"|format(paid[member.id]) }} {{ "%0.2f"|format(spent[member.id]) }}
{% set balance = g.project.balance %} {% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id]|round(2) != 0 %} - +
{{ member.name }} {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} -- cgit v1.1 From b1a4572e8c72e1d7f49b07aaeb5be0f3603bf0a7 Mon Sep 17 00:00:00 2001 From: Jocelyn Delalande Date: Sat, 3 Feb 2018 18:04:06 +0100 Subject: Change statistics data structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clearer data structure, and simpler template This commit has a side effect: sidebar now hides disabled members. IMHO, the disabled members should either be hidden or shown consistently between sidebar and central table. Previous status was: shown in sidebar (if balance ≠ 0) and hidden in central table. --- ihatemoney/templates/statistics.html | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'ihatemoney/templates') diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html index ee59cb9..1b07a33 100644 --- a/ihatemoney/templates/statistics.html +++ b/ihatemoney/templates/statistics.html @@ -3,12 +3,11 @@ {% block sidebar %}
- {% set balance = g.project.balance %} - {% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id]|round(2) != 0 %} + {% for stat in members_stats| sort(attribute='member.name') %} - - + {% endfor %} @@ -21,12 +20,12 @@
{{ member.name }} - {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} + {{ stat.member.name }} + {% if stat.balance|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(stat.balance) }}
- {% for member in members %} + {% for stat in members_stats %} - - - - + + + + {% endfor %} -- cgit v1.1
{{ _("Who?") }}{{ _("Paid") }}{{ _("Spent") }}{{ _("Balance") }}
{{ member.name }}{{ "%0.2f"|format(paid[member.id]) }}{{ "%0.2f"|format(spent[member.id]) }}{{ "%0.2f"|format(balance[member.id]) }}{{ stat.member.name }}{{ "%0.2f"|format(stat.paid) }}{{ "%0.2f"|format(stat.spent) }}{{ "%0.2f"|format(stat.balance) }}