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