From 0fcc2c72ec30b0ca10867f48a49c246f96387cc7 Mon Sep 17 00:00:00 2001 From: "A.Avenel" Date: Mon, 3 Sep 2012 23:11:32 +0200 Subject: [PATCH] Some love for the dashboard view --- budget/templates/dashboard.html | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/budget/templates/dashboard.html b/budget/templates/dashboard.html index e9c92dd7..3f50915a 100644 --- a/budget/templates/dashboard.html +++ b/budget/templates/dashboard.html @@ -1,20 +1,21 @@ {% extends "layout.html" %} {% block content %} - +
- {% for project in projects %} - - -{% if project.has_bills() %} - - -{% else %} - - -{% endif %} - - {% endfor %} + {% for project in projects|sort(attribute='name') %} + + + {% if project.has_bills() %} + + + {% else %} + + + {% endif %} + + {% endfor %} +
{{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}
{{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }}{{ project.get_bills().all()[0].date }}{{ project.get_bills().all()[-1].date }}
{{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }}{{ project.get_bills().all()[0].date }}{{ project.get_bills().all()[-1].date }}
{% endblock %}