summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail_users.html
blob: 4d9857bec2bfdcd12f2dcb9e25727d8511fc858e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{% 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>
    <table class='table table-striped'>
      <tr><th>{% trans "User type" %}</th><th>{% trans "Number" %}</th></tr>
    {% 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%}
    </table>
</div>