Bug 24201: (follow-up) Rework Desks Plugin
[koha-equinox.git] / koha-tmpl / intranet-tmpl / prog / en / includes / header.inc
1 [% USE raw %]
2 [% USE Branches %]
3 [% USE Desks %]
4 [% USE Koha %]
5 <nav class="navbar">
6     <div class="navbar-header">
7         <a href="#" class="header-menu-link collapsed" data-toggle="collapse" data-target="#header" aria-expanded="false" aria-controls="header">
8             <i class="fa fa-bars"></i> Menu
9         </a>
10     </div>
11     <div id="header" class="navbar-collapse collapse">
12         <ul id="toplevelmenu" class="nav navbar-nav">
13             [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<li><a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></li>[% END %]
14             [% IF CAN_user_borrowers_edit_borrowers %]<li><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></li>[% END %]
15             <li id="catalog-search-link">
16                 <a href="/cgi-bin/koha/catalogue/search.pl">Search</a>
17             </li>
18             <li class="dropdown" id="catalog-search-dropdown">
19                 <a href="/cgi-bin/koha/catalogue/search.pl" class="dropdown-toggle" data-toggle="dropdown"><b class="caret"></b></a>
20                 <ul class="dropdown-menu dropdown-menu-right">
21                     [% IF ( CAN_user_catalogue ) %]<li><a href="/cgi-bin/koha/catalogue/search.pl">Advanced search</a></li>
22                     <li><a href="/cgi-bin/koha/catalogue/itemsearch.pl">Item search</a></li>[% END %]
23                 </ul>
24             </li>
25             [% IF ( intranetbookbag ) %]
26                 <li>
27                     <a href="#" id="cartmenulink"><i class="fa fa-shopping-cart"></i>Cart<span id="basketcount"></span></a>
28                 </li>
29             [% END %]
30             [% IntranetNav | $raw %]
31             <li class="dropdown">
32                 <a href="/cgi-bin/koha/mainpage.pl" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
33                 <ul class="dropdown-menu dropdown-menu-right">
34                     <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a></li>
35                     [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items ) %]
36                         <li><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></li>
37                     [% END %]
38                     [% IF ( CAN_user_acquisition ) %]
39                         <li><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></li>
40                     [% END %]
41                     <li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
42                     [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
43                         <li><a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a></li>
44                     [% END %]
45                     [% IF ( CAN_user_serials ) %]
46                         <li><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></li>
47                     [% END %]
48                     [% IF ( UseCourseReserves ) %]
49                         <li><a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a></li>
50                     [% END %]
51                     [% IF ( CAN_user_reports ) %]
52                         <li><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></li>
53                     [% END %]
54                     [% IF ( CAN_user_tools ) %]
55                         <li><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></li>
56                     [% END %]
57                     [% IF ( Koha.Preference('EnablePointOfSale') && Koha.Preference('UseCashRegisters') && CAN_user_cash_management_takepayment ) %]
58                         <li><a href="/cgi-bin/koha/pos/pay.pl">Point of sale</a></li>
59                     [% END %]
60                     [% IF ( CAN_user_parameters ) %]
61                         <li><a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a></li>
62                     [% END %]
63                     <li><a href="/cgi-bin/koha/about.pl">About Koha</a></li>
64                 </ul>
65             </li>
66         </ul>
67     </div>
68         <ul id="user-menu" class="nav navbar-nav navbar-right">
69             [% IF ( loggedinusername ) %]
70             <li class="dropdown">
71                 <a href="#" id="logged-in-menu" role="button" class="dropdown-toggle" data-toggle="dropdown">
72                     <span id="logged-in-info-brief">
73                         <i class="fa fa-user"></i>
74                     </span>
75                     <span id="logged-in-info-full">
76                         [% SET is_superlibrarian = CAN_user_superlibrarian ? 'is_superlibrarian' : '' %]
77                         <span class="loggedinusername [% is_superlibrarian | html %]">[% logged_in_user.userid | html %]</span>
78                         <span class="separator">|</span>
79                         [% IF ( AutoLocation ) %]
80                             <brand>
81                                 [% Branches.GetLoggedInBranchname | html %]
82                             </brand>
83                         [% ELSE %]
84                             <strong>
85                                 <span class="logged-in-branch-name">[% Branches.GetLoggedInBranchname | html %]</span>
86                                 <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
87                             </strong>
88                         [% END %]
89                         [% IF Desks.ListForLibrary.count %]
90                             <span class="separator">|</span>
91                             <strong>
92                                 [% IF ( Desks.GetLoggedInDeskName == '' ) %]
93                                    <span class="logged-in-desk-name">NO DESK SET</span>
94                                 [% ELSE %]
95                                     <span class="logged-in-desk-name">[% Desks.GetLoggedInDeskName | html %]</span>
96                                     <span class="logged-in-desk-id content_hidden">[% Desks.GetLoggedInDeskId | html %]</span>
97                                 [% END %]
98                             </strong>
99                          [% END %]
100                     </span>
101                     <b class="caret"></b>
102                 </a>
103                 <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="logged-in-menu">
104
105                     <li class="loggedin-menu-label">
106                         Logged in as:<br />
107                         <span class="loggedinusername">[% logged_in_user.userid | html %]</span>
108                     </li>
109                     <li class="loggedin-menu-label">
110                         [% IF ( AutoLocation ) %]
111                             <brand>
112                                 [% Branches.GetLoggedInBranchname | html %]
113                             </brand>
114                         [% ELSE %]
115                             Location: <br />
116                             <span class="logged-in-branch-name">[% Branches.GetLoggedInBranchname | html %]</span>
117                             <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
118                         [% END %]
119                     </li>
120                     <li class="loggedin-menu-label">
121                         Desk: <br />
122                         [% IF ( Desks.GetLoggedInDeskName == '' AND Desks.ListForLibrary.count ) %]
123                            <span class="logged-in-desk-name">NO DESK SET</span>
124                         [% ELSIF ( Desks.GetLoggedInDeskName != '' ) %]
125                             <span class="logged-in-desk-name">[% Desks.GetLoggedInDeskName | html %]</span>
126                             <span class="logged-in-desk-id content_hidden">[% Desks.GetLoggedInDeskId | html %]</span>
127                         [% END %]
128                     </li>
129
130                     <li role="separator" class="loggedin-menu-label divider"></li>
131                     [% IF ( IndependentBranches ) %]
132                         [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
133                     <li>
134                         <a class="toplinks" href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
135                     </li>
136                         [% END %]
137                     [% ELSE %]
138                     <li>
139                         <a class="toplinks" href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
140                     </li>
141                     [% END %]
142                     [% IF Desks.ListForLibrary.count %]
143                     <li>
144                         <a class="toplinks" href="/cgi-bin/koha/circ/selectdesk.pl">Set desk</a>
145                     </li>
146                     [% END %]
147                     [% IF EnableSearchHistory %]
148                     <li>
149                         <a class="toplinks" href="/cgi-bin/koha/catalogue/search-history.pl">Search history</a>
150                     </li>
151                     [% END %]
152                     [% IF loggedinusernumber %]
153                         <li class ="toplinks-myaccount">
154                             <a class="toplinks" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loggedinusernumber | html %]">My account</a>
155                         </li>
156                         <li class="toplinks-mycheckouts">
157                             <a class="toplinks" href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% loggedinusernumber | html %]">My checkouts</a>
158                         </li>
159                     [% END %]
160                     <li>
161                         <a id="logout" class="toplinks" href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log out</a>
162                     </li>
163                 </ul>
164             </li>
165             [% INCLUDE 'langmenu-staff-top.inc' %]
166             <li>
167                 <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper"><i class="fa fa-question-circle"></i> <span>Help</span></a>
168             </li>
169             [% ELSE %]
170             <li class="loggedout">
171                 <span>
172                     <a href="/cgi-bin/koha/mainpage.pl" id="login">Log in</a>
173                     <span class="separator">|</span>
174                     <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper"><i class="fa fa-question-circle"></i> <span>Help</span></a>
175                 </span>
176             </li>
177             [% END %]
178         </ul>
179
180     [% IF Koha.Preference('showLastPatron') %][% INCLUDE 'last-borrower.inc' %][% END %]
181     [% IF ( intranetbookbag ) %]<div id="cartDetails">Your cart is empty.</div>[% END %]
182
183 </nav>