Skip to content

Commit

Permalink
Merge pull request spiral-project#71 from aavenel/master
Browse files Browse the repository at this point in the history
Small commit to add more informations in Dashboard view.
  • Loading branch information
Alexis Metaireau committed Dec 3, 2011
2 parents b166577 + 0633b15 commit c5a5700
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions budget/templates/dashboard.html
Expand Up @@ -2,9 +2,9 @@
{% block content %}

<table id="bill_table" class="list_bills common-table zebra-striped">
<thead><tr><th>{{ _("Project") }}</th><th>{{ _("Number of members") }}</th><th>{{ _("Number of bills") }}</th></tr></thead>
<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></tr>
<tr><td>{{ project.name }}</td><td>{{ project.members | count }}</td><td>{{ project.get_bills().count() }}</td><td>{{ project.get_bills()[1].date }}</td><td>{{ project.get_bills()[-1].date }}</tr>
{% endfor %}</tbody>
</table>
{% endblock %}
Expand Down
4 changes: 4 additions & 0 deletions budget/tests.py
Expand Up @@ -411,6 +411,10 @@ def test_edit_project(self):
follow_redirects=True)
self.assertIn("Invalid email address", resp.data)

def test_dashboard(self):
response = self.app.get("/dashboard")
self.assertEqual(response.status_code, 200)


class APITestCase(TestCase):
"""Tests the API"""
Expand Down

0 comments on commit c5a5700

Please sign in to comment.