1 | <!-- $Id$ --> |
---|
2 | [% IF NOT group %] |
---|
3 | No group [% groupname | html %] found. |
---|
4 | [% ELSE %] |
---|
5 | |
---|
6 | [% INCLUDE 'groups/object_header.tt' %] |
---|
7 | |
---|
8 | <div class="objectform" id="objectform"> |
---|
9 | |
---|
10 | <div style="margin: 2em; border: outset; width: auto; display: inline-block"> |
---|
11 | <form action="[% c.uri_for(groupname, 'dpmt') %]"> |
---|
12 | <input id="inactive" type="checkbox" name="inactive" value="1" [% "checked" IF c.req.param('inactive') %]> |
---|
13 | <label for="inactive">Inclure les comptes inactifs</label><br> |
---|
14 | <input id="mail" type="checkbox" name="mail" value="1" [% "checked" IF c.req.param('mail') %]> |
---|
15 | <label for="mail">Afficher les mails</label><br> |
---|
16 | |
---|
17 | [% FOREACH co = c.model('Accounts').db.attributes_summary('user', 'company').sort %] |
---|
18 | [% IF loop.first %] |
---|
19 | Société: |
---|
20 | <select name="company"> |
---|
21 | <option value="">--</option> |
---|
22 | [% END %] |
---|
23 | <option value="[% co | html %]" [% 'selected="selected"' IF co == |
---|
24 | c.req.param('company') %]>[% co | html %]</option> |
---|
25 | [% IF loop.last %] |
---|
26 | </select> |
---|
27 | <br> |
---|
28 | [% END %] |
---|
29 | [% END %] |
---|
30 | |
---|
31 | <input type="submit"> |
---|
32 | </form> |
---|
33 | [% IF odpmt.get_attributes('managedBy') %] |
---|
34 | [% ou = c.model('Accounts').db.get_object('user', |
---|
35 | odpmt.get_attributes('managedBy')) %] |
---|
36 | <p>Gestionnaire: |
---|
37 | <a href="[% c.uri_for('/users', ou.id) %]"> |
---|
38 | [% ou.get_attributes('displayName') | html %] |
---|
39 | </a> |
---|
40 | </p> |
---|
41 | <p>[% user.size %] personnes dans ce département, [% guser.size %] |
---|
42 | associés.</p> |
---|
43 | [% END %] |
---|
44 | |
---|
45 | <hr> |
---|
46 | |
---|
47 | [% FOREACH u = user %] |
---|
48 | [% ou = c.model('Accounts').db.get_object('user', u) %] |
---|
49 | <a href="[% c.uri_for('/users', u) %]">[% ou.get_attributes('displayName') | html %]</a> |
---|
50 | ([% ou.get_attributes('contratType') | html %]) |
---|
51 | [% IF c.req.param('mail') %] |
---|
52 | <[% ou.get_attributes('mail') | html %]> |
---|
53 | [% END %] |
---|
54 | <br> |
---|
55 | [% END %] |
---|
56 | |
---|
57 | <p>Associés au département</p> |
---|
58 | |
---|
59 | [% FOREACH u = guser %] |
---|
60 | [% ou = c.model('Accounts').db.get_object('user', u) %] |
---|
61 | <a href="[% c.uri_for('/users', u) %]">[% ou.get_attributes('displayName') | html %]</a> |
---|
62 | (<a href="[% c.uri_for('/groups', ou.get_attributes('department'), 'dpmt') %]">[% |
---|
63 | ou.get_attributes('department') %]</a>) |
---|
64 | [% IF c.req.param('mail') %] |
---|
65 | <[% ou.get_attributes('mail') | html %]> |
---|
66 | [% END %] |
---|
67 | <br> |
---|
68 | [% END %] |
---|
69 | </div> |
---|
70 | |
---|
71 | <div id=chartdpmt style="display: inline-block; width: 600px; height: 500px;"> |
---|
72 | </div> |
---|
73 | |
---|
74 | <script> |
---|
75 | $(document).ready(function(){ |
---|
76 | // Our ajax data renderer which here retrieves a text file. |
---|
77 | // it could contact any source and pull data, however. |
---|
78 | // The options argument isn't used in this renderer. |
---|
79 | |
---|
80 | $.ajax({ |
---|
81 | // have to use synchronous here, else the function |
---|
82 | // will return before the data is fetched |
---|
83 | // async: false, |
---|
84 | url: "[% c.uri_for('/json/dpmtrh', dpmt) %]", |
---|
85 | dataType:"json", |
---|
86 | success: function(data) { |
---|
87 | var plot2 = $.jqplot('chartdpmt', |
---|
88 | [ data ], |
---|
89 | |
---|
90 | { |
---|
91 | title: '[% l('Status') %]', |
---|
92 | seriesDefaults: { |
---|
93 | shadow: false, |
---|
94 | renderer: jQuery.jqplot.PieRenderer, |
---|
95 | rendererOptions: { padding: 2, sliceMargin: 2, showDataLabels: true } |
---|
96 | }, |
---|
97 | legend: { show:true, location: 'e' }, |
---|
98 | }); |
---|
99 | } |
---|
100 | }); |
---|
101 | $.jqplot.config.enablePlugins = true; |
---|
102 | }); |
---|
103 | </script> |
---|
104 | |
---|
105 | </div> |
---|
106 | [% END %] |
---|