aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA.Avenel <avenel.alexandre@gmail.com>2012-09-03 23:11:32 +0200
committerA.Avenel <avenel.alexandre@gmail.com>2012-09-03 23:11:32 +0200
commit0fcc2c72ec30b0ca10867f48a49c246f96387cc7 (patch)
tree881670a8f9cb7d12501cbfea6b9abe8aec3ebe8c
parent800dcba2c8b26d09c19074d8604c4577d4774600 (diff)
downloadihatemoney-mirror-0fcc2c72ec30b0ca10867f48a49c246f96387cc7.zip
ihatemoney-mirror-0fcc2c72ec30b0ca10867f48a49c246f96387cc7.tar.gz
ihatemoney-mirror-0fcc2c72ec30b0ca10867f48a49c246f96387cc7.tar.bz2
Some love for the dashboard view
-rw-r--r--budget/templates/dashboard.html27
1 files changed, 14 insertions, 13 deletions
diff --git a/budget/templates/dashboard.html b/budget/templates/dashboard.html
index e9c92dd..3f50915 100644
--- a/budget/templates/dashboard.html
+++ b/budget/templates/dashboard.html
@@ -1,20 +1,21 @@
{% extends "layout.html" %}
{% block content %}
-<table id="bill_table" class="list_bills common-table zebra-striped">
+<table id="bill_table" class="table table-striped">
<thead><tr><th>{{ _("Project") }}</th><th>{{ _("Number of members") }}</th><th>{{ _("Number of bills") }}</th><th>{{_("Newest bill")}}</th><th>{{_("Oldest bill")}}</th></tr></thead>
- <tbody>{% for project in projects %}
- <tr>
-<td>{{ project.name }}</td><td>{{ project.members | count }}</td><td>{{ project.get_bills().count() }}</td>
-{% if project.has_bills() %}
-<td>{{ project.get_bills().all()[0].date }}</td>
-<td>{{ project.get_bills().all()[-1].date }}</td>
-{% else %}
-<td></td>
-<td></td>
-{% endif %}
-</tr>
- {% endfor %}</tbody>
+ <tbody>{% for project in projects|sort(attribute='name') %}
+ <tr class="{{ loop.cycle("odd", "even") }}">
+ <td>{{ project.name }}</td><td>{{ project.members | count }}</td><td>{{ project.get_bills().count() }}</td>
+ {% if project.has_bills() %}
+ <td>{{ project.get_bills().all()[0].date }}</td>
+ <td>{{ project.get_bills().all()[-1].date }}</td>
+ {% else %}
+ <td></td>
+ <td></td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </tbody>
</table>
{% endblock %}