From 57cdf8896f854de7ba573cfe8d5040155df1e656 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 20 Oct 2014 20:40:42 +0200 Subject: Dashboard: many improvments on graph (refs #2075) * by default graph is set by month * data are reapeated in a table * ability to save the graph in a file * detail by department with a line by department + total * add a legend * ability to zoom on the graph --- .../ishtar/dashboards/dashboard_main.html | 3 + .../ishtar/dashboards/dashboard_main_detail.html | 88 +++++++++++++++++----- 2 files changed, 71 insertions(+), 20 deletions(-) (limited to 'ishtar_common/templates/ishtar') diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html index 8822875b5..868f8a5c3 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html @@ -6,9 +6,12 @@ + + + {% endblock %} {% block content %} diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html index 610457ae3..820c50136 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html @@ -1,11 +1,8 @@ -{% load i18n %} +{% load i18n date_formating %} {% load url from future %}

{% trans "Numbers" %}

-

{% trans "Total:" %} {{dashboard.total_number}}

-
-
{% if form %}
@@ -16,15 +13,27 @@
{% endif %} - {% comment %} - +

{% trans "Total:" %} {{dashboard.total_number}}

+
+
+

{% trans 'Draw rectangle on the graph to zoom. Double-click to reinitialize.' %}

+
+ +
+
+

{% trans 'Right-click on this image to save it.' %}

+
+
+
+
+
{% for idx, lbl, values in dashboard.values %} - {% for value in values %}{% endfor%} + {% for value in values reversed %}{% if forloop.parentloop.counter0 %}{%endif%}{% endfor%} {% endfor%} -
{{lbl}}{{value}}{% else %}{%endif%}{{value|date_formating }}{% if forloop.parentloop.counter0 %}{% else %}
{% endcomment %} +
{% if dashboard.periods %}

{% trans "By years" %}

@@ -71,23 +80,41 @@