From 7a918c93498c2eb4f85b3b0198c03f3c2edf51fe Mon Sep 17 00:00:00 2001 From: 0livd Date: Mon, 4 Sep 2017 15:44:20 +0200 Subject: Enhance the dashboard. (#262) * Update to a more flexible admin authentication * Admin can now access any project * Add delete and edit options in the dashboard * Add a link to the dashboard in the nav bar This is a rework of the changes proposed by @Olivd, so they can apply on top of the latest master without trouble. All credit goes to him for the code. --- ihatemoney/templates/dashboard.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'ihatemoney/templates/dashboard.html') diff --git a/ihatemoney/templates/dashboard.html b/ihatemoney/templates/dashboard.html index 3f50915..b1220bd 100644 --- a/ihatemoney/templates/dashboard.html +++ b/ihatemoney/templates/dashboard.html @@ -1,8 +1,8 @@ {% extends "layout.html" %} {% block content %} - +{% if is_admin_dashboard_activated %} - + {% for project in projects|sort(attribute='name') %} @@ -13,9 +13,15 @@ {% endif %} + {% endfor %}
{{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}
{{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}{{_("Actions")}}
{{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }} + {{ _('edit') }} + {{ _('delete') }} +
+{% else %} +
{{ _("The Dashboard is currently deactivated.") }}
+{% endif %} {% endblock %} - -- cgit v1.1