1 | <!-- $Id: my.tt 7943 2011-11-10 15:33:13Z nanardon $ --> |
---|
2 | [% IF NOT user %] |
---|
3 | No user [% username | html %] found. |
---|
4 | [% ELSE %] |
---|
5 | |
---|
6 | <div id="objectform" class="objectform"> |
---|
7 | [% INCLUDE 'users/menu.tt' %] |
---|
8 | |
---|
9 | <div class="oform"> |
---|
10 | |
---|
11 | [% FOREACH h = db.search_objects('group', 'managedBy=' _ username) %] |
---|
12 | [% IF loop.first %] |
---|
13 | <p>Mes groupes</p> |
---|
14 | <table border=1> |
---|
15 | <tr> |
---|
16 | <th>Groupe:</th> |
---|
17 | <th>Desc.</th> |
---|
18 | <th>Donner à </th> |
---|
19 | </tr> |
---|
20 | [% END %] |
---|
21 | [% ogroup = db.get_object('group', h) %] |
---|
22 | <tr><td> |
---|
23 | <a href="[% c.uri_for('/groups', h) %]">[% h | html %]</a> |
---|
24 | </td> |
---|
25 | <td> |
---|
26 | [% ogroup.get_attributes('description') | truncate(30) | html %] |
---|
27 | </td> |
---|
28 | <td> |
---|
29 | [% c.prototype.form_remote_tag( |
---|
30 | { |
---|
31 | url => c.uri_for('/ajax/set_attrs/group/' _ h), |
---|
32 | update => 'posts', |
---|
33 | }, |
---|
34 | ) %] |
---|
35 | [% form = c.model('AttrForms', '', ogroup) %] |
---|
36 | [% form.attr_field('managedBy') %] |
---|
37 | <input type=hidden name=attrs value=managedBy> |
---|
38 | <input type=submit> |
---|
39 | <input type=reset> |
---|
40 | </form> |
---|
41 | </td></tr> |
---|
42 | [% IF loop.last %] |
---|
43 | </table> |
---|
44 | [% END %] |
---|
45 | [% END %] |
---|
46 | |
---|
47 | [% FOREACH h = db.search_objects('user', 'manager=' _ username) %] |
---|
48 | [% IF loop.first %] |
---|
49 | <p>Personnels gérés</p> |
---|
50 | <table border=1> |
---|
51 | <tr> |
---|
52 | <th>Nom:</th> |
---|
53 | <th>Changer le responsable</th> |
---|
54 | </tr> |
---|
55 | [% END %] |
---|
56 | [% ouser = db.get_object('user', h) %] |
---|
57 | <tr><td> |
---|
58 | <a href="[% c.uri_for('/users', h) %]">[% ouser.get_attributes('displayName') | html %]</a> |
---|
59 | [% INCLUDE user_flag ouser = ouser %] |
---|
60 | </td> |
---|
61 | <td> |
---|
62 | [% c.prototype.form_remote_tag( |
---|
63 | { |
---|
64 | url => c.uri_for('/ajax/set_attrs/user/' _ h), |
---|
65 | update => 'posts', |
---|
66 | }, |
---|
67 | ) %] |
---|
68 | [% form = c.model('AttrForms', '', ouser) %] |
---|
69 | [% form.attr_field('manager') %] |
---|
70 | <input type=hidden name=attrs value=manager> |
---|
71 | <input type=submit> |
---|
72 | <input type=reset> |
---|
73 | </form> |
---|
74 | </td></tr> |
---|
75 | [% IF loop.last %] |
---|
76 | </table> |
---|
77 | [% END %] |
---|
78 | [% END %] |
---|
79 | |
---|
80 | [% FOREACH h = db.search_objects('nethost', 'owner=' _ username) %] |
---|
81 | [% IF loop.first %] |
---|
82 | <p>Mes ordinateurs</p> |
---|
83 | <table border=1> |
---|
84 | <tr> |
---|
85 | <th>Nom:</th> |
---|
86 | <th>Changer le responsable</th> |
---|
87 | </tr> |
---|
88 | [% END %] |
---|
89 | [% ohost = db.get_object('nethost', h) %] |
---|
90 | <tr> |
---|
91 | <td> |
---|
92 | <a href="[% c.uri_for('/nethosts', h) %]">[% h | html %]</a> |
---|
93 | </td> |
---|
94 | <td> |
---|
95 | [% c.prototype.form_remote_tag( |
---|
96 | { |
---|
97 | url => c.uri_for('/ajax/set_attrs/nethost/' _ h), |
---|
98 | update => 'posts', |
---|
99 | }, |
---|
100 | ) %] |
---|
101 | [% form = c.model('AttrForms', '', ohost) %] |
---|
102 | [% form.attr_label('owner') %]: [% form.attr_field('owner') %]<br> |
---|
103 | [% form.attr_label('user') %]:[% form.attr_field('user') %]<br> |
---|
104 | <input type=hidden name=attrs value=owner> |
---|
105 | <input type=hidden name=attrs value=user> |
---|
106 | <input type=submit> |
---|
107 | <input type=reset> |
---|
108 | </form> |
---|
109 | </td> |
---|
110 | </tr> |
---|
111 | [% IF loop.last %] |
---|
112 | </table> |
---|
113 | [% END %] |
---|
114 | [% END %] |
---|
115 | |
---|
116 | </div> |
---|
117 | |
---|
118 | [% END %] |
---|