From e04a42aa7e5011f9173226af851e8b15bafcef06 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 13 Oct 2014 03:07:06 +0200 Subject: Work on pie and charts for dashboards (refs #1617) --- ishtar_common/static/media/style.css | 15 ++++++ .../ishtar/dashboards/dashboard_main.html | 56 +++++++++++++++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) (limited to 'ishtar_common') diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css index 8722b5d05..4990fa111 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -793,6 +793,21 @@ a.remove{ margin:0 6px; } +.dashboard table.jqplot-table-legend{ + width:default; + border-collapse:default; +} + +.dashboard div.jqplot-table-legend-swatch-outline, +.dashboard table.jqplot-table-legend th, .dashboard table.jqplot-table-legend td{ + border:0; +} + +.dashboard table.jqplot-table-legend td { + text-align:left; + padding:0; +} + .dashboard table{ width:100%; border-collapse:yes; diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html index fb18580ef..3242da9a3 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main.html @@ -3,16 +3,50 @@ {% load range %} {% block extra_head %} {{form.media}} + + + + + + {% endblock %} {% block content %}
{% for lbl, dashboard in items %} +

{{lbl}}

{% trans "Numbers" %}

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

+
+ {% comment %} {% for idx, lbl, values in dashboard.values %} @@ -20,7 +54,7 @@ {% for value in values %}{% endfor%} {% endfor%} -
{{value}}
+ {% endcomment %}
{% if dashboard.years %}

{% trans "By years" %}

@@ -69,6 +103,26 @@

{% trans "Users" %}

+ +
-- cgit v1.2.3
{% trans "User type" %}{% trans "Number" %}