From 03270abcd33477f9ceab904fd7ee87c87774d67a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 29 Jan 2018 15:50:18 +0100 Subject: Dashboard: fix user charts --- ishtar_common/static/js/ishtar.js | 4 +- .../ishtar/dashboards/dashboard_main_detail.html | 7 ---- .../dashboards/dashboard_main_detail_users.html | 46 +++++++++++----------- 3 files changed, 25 insertions(+), 32 deletions(-) diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 5acc702d6..d54bdd796 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -207,7 +207,9 @@ function dynamic_load(url, target){ $(target).html(jqXHR.responseText); var response = $(jqXHR.responseText); var responseScript = response.filter("script"); - $.each(responseScript, function(idx, val) { eval(val.text); } ); + $.each(responseScript, function(idx, val) { + eval(val.text); + } ); } }); } diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html index 0f33f2069..c5dea616f 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html @@ -248,12 +248,5 @@ $('#search_{{unique_id}}').click(function (){ return false; }); -/* -{% if item_name == 'files' or item_name == "operations" or item_name == "treatments" or item_name == "treatmentfiles" %} -load_jquerydate_{{item_name}}_after(); -load_jquerydate_{{item_name}}_before(); -{% endif %} -*/ - }); diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html index 4d9857bec..f6ead643a 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html @@ -1,34 +1,32 @@ {% load i18n %} -
-
- -
+
+
- {% for user_type in ishtar_users.types %} + {% for user_type in ishtar_users.types %} - {% endfor%} + {% endfor %}
{% trans "User type" %}{% trans "Number" %}
{{user_type.person__person_types__label}}{#TODO: Display all#} {{user_type.number}}
+ \ No newline at end of file -- cgit v1.2.3