source: tags/5.1.13/LATMOS-Accounts-Web/root/html/includes/sidebar.tt

Last change on this file was 1693, checked in by nanardon, 8 years ago

REmove admin section

File size: 2.6 KB
Line 
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/employment') %]">[% l('Status evolution') %]</a></li>
59    <li><a href="[% c.uri_for('/summary/accage') %]">Comptes par année</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></li>
67    [% IF loop.last %]
68    </li>
69    [% END %]
70    [% END %]
71
72    </ul>
73</li>
74
75<li><a href="[% c.uri_for('/about') %]">
76    [% l('About') %]</a></li>
77</ul>
78
79<script>
80$(function() {
81    $( "#menu" ).menu({
82        position: { my: "left top", at: "left-1 top+35" },
83        items: "> :not(.ui-widget-header)",
84    });
85});
86</script>
87[% END %]
Note: See TracBrowser for help on using the repository browser.