1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

Merge pull request #71 from aavenel/master

Small commit to add more informations in Dashboard view.
This commit is contained in:
Alexis Metaireau 2011-12-03 08:59:33 -08:00
commit c5a570073c
2 changed files with 6 additions and 2 deletions

View file

@ -2,9 +2,9 @@
{% block content %} {% block content %}
<table id="bill_table" class="list_bills common-table zebra-striped"> <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 %} <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> {% endfor %}</tbody>
</table> </table>
{% endblock %} {% endblock %}

View file

@ -411,6 +411,10 @@ class BudgetTestCase(TestCase):
follow_redirects=True) follow_redirects=True)
self.assertIn("Invalid email address", resp.data) 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): class APITestCase(TestCase):
"""Tests the API""" """Tests the API"""