1 | |
---|
2 | [% IF c.user.username %] |
---|
3 | <form action="[% c.uri_for('/search') %]"> |
---|
4 | <input name="q" value="[% c.req.param('q') | html %]"> |
---|
5 | <input type="image" name="" src="[% c.uri_for('/static', 'images', 'gtk-find.png') %]" height="16" width="16"> |
---|
6 | </form> |
---|
7 | <span> |
---|
8 | <a href="[% c.uri_for('/users', c.user.username) %]"> |
---|
9 | [% l('Connected as') %] |
---|
10 | [% c.model('Accounts').db.get_object('user', c.user.username ) %] |
---|
11 | </a> |
---|
12 | </span>, |
---|
13 | [% IF c.model('Accounts').db.check_acl('user', 'userPassword', 'w') %] |
---|
14 | <span> |
---|
15 | <a href="[% c.uri_for('/users', c.user.username, 'passwd') %]"> |
---|
16 | [% l('Change my password') %] |
---|
17 | </a> |
---|
18 | </span>, |
---|
19 | [% END %] |
---|
20 | <span> |
---|
21 | <a href="[% c.uri_for('/logout') %]">[% l('Logout') %]</a> |
---|
22 | </span> |
---|
23 | |
---|
24 | <ul id="menu"> |
---|
25 | |
---|
26 | <li><a href="[% c.uri_for('/search', 'adv') %]">Recherche avancée</a></li> |
---|
27 | |
---|
28 | <li>[% l('View') %] |
---|
29 | <ul> |
---|
30 | [% FOREACH obj = c.model('Accounts').db.list_supported_objects.sort %] |
---|
31 | [% label = c.model('Accounts').obj_to_label(obj) %] |
---|
32 | [% NEXT IF NOT label %] |
---|
33 | <li><a href="[% c.model('Accounts').obj_to_uri(obj) %]">[% label | html %]</a></li> |
---|
34 | [% END %] |
---|
35 | </ul> |
---|
36 | </li> |
---|
37 | |
---|
38 | <li>[% l('Create') %] |
---|
39 | <ul> |
---|
40 | [% FOREACH obj = c.model('Accounts').db.list_supported_objects.sort %] |
---|
41 | [% label = c.model('Accounts').obj_to_label(obj) %] |
---|
42 | [% NEXT IF NOT label %] |
---|
43 | <li><a href="[% c.uri_for('/create', obj) %]"> |
---|
44 | [% label | html %] |
---|
45 | </a></li> |
---|
46 | [% END %] |
---|
47 | </ul> |
---|
48 | </li> |
---|
49 | |
---|
50 | <li>[% l('Tools') %] |
---|
51 | <ul> |
---|
52 | [% IF c.config.features.offices_list %] |
---|
53 | <li><a href="[% c.uri_for('/summary', 'offices') %]">Annuaire par bureaux</a></li> |
---|
54 | [% END %] |
---|
55 | |
---|
56 | <li><a href="[% c.uri_for('/summary', 'departments') %]">Liste des départements</a></li> |
---|
57 | <li><a href="[% c.uri_for('/summary/expire') %]">Expiration des comptes</a></li> |
---|
58 | <li><a href="[% c.uri_for('/summary/accage') %]">Comptes par année</a></li> |
---|
59 | |
---|
60 | [% FOREACH stat = c.model('Accounts').db.search_objects('stat', 'exported=true', 'display=*').sort %] |
---|
61 | [% ostat = c.model('Accounts').db.get_object('stat', stat) %] |
---|
62 | [% IF loop.first %] |
---|
63 | <li class="ui-widget-header"><a href="[% c.uri_for('/stat') %]">[% l('Statistics') %]</a>: |
---|
64 | [% END %] |
---|
65 | <li><a href="[% c.uri_for('/stat', stat) %]">[% ostat.get_attributes('description') || stat | html %]</a></li> |
---|
66 | [% IF loop.last %] |
---|
67 | </li> |
---|
68 | [% END %] |
---|
69 | [% END %] |
---|
70 | |
---|
71 | </ul> |
---|
72 | </li> |
---|
73 | |
---|
74 | <li><a href="[% c.uri_for('/admin') |
---|
75 | %]">Gestion...</a></li> |
---|
76 | </ul> |
---|
77 | |
---|
78 | <script> |
---|
79 | $(function() { |
---|
80 | $( "#menu" ).menu({ |
---|
81 | position: { my: "left top", at: "left-1 top+35" }, |
---|
82 | items: "> :not(.ui-widget-header)", |
---|
83 | }); |
---|
84 | }); |
---|
85 | </script> |
---|
86 | [% END %] |
---|