diff options
Diffstat (limited to 'ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html')
-rw-r--r-- | ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html | 46 |
1 files changed, 22 insertions, 24 deletions
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 %} -<div class='dashboard'> - <div> -<script language="javascript" type="text/javascript"> -$(document).ready(function(){ -var values_users = []; -{% for user_type in ishtar_users.types %} -values_users.push(['{{user_type.person__person_types__label}}', {{user_type.number}}]); {% endfor%} - -var plot_users = jQuery.jqplot ('user_chart', [values_users], - { - seriesDefaults: { - renderer: jQuery.jqplot.PieRenderer, - rendererOptions: { - showDataLabels: true - } - }, - legend: { show:true, location: 'e' } - } - ); -}); -</script> - <div id="user_chart" style="height:300px; width:700px;"></div> +<div class='dashboard centered'> + <div id="user_chart" style="height:300px; width:700px;margin-left: auto;margin-right: auto;"></div> <table class='table table-striped'> <tr><th>{% trans "User type" %}</th><th>{% trans "Number" %}</th></tr> - {% for user_type in ishtar_users.types %} + {% for user_type in ishtar_users.types %} <tr> <td class='string'>{{user_type.person__person_types__label}}{#TODO: Display all#}</td> <td>{{user_type.number}}</td> </tr> - {% endfor%} + {% endfor %} </table> </div> +<script language="javascript" type="text/javascript"> +$(document).ready(function(){ + var values_users = []; + {% for user_type in ishtar_users.types %} + values_users.push(['{{user_type.person__person_types__label}}', {{user_type.number}}]); {% endfor%} + var plot_users = jQuery.jqplot ('user_chart', [values_users], + { + seriesDefaults: { + renderer: jQuery.jqplot.PieRenderer, + rendererOptions: { + showDataLabels: true + } + }, + legend: { show:true, location: 'e' } + } + ); +}); +</script>
\ No newline at end of file |