From a8e74c98df44fc7632c036e8e534d93e8fc4de48 Mon Sep 17 00:00:00 2001 From: bmatt <36943357+bmatticus@users.noreply.github.com> Date: Fri, 6 Mar 2020 17:06:17 -0500 Subject: Bmatticus/feature/112 dashboard sorting (#538) * Added DataTables for table sorting, pagination, and searching of bill_table for dashboard. Issue #112 * Moved datatables CSS/JS to dashboard to reduce loaded data throughout * Moved link back to proper place, in head tab, but added if to prevent loading CSS/JS for datatables outside of the dashboard. Also added eye icon to drill into list_billa API to be more consistent with the look and feel of the overall site. Co-authored-by: bmatt --- ihatemoney/templates/dashboard.html | 10 +++++++++- ihatemoney/templates/layout.html | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'ihatemoney/templates') diff --git a/ihatemoney/templates/dashboard.html b/ihatemoney/templates/dashboard.html index 807e3e2..b77a0ba 100644 --- a/ihatemoney/templates/dashboard.html +++ b/ihatemoney/templates/dashboard.html @@ -5,7 +5,7 @@ {{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}{{_("Actions")}} {% for project in projects|sort(attribute='name') %} - {{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }} + {{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }} {% if project.has_bills() %} {{ project.get_bills().all()[0].date }} {{ project.get_bills().all()[-1].date }} @@ -16,11 +16,19 @@ {{ _('edit') }} {{ _('delete') }} + {{ _('see') }} {% endfor %} + {% else %}
{{ _("The Dashboard is currently deactivated.") }}
{% endif %} diff --git a/ihatemoney/templates/layout.html b/ihatemoney/templates/layout.html index 664182a..dc3d32f 100644 --- a/ihatemoney/templates/layout.html +++ b/ihatemoney/templates/layout.html @@ -12,6 +12,10 @@ + {%- if request.path == "/dashboard" %} + + + {%- endif %} {% block head %}{% endblock %}