Bug 21096: Do not display loggedinusername in template
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / header.inc
1 [% USE raw %]
2 [% USE Branches %]
3 <div id="header" class="navbar navbar-default">
4     <div class="container-fluid">
5         <ul id="toplevelmenu" class="nav navbar-nav">
6             [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<li><a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></li>[% END %]
7             [% IF CAN_user_borrowers_edit_borrowers %]<li><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></li>[% END %]
8             <li class="dropdown">
9                 <a href="/cgi-bin/koha/catalogue/search.pl" class="dropdown-toggle" data-toggle="dropdown">Search <b class="caret"></b></a>
10                 <ul class="dropdown-menu dropdown-menu-right">
11                     [% IF ( CAN_user_catalogue ) %]<li><a href="/cgi-bin/koha/catalogue/search.pl">Advanced search</a></li>
12                     <li><a href="/cgi-bin/koha/catalogue/itemsearch.pl">Item search</a></li>[% END %]
13                 </ul>
14             </li>
15             [% IF ( intranetbookbag ) %]
16                 <li>
17                     <a href="#" id="cartmenulink">Cart<span id="basketcount"></span></a>
18                 </li>
19             [% END %]
20             [% IntranetNav | $raw %]
21             <li class="dropdown">
22                 <a href="/cgi-bin/koha/mainpage.pl" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
23                 <ul class="dropdown-menu dropdown-menu-right">
24                     <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a></li>
25                     [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items ) %]
26                         <li><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></li>
27                     [% END %]
28                     [% IF ( CAN_user_acquisition ) %]
29                         <li><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></li>
30                     [% END %]
31                     <li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
32                     [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
33                         <li><a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a></li>
34                     [% END %]
35                     [% IF ( CAN_user_serials ) %]
36                         <li><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></li>
37                     [% END %]
38                     [% IF ( UseCourseReserves ) %]
39                         <li><a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a></li>
40                     [% END %]
41                     [% IF ( CAN_user_reports ) %]
42                         <li><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></li>
43                     [% END %]
44                     [% IF ( CAN_user_tools ) %]
45                         <li><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></li>
46                     [% END %]
47                     [% IF ( CAN_user_parameters ) %]
48                         <li><a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a></li>
49                     [% END %]
50                     <li><a href="/cgi-bin/koha/about.pl">About Koha</a></li>
51                 </ul>
52             </li>
53         </ul>
54         <ul class="nav navbar-nav navbar-right">
55             [% IF ( loggedinusername ) %]
56             <li class="dropdown">
57                 <a href="#" id="logged-in-menu" role="button" class="dropdown-toggle" data-toggle="dropdown">
58                     <span id="logged-in-info-brief">
59                         <i class="fa fa-user"></i>
60                     </span>
61                     <span id="logged-in-info-full">
62                         <span class="loggedinusername">[% logged_in_user.userid | html %]</span>
63                         <span class="separator">|</span>
64                         [% IF ( AutoLocation ) %]
65                             <brand>
66                                 [% LoginBranchname | html %]
67                             </brand>
68                         [% ELSE %]
69                             <strong>
70                                 [% IF ( LoginBranchname == 'NO_LIBRARY_SET' ) %]
71                                     NO LIBRARY SET
72                                 [% ELSE %]
73                                     <span class="logged-in-branch-name">[% LoginBranchname | html %]</span>
74                                     <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
75                                 [% END %]
76                             </strong>
77                         [% END %]
78                     </span>
79                     <b class="caret"></b>
80                 </a>
81                 <ul class="dropdown-menu dropdown-menu-left" role="menu" aria-labelledby="logged-in-menu">
82
83                     <li class="loggedin-menu-label">
84                         Logged in as:<br />
85                         <span class="loggedinusername">[% logged_in_user.userid | html %]</span>
86                     </li>
87                     <li class="loggedin-menu-label">
88                         [% IF ( AutoLocation ) %]
89                             <brand>
90                                 [% LoginBranchname | html %]
91                             </brand>
92                         [% ELSE %]
93                             [% IF ( LoginBranchname == 'NO_LIBRARY_SET' ) %]
94                                 NO LIBRARY SET
95                             [% ELSE %]
96                                 Location: <br />
97                                 <span class="logged-in-branch-name">[% LoginBranchname | html %]</span>
98                                 <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
99                             [% END %]
100                         [% END %]
101                     </li>
102
103                     <li role="separator" class="loggedin-menu-label divider"></li>
104                     [% IF ( IndependentBranches ) %]
105                         [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
106                     <li>
107                         <a class="toplinks" href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a>
108                     </li>
109                         [% END %]
110                     [% ELSE %]
111                     <li>
112                         <a class="toplinks" href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a>
113                     </li>
114                     [% END %]
115                     [% IF EnableSearchHistory %]
116                     <li>
117                         <a class="toplinks" href="/cgi-bin/koha/catalogue/search-history.pl">Search history</a>
118                     </li>
119                     [% END %]
120                     [% IF loggedinusernumber %]
121                         <li class ="toplinks-myaccount">
122                             <a class="toplinks" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loggedinusernumber | html %]">My account</a>
123                         </li>
124                         <li class="toplinks-mycheckouts">
125                             <a class="toplinks" href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% loggedinusernumber | html %]">My checkouts</a>
126                         </li>
127                     [% END %]
128                     <li>
129                         <a id="logout" class="toplinks" href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log out</a>
130                     </li>
131                 </ul>
132             </li>
133             [% INCLUDE 'langmenu-staff-top.inc' %]
134             <li>
135                 <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper"><i class="fa fa-question-circle"></i> <span>Help</span></a>
136             </li>
137             [% ELSE %]
138             <li class="loggedout">
139                 <span>
140                     <a href="/cgi-bin/koha/mainpage.pl" id="login">Log in</a>
141                     <span class="separator">|</span>
142                     <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper"><i class="fa fa-question-circle"></i> <span>Help</span></a>
143                 </span>
144             </li>
145             [% END %]
146         </ul>
147     </div>
148     [% IF ( intranetbookbag ) %]<div id="cartDetails">Your cart is empty.</div>[% END %]
149 </div>