From 2ec4fb589fdc0fa14297263fd9357c796689dee9 Mon Sep 17 00:00:00 2001 From: 0livd Date: Mon, 21 Aug 2017 23:51:32 +0200 Subject: Add a statistics tab (#257) --- ihatemoney/templates/layout.html | 1 + ihatemoney/templates/statistics.html | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 ihatemoney/templates/statistics.html (limited to 'ihatemoney/templates') diff --git a/ihatemoney/templates/layout.html b/ihatemoney/templates/layout.html index 76ae890..36f01f8 100644 --- a/ihatemoney/templates/layout.html +++ b/ihatemoney/templates/layout.html @@ -40,6 +40,7 @@ {% block navbar %} + {% endblock %} {% endif %} diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html new file mode 100644 index 0000000..061c629 --- /dev/null +++ b/ihatemoney/templates/statistics.html @@ -0,0 +1,35 @@ +{% extends "sidebar_table_layout.html" %} + +{% 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 %} + + + + + {% endfor %} +
{{ member.name }} + {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} +
+
+{% endblock %} + + +{% block content %} + + + + {% for member in members %} + + + + + + + {% endfor %} + +
{{ _("Who?") }}{{ _("Paid") }}{{ _("Spent") }}{{ _("Balance") }}
{{ member.name }}{{ "%0.2f"|format(paid[member.id]) }}{{ "%0.2f"|format(spent[member.id]) }}{{ "%0.2f"|format(balance[member.id]) }}
+ +{% endblock %} -- cgit v1.1