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