Bug 17486: Remove Mozilla Persona
[koha-equinox.git] / koha-tmpl / opac-tmpl / bootstrap / en / includes / masthead.inc
1 [% USE Koha %]
2 [% USE Branches %]
3 [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %]
4 <div id="wrap">
5     <div id="header-region" class="noprint">
6         <div class="navbar navbar-inverse navbar-static-top">
7             <div class="navbar-inner">
8                 <div class="container-fluid">
9                     <h1 id="logo">
10                         <a class="brand" href="/cgi-bin/koha/opac-main.pl">
11                             [% IF ( LibraryNameTitle ) %]
12                                 [% LibraryNameTitle %]
13                             [% ELSE %]
14                                 Koha online
15                             [% END %]
16                         </a>
17                     </h1>
18                     [% IF ( Koha.Preference( 'opacbookbag' ) == 1 ) %]
19                         <div id="cartDetails" class="cart-message">Your cart is empty.</div>
20                     [% END %]
21                     <ul class="nav">
22                         [% IF ( Koha.Preference( 'opacbookbag' ) == 1 ) %]
23                             <li class="dropdown">
24                                 <a href="#" title="Collect items you are interested in" class="dropdown-toggle" id="cartmenulink" data-toggle="dropdown" role="button">
25                                     <i id="carticon" class="icon-shopping-cart icon-white"></i> <span class="cartlabel">Cart</span> <span id="basketcount"></span> <b class="caret"></b>
26                                 </a>
27                                 <ul aria-labelledby="cartmenulink" role="menu" class="dropdown-menu">
28                                     <li role="presentation">
29                                         <a href="#" id="cartmenuitem" class="cart-message" tabindex="-1" role="menuitem">Your cart is empty.</a>
30                                     </li>
31                                 </ul>
32                             </li>
33                         [% END %]
34                         [% IF ( Koha.Preference( 'virtualshelves' ) == 1 ) && ( Koha.Preference( 'opacbookbag' ) == 1 ) %]
35                             <li class="divider-vertical"></li>
36                         [% END %]
37                         [% IF ( Koha.Preference( 'virtualshelves' ) == 1 ) %]
38                             <li class="dropdown">
39                                 <a href="#" title="Show lists" class="dropdown-toggle" id="listsmenu" data-toggle="dropdown" role="button"><i class="icon-list icon-white"></i> <span class="listslabel">Lists</span> <b class="caret"></b></a>
40                                 <ul aria-labelledby="listsmenu" role="menu" class="dropdown-menu">
41                                 [% IF some_public_shelves.count %]
42                                     <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=2" tabindex="-1" role="menuitem"><strong>Public lists</strong></a></li>
43                                     [% SET number_of_public_shelves = 0 %]
44                                     [% FOREACH s IN some_public_shelves %]
45                                         <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% s.shelfnumber %]&amp;sortfield=[% s.sortfield %]" tabindex="-1" role="menuitem">[% s.shelfname |html %]</a></li>
46                                         [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
47                                         [% IF number_of_public_shelves >= 10 %][% LAST %][% END %]
48                                     [% END %]
49                                     [% IF some_public_shelves > 10 %]
50                                         <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=2" tabindex="-1" role="menuitem" class="listmenulink">View All</a></li>
51                                     [% END %]
52                                 [% ELSE %]
53                                     <li role="presentation"><a href="#" tabindex="-1" class="menu-inactive" role="menuitem">No public lists</a></li>
54                                 [% END %]
55                                 <li class="divider" role="presentation"></li>
56                                 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
57                                     <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=1" tabindex="-1" role="menuitem"><strong>Your lists</strong></a></li>
58                                     [% IF loggedinusername %]
59                                         [% IF some_private_shelves.count %]
60                                             [% SET number_of_private_shelves = 0 %]
61                                             [% FOREACH s IN some_private_shelves %]
62                                                 <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% s.shelfnumber %]&amp;sortfield=[% s.sortfield %]" tabindex="-1" role="menuitem">[% s.shelfname |html %]</a></li>
63                                                 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
64                                                 [% IF number_of_private_shelves >= 10 %][% LAST %][% END %]
65                                             [% END %]
66                                             [% IF some_private_shelves > 10 %]
67                                                 <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=1" tabindex="-1" role="menuitem" class="listmenulink">View All</a></li>
68                                             [% END %]
69                                         [% ELSE %]
70                                             <li role="presentation"><a href="#" tabindex="-1" class="menu-inactive" role="menuitem">No private lists</a></li>
71                                             <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=1" tabindex="-1" role="menuitem" class="listmenulink">New list</a></li>
72                                         [% END %]
73                                     [% ELSE %]
74                                         <li role="presentation"><a href="/cgi-bin/koha/opac-user.pl" tabindex="-1" class="menu-inactive loginModal-trigger" role="menuitem">Log in to create your own lists</a></li>
75                                     [% END # / IF loggedinusername %]
76                                 [% END # / IF opacuserlogin %]
77                                 </ul> <!-- / .dropdown-menu -->
78                             </li> <!-- / .dropdown -->
79                         [% END # / IF virtualshelves %]
80                     </ul> <!-- / .nav -->
81                     [% IF Koha.Preference( 'virtualshelves' ) == 1 %]<div id="listsDetails"></div>[% END %]
82                     [% IF Koha.Preference( 'opacuserlogin' ) == 1 || opaclanguagesdisplay || EnableOpacSearchHistory %]
83                         <a id="user-menu-trigger" class="pull-right" href="#"><i class="icon-user"></i> <span class="caret"></span></a>
84                         <div id="members">
85                             <ul class="nav pull-right">
86
87                                 [% INCLUDE 'masthead-langmenu.inc' %]
88
89                                 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
90                                     [% UNLESS ( loggedinusername ) %]
91                                         [% IF Koha.Preference('casAuthentication') %]
92                                             [%# CAS authentication is too complicated for modal window %]
93                                             <li><a href="/cgi-bin/koha/opac-user.pl">Log in to your account</a></li>
94                                         [% ELSIF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
95                                             <li><a href="/cgi-bin/koha/svc/auth/googleopenidconnect" role="button" data-toggle="modal">Log in to your account</a></li>
96                                         [% ELSE %]
97                                             <li><a href="/cgi-bin/koha/opac-user.pl" class="loginModal-trigger" role="button" data-toggle="modal">Log in to your account</a></li>
98                                         [% END %]
99                                     [% END %]
100                                     [% IF ( loggedinusername ) %]
101                                         <li><p class="members navbar-text">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</span></a></p></li>
102                                         <li class="divider-vertical"></li>
103                                     [% END %]
104                                 [% END %]
105                                 [% IF EnableOpacSearchHistory %]
106                                     <li><p class="navbar-text"><a href="/cgi-bin/koha/opac-search-history.pl" title="View your search history">Search history</a> [<a class="logout clearsh" href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history">x</a>]</p></li>
107                                     <li class="divider-vertical"></li>
108                                 [% END %]
109                                 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
110                                     [% IF ( loggedinusername ) %]
111                                         <li><p class="navbar-text">
112                                             <a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1">
113                                             Log out</a></p></li>
114                                     [% END %]
115                                 [% END %]
116                             </ul>
117                         </div> <!-- /members -->
118                     [% END # IF opacuserlogin %]
119                 </div> <!-- /container-fluid -->
120             </div> <!-- /navbar-inner -->
121         </div> <!-- /navbar -->
122
123         [% IF ( opacheader ) %]
124             <div class="container-fluid">
125                 <div class="row-fluid">
126                     <div id="opacheader">
127                         [% opacheader %]
128                     </div>
129                 </div>
130             </div>
131         [% END %]
132     </div> <!-- / header-region -->
133
134     <div class="container-fluid">
135         <div class="row-fluid">
136             <div id="opac-main-search">
137     <!--             <div class="span2">
138         [% IF ( opacsmallimage ) %]
139             <h1 id="libraryname" style="background-image: url('[% opacsmallimage %]');">
140         [% ELSE %]
141             <h1 id="libraryname">
142         [% END %]
143             <a href="/cgi-bin/koha/opac-main.pl">[% IF ( LibraryName ) %][% LibraryName %][% ELSE %]Koha Online Catalog[% END %]</a></h1>
144     </div> /.span2 -->
145             <div class="span12">
146                 [% IF ( OpacPublic ) %]
147                     [% UNLESS ( advsearch ) %]
148                         [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
149                             <div class="mastheadsearch librarypulldown">
150                         [% ELSE %]
151                             <div class="mastheadsearch">
152                         [% END %]
153                         [% IF Koha.Preference('OpacCustomSearch') == '' %]
154                             <form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="form-inline">
155                                 <label for="masthead_search"> Search
156                                     [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
157                                         [% IF ( mylibraryfirst ) %]
158                                             (in [% mylibraryfirst %] only)
159                                         [% END %]
160                                     [% END %]
161                                 </label>
162
163                                 <select name="idx" id="masthead_search">
164                                 [% IF ( ms_kw ) %]
165                                     <option selected="selected" value="">Library catalog</option>
166                                 [% ELSE %]
167                                     <option value="">Library catalog</option>
168                                 [% END # /ms_kw %]
169                                 [% IF ( ms_ti ) %]
170                                     <option selected="selected" value="ti">Title</option>
171                                 [% ELSE %]
172                                     <option value="ti">Title</option>
173                                 [% END # /ms_ti %]
174                                 [% IF ( ms_au ) %]
175                                     <option selected="selected" value="au">Author</option>
176                                 [% ELSE %]
177                                     <option value="au">Author</option>
178                                 [% END # /ms_au%]
179                                 [% IF ( ms_su ) %]
180                                     <option selected="selected" value="su">Subject</option>
181                                 [% ELSE %]
182                                     <option value="su">Subject</option>
183                                 [% END # /ms_su %]
184                                 [% IF ( ms_nb ) %]
185                                     <option selected="selected" value="nb">ISBN</option>
186                                 [% ELSE %]
187                                     <option value="nb">ISBN</option>
188                                 [% END # /ms_nb%]
189                                 [% IF ( ms_se ) %]
190                                     <option selected="selected" value="se">Series</option>
191                                 [% ELSE %]
192                                     <option value="se">Series</option>
193                                 [% END # /ms_se %]
194                                 [% IF ( numbersphr ) %]
195                                     [% IF ( ms_callnum ) %]
196                                             <option selected="selected" value="callnum,phr">Call number</option>
197                                     [% ELSE %]
198                                         <option value="callnum,phr">Call number</option>
199                                     [% END #/ms_callnum %]
200                                 [% ELSE %]
201                                     [% IF ( ms_callnum ) %]
202                                         <option selected="selected" value="callnum">Call number</option>
203                                     [% ELSE %]
204                                         <option value="callnum">Call number</option>
205                                     [% END # /ms_callnum %]
206                                 [% END # /numbersphr %]
207                                 </select>
208
209                                 [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
210                                     <div class="input-append nolibrarypulldown">
211                                 [% END %]
212                                 [% IF ( ms_value ) %]
213                                     <input type="text" title="Type search term" class="transl1" id = "translControl1" name="q" value="[% ms_value |html %]" /><span id="translControl"></span>
214                                 [% ELSE %]
215                                     <input type="text" title="Type search term" class="transl1" id = "translControl1" name="q" /><span id="translControl"></span>
216                                 [% END # /ms_value %]
217
218                                 [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
219                                     <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
220                                     </div>
221                                 [% END %]
222
223                                 [% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
224                                     <div class="input-append">
225                                         <select name="branch_group_limit" id="select_library">
226                                             <option value="">All libraries</option>
227                                             [% IF BranchCategoriesLoop %]<optgroup label="Libraries">[% END %]
228                                                 [% FOREACH BranchesLoo IN Branches.all( selected => opac_name ) %]
229                                                     [% IF BranchesLoo.selected %]
230                                                         <option selected="selected" value="branch:[% BranchesLoo.branchcode %]">[% BranchesLoo.branchname %]</option>
231                                                     [% ELSE %]
232                                                         <option value="branch:[% BranchesLoo.branchcode %]">[% BranchesLoo.branchname %]</option>
233                                                     [% END %]
234                                                 [% END %]
235                                             [% IF BranchCategoriesLoop %]
236                                                 </optgroup>
237                                                 <optgroup label="Groups">
238                                                     [% FOREACH bc IN BranchCategoriesLoop %]
239                                                         [% IF bc.categorycode == opac_name %]
240                                                             <option selected="selected" value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
241                                                         [% ELSE %]
242                                                             <option value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
243                                                         [% END # / bc.selected %]
244                                                     [% END %]
245                                                 </optgroup>
246                                             [% END # / BranchCategoriesLoop %]
247                                         </select>
248                                         <button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
249                                     </div>
250                                 [% ELSE %]
251                                     [% IF ( opac_limit_override ) %]
252                                         [% IF ( opac_search_limit ) %]
253                                             <input name="limit" value="[% opac_search_limit %]" type="hidden" />
254                                         [% END %]
255                                     [% ELSE %]
256                                         [% IF ( mylibraryfirst ) %]
257                                             <input name="limit" value="branch:[% mylibraryfirst %]" type="hidden" />
258                                         [% END %]
259                                     [% END # / opac_limit_override %]
260                                 [% END # / OpacAddMastheadLibraryPulldown %]
261
262                             </form>
263                         [% ELSE # / Koha.Preference('OpacCustomSearch') == '' %]
264                             [% Koha.Preference('OpacCustomSearch') %]
265                         [% END # / Koha.Preference('OpacCustomSearch') == '' %]
266                         </div> <!-- / .mastheadsearch -->
267                     [% END # / UNLESS advsearch %]
268
269                     <div class="row-fluid">
270                             <div id="moresearches">
271                                 <ul>
272                                     <li><a href="/cgi-bin/koha/opac-search.pl">Advanced search</a></li>
273                                     [% IF ( Koha.Preference( 'UseCourseReserves' ) == 1 ) %]<li><a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a></li>[% END %]
274                                     [% IF Koha.Preference( 'OpacBrowser' ) == 1 %]<li><a href="/cgi-bin/koha/opac-browser.pl">Browse by hierarchy</a></li>[% END %]
275                                     [% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]<li><a href="/cgi-bin/koha/opac-authorities-home.pl">Authority search</a></li>[% END %]
276                                     [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'reviewson' ) == 1 ) && ( Koha.Preference( 'OpacShowRecentComments' ) == 1 ) ) %]<li><a href="/cgi-bin/koha/opac-showreviews.pl">Recent comments</a></li>[% END %]
277                                     [% IF Koha.Preference( 'TagsEnabled' ) == 1 %]<li><a href="/cgi-bin/koha/opac-tags.pl">Tag cloud</a></li>[% END %]
278                                     [% IF Koha.Preference( 'OpacCloud' ) == 1 %]<li><a href="/cgi-bin/koha/opac-tags_subject.pl">Subject cloud</a></li>[% END %]
279                                     [% IF Koha.Preference( 'OpacTopissue' ) == 1 %]<li><a href="/cgi-bin/koha/opac-topissues.pl">Most popular</a></li>[% END %]
280                                     [% IF Koha.Preference( 'suggestion' ) == 1 %]
281                                         [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
282                                             <li><a href="/cgi-bin/koha/opac-suggestions.pl">Purchase suggestions</a></li>
283                                         [% ELSIF ( ( Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 ) ) %]
284                                             <li><a href="/cgi-bin/koha/opac-suggestions.pl">Purchase suggestions</a></li>
285                                         [% END %]
286                                     [% END %]
287                                 </ul>
288                             </div> <!-- /#moresearches -->
289                     </div> <!-- /.row-fluid -->
290
291                 [% END # / OpacPublic %]
292             </div> <!-- /.span10 -->
293             </div> <!-- /.opac-main-search -->
294         </div> <!-- / .row-fluid -->
295     </div> <!-- /.container-fluid -->
296
297     <!-- Login form hidden by default, used for modal window -->
298     <div id="loginModal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="modalLoginLabel" aria-hidden="true">
299         <div class="modal-header">
300             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
301             <h3 id="modalLoginLabel">Log in to your account</h3>
302         </div>
303         <form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="modalAuth">
304             <div class="modal-body">
305                     [% IF ( shibbolethAuthentication ) %]
306                     [% IF ( invalidShibLogin ) %]
307                     <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
308                     <div class="alert alert-info">
309                         <p>Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.</p>
310                     </div>
311                     [% ELSE %]
312                     <h4>Shibboleth Login</h4>
313                     <p>If you have a Shibboleth account, please <a href="[% shibbolethLoginUrl %]">click here to login</a>.</p>
314                     <h4>Local Login</h4>
315                     [% END %]
316             [% END %]
317                     <input type="hidden" name="koha_login_context" value="opac" />
318                     <fieldset class="brief">
319                         <label for="muserid">Login:</label><input type="text" id="muserid" name="userid" />
320                         <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" />
321                     [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
322                         <div id="forgotpassword-modal">
323                             <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
324                         </div>
325                     [% END %]
326                     [% IF Koha.Preference( 'NoLoginInstructions' ) %]
327                         <div id="nologininstructions-modal">
328                             [% Koha.Preference( 'NoLoginInstructions' ) %]
329                         </div>
330                     [% END %]
331                         [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<div id="mpatronregistration"><p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p></div>[% END %]
332                     </fieldset>
333             </div>
334             <div class="modal-footer">
335                 <input type="submit" class="btn btn-primary" value="Log in" />
336                 <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a>
337             </div>
338         </form> <!-- /#auth -->
339     </div>  <!-- /#modalAuth  -->