4 [% USE AdditionalContents %]
5 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
6 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %]
8 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %]
10 [% BLOCK delete_shelf %]
11 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline">
12 <input type="hidden" name="op" value="delete" />
13 <input type="hidden" name="referer" value="list" />
14 <input type='hidden' name='public' value='[% public | html %]' />
15 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
16 <button type="submit" class="btn btn-link remove deleteshelf" data-shelfnumber="[% shelf.shelfnumber | html %]" data-shelfname="[% shelf.shelfname | html %]" data-shared="[% shelf.is_shared | html %]" data-count="[% contents.count | html %]">
17 <i class="fa fa-remove" aria-hidden="true"></i>
18 [% IF ( context == "list" ) %]
27 [% INCLUDE 'doc-head-open.inc' %]
28 <title>[% IF op == 'view' %]Contents of [% shelf.shelfname | html %][% ELSE %]Your lists[% END %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
29 [% INCLUDE 'doc-head-close.inc' %]
30 [% BLOCK cssinclude %][% END %]
32 [% IF ( loggedinusername ) %]
33 [% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %]
35 [% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %]
38 [% BLOCK list_permissions %]
40 <label for="allow_changes_from">Allow changes to contents from: </label>
41 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
43 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
45 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
46 <option value="1" selected="selected">Owner only</option>
48 <option value="1">Owner only</option>
51 [% IF shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %]
53 [% IF staffuser == 1 %][% IF shelf.allow_change_from_staff %]<option value="3" selected="selected">Staff only</option>[% ELSE %]<option value="3">Staff only</option>[% END %][% END %]
56   <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span>
57   <span id="staff_remark" style="display:none;color:red;">The "Staff only" permission has no actual effect while this list is strictly private.</span>
61 [% INCLUDE 'masthead.inc' %]
63 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
64 <ol class="breadcrumb">
65 <li class="breadcrumb-item">
66 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
68 [% IF ( loggedinusername ) %]
69 <li class="breadcrumb-item">
70 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
75 <li class="breadcrumb-item">
76 <a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
79 <li class="breadcrumb-item active">
80 <a href="#" aria-current="page">Lists</a>
84 [% IF shelf and shelf.is_private %]
85 [% IF op == 'view' OR op == 'edit_form' %]
86 <li class="breadcrumb-item">
87 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a>
90 <li class="breadcrumb-item active">
91 <a href="#" aria-current="page">Your lists</a>
94 [% ELSIF shelf AND shelf.is_public %]
96 <li class="breadcrumb-item">
97 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a>
100 <li class="breadcrumb-item active">
101 <a href="#" aria-current="page">Public lists</a>
106 [% IF op == 'view' %]
107 <li class="breadcrumb-item active">
108 <a href="#" aria-current="page">Contents of <em>[% shelf.shelfname | html %]</em></a>
112 [% IF op == 'add_form' %]
113 <li class="breadcrumb-item active">
114 <a href="#" aria-current="page">Create new list</a>
118 [% IF op == 'edit_form' %]
119 <li class="breadcrumb-item active">
120 <a href="#" aria-current="page">Edit list <em>[% shelf.shelfname | html %]</em></a>
123 </ol> <!-- / .breadcrumb -->
124 </nav> <!-- /#breadcrumbs -->
126 <div class="container-fluid">
128 [% IF ( OpacNav||loggedinusername ) %]
129 <div class="col col-lg-2 order-2 order-lg-1">
130 <div id="navigation">
131 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
134 <div class="col-md-12 col-lg-10 order-1">
136 <div class="col order-first order-md-first order-lg-2">
139 <div id="usershelves" class="maincontent">
141 [% FOR m IN messages %]
144 <div class="alert alert-success" role="alert">
146 <div class="alert alert-danger" role="alert">
149 [% CASE 'error_on_update' %]
150 <span>An error occurred when updating this list.</span>
151 [% CASE 'error_on_insert' %]
152 <span>An error occurred when creating this list.</span>
153 [% CASE 'error_on_delete' %]
154 <span>An error occurred when deleting this list.</span>
155 [% CASE 'error_on_add_biblio' %]
156 <span>The item has not been added to the list. Please check it's not already in the list.</span>
157 [% CASE 'error_on_remove_share' %]
158 <span>The share has not been removed.</span>
159 [% CASE 'no_email_found' %]
160 <span>No email found for the patrons that accepted the share</span>
161 [% CASE 'success_on_update' %]
162 <span>List updated.</span>
163 [% CASE 'success_on_insert' %]
164 <span>List created.</span>
165 [% CASE 'success_on_delete' %]
166 <span>List deleted.</span>
167 [% CASE 'success_on_add_biblio' %]
168 <span>The item has been added to the list.</span>
169 [% CASE 'success_on_remove_biblios' %]
170 <span>The item has been removed from the list.</span>
171 [% CASE 'success_on_remove_share' %]
172 <span>The share has been removed.</span>
173 [% CASE 'does_not_exist' %]
174 <span>This list does not exist.</span>
175 [% CASE 'item_does_not_exist' %]
176 <span>This item does not exist.</span>
177 [% CASE 'unauthorized_on_view' %]
178 <span>You do not have permission to view this list.</span>
179 [% CASE 'unauthorized_on_insert' %]
180 <span>You do not have permission to create a new list.</span>
181 [% CASE 'unauthorized_on_update' %]
182 <span>You do not have permission to update this list.</span>
183 [% CASE 'unauthorized_on_delete' %]
184 <span>You do not have permission to delete this list.</span>
185 [% CASE 'unauthorized_on_add_biblio' %]
186 <span>You do not have permission to add a record to this list.</span>
187 [% CASE 'unauthorized_transfer' %]
188 <span>You do not have permission to transfer ownership of this list.</span>
189 [% CASE 'no_biblio_removed' %]
190 <span>No record was removed.</span>
191 [% CASE 'new_owner_not_found' %]
192 <span>The new owner could not be found anymore.</span>
193 [% CASE 'new_owner_has_no_share' %]
194 <span>The new owner has no share for this list.</span>
196 [% CASE 'Koha::Exceptions::Virtualshelf::DuplicateObject' %]
197 <span>An error occurred when creating the list. The name [% shelfname | html %] already exists.</span>
198 [% CASE 'DBIx::Class::Exception' %]
207 [% IF shelf AND op == 'view' %]
209 [% shelf.shelfname | html %]
211 <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-shelves.pl?rss=1&op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="rss-list-link noprint" aria-label="Subscribe to this list">
212 <i class="fa fa-fw fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this list"></i>
217 [% IF ( itemsloop ) %]
218 [% SET contents = shelf.get_contents %]
219 [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
221 <div id="toolbar" class="toolbar clearfix">
222 <div class="list-actions">
223 <a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-fw fa-plus" aria-hidden="true"></i> New list</a> <span class="sep">|</span>
225 <div id="download-list" class="btn-group dropdown">
226 <a id="format" class="btn btn-link dropdown-toggle" data-toggle="dropdown" href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | html %]"><i class="fa fa-fw fa-download" aria-hidden="true"></i> Download <b class="caret"></b></a>
227 <div class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
228 <a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a>
229 [% IF Koha.Preference('OPACISBD') %]<a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>[% END %]
230 <a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a>
231 <a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
232 [% FOREACH csv_profile IN csv_profiles %]
233 <a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
238 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
239 <span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelf.shelfnumber | uri %]" class="btn btn-link send" onclick="open('/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelf.shelfnumber | html %]','win_form','scrollbars=yes,resizable=yes,height=400,width=500,top=50,left=100'); return false; "><i class="fa fa-fw fa-envelope" aria-hidden="true"></i> Send list</a></span>
242 <a class="btn btn-link print-small" target="_blank" href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | html %]&sortfield=[% sortfield | html %]&direction=[% direction | uri %]&print=1"><i class="fa fa-fw fa-print" aria-hidden="true"></i> Print list</a>
244 [% IF can_manage_shelf %]
245 <span class="sep">|</span>
246 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
247 <input type="hidden" name="op" value="edit_form" />
248 <input type="hidden" name="referer" value="view" />
249 <input type='hidden' name='public' value='[% shelf.public | html %]' />
250 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
251 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
254 [% PROCESS delete_shelf context = "details" %]
256 [% IF !public && Koha.Preference('OpacAllowSharingPrivateLists') %]
257 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | uri %]" class="btn btn-link sharelist"><i class="fa fa-fw fa-share" aria-hidden="true"></i> Share list</a>
259 [% ELSIF !public # not manageshelf and private means shared %]
260 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
261 <input type="hidden" name="op" value="remove_share" />
262 <input type="hidden" name="referer" value="list" />
263 <input type='hidden' name='public' value='[% public | html %]' />
264 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
265 <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
266 <i class="fa fa-remove" aria-hidden="true"></i> Remove share
269 [% END # /IF can_manage_shelf %]
270 </div> <!-- /.list-actions -->
272 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by pull-right">
273 <input type="hidden" name="op" value="view" />
274 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
276 <label for="sortfield">Sort by: </label>
277 <select name="sortfield" id="sortfield" class="resort">
278 <option value="">Default sorting</option>
279 <optgroup label="Author">
280 [% IF sortfield == 'author' && direction == 'asc' %]
281 <option value="author" data-direction="asc" selected="selected">Author (A-Z)</option>
283 <option value="author" data-direction="asc">Author (A-Z)</option>
285 [% IF sortfield == 'author' && direction == 'desc' %]
286 <option value="author" data-direction="desc" selected="selected">Author (Z-A)</option>
288 <option value="author" data-direction="desc">Author (Z-A)</option>
291 <optgroup label="Title">
292 [% IF sortfield == 'title' && direction == 'asc' %]
293 <option value="title" data-direction="asc" selected="selected">Title (A-Z)</option>
295 <option value="title" data-direction="asc">Title (A-Z)</option>
297 [% IF sortfield == 'title' && direction == 'desc' %]
298 <option value="title" data-direction="desc" selected="selected">Title (Z-A)</option>
300 <option value="title" data-direction="desc">Title (Z-A)</option>
303 <optgroup label="Call number">
304 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
305 <option value="itemcallnumber" data-direction="asc" selected="selected">Call number (A-Z)</option>
307 <option value="itemcallnumber" data-direction="asc">Call number (A-Z)</option>
309 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
310 <option value="itemcallnumber" data-direction="desc" selected="selected">Call number (Z-A)</option>
312 <option value="itemcallnumber" data-direction="desc">Call number (Z-A)</option>
315 <optgroup label="Copyright date">
316 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
317 <option value="copyrightdate" data-direction="desc" selected="selected">Copyright date (newest to oldest)</option>
319 <option value="copyrightdate" data-direction="desc">Copyright date (newest to oldest)</option>
321 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
322 <option value="copyrightdate" data-direction="asc" selected="selected">Copyright date (oldest to newest)</option>
324 <option value="copyrightdate" data-direction="asc">Copyright date (oldest to newest)</option>
327 <optgroup label="Date added">
328 [% IF sortfield == "dateadded" && direction == 'asc' %]
329 <option value="dateadded" data-direction="desc" selected="selected">Date added (newest to oldest)</option>
331 <option value="dateadded" data-direction="desc">Date added (newest to oldest)</option>
333 [% IF sortfield == "dateadded" && direction == 'desc' %]
334 <option value="dateadded" data-direction="asc" selected="selected">Date added (oldest to newest)</option>
336 <option value="dateadded" data-direction="asc">Date added (oldest to newest)</option>
341 <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
342 </form> <!-- /#sorting-form -->
344 </div> <!-- / #toolbar -->
346 <div class="selections-toolbar toolbar noprint">
347 <div class="check_control">
348 <span class="checkall">
349 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
351 <span class="clearall">
352 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
356 <span class="selections">Select titles to: </span>
357 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
358 <span id="placehold">
359 <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
363 [% IF ( TagsInputEnabled && loggedinusername ) %]
365 <a id="tagsel_tag" href="#" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
367 <span id="tagsel_form" class="form-inline" style="display:none">
368 <label for="tagsel_new">New tag(s), separated by a comma:</label>
369 <input class="form-control form-control-sm" type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
370 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-primary btn-sm" title="tagsel_button" type="submit" value="Add" />
371 <a href="#" id="tagsel_cancel">Cancel</a>
374 [% IF loggedinusername && can_remove_biblios %]
375 <span id="removeitems"></span>
377 </div> <!-- / .links -->
378 </div> <!-- / .selections-toolbar -->
379 </div> <!-- /#floating -->
381 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
382 [% IF can_manage_shelf %]
383 <input type="hidden" name="op" value="remove_biblios" />
384 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
386 <div class="searchresults">
387 <table id="listcontents" class="table">
389 [% FOREACH itemsloo IN itemsloop %]
391 [% IF ( itemsloo.title ) %]
392 [% check_title = itemsloo.title %]
394 [% check_title = itemsloo.biblionumber %]
396 <td class="selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" aria-label="[% check_title | html %]"/></td>
397 [% UNLESS ( item_level_itypes ) %]
399 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
400 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
402 <span class="itypetext">[% itemsloo.description | html %]</span>
406 <div class="coverimages">
407 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
408 [% IF ( itemsloo.title ) %]
409 [% img_title = itemsloo.title %]
411 [% img_title = itemsloo.biblionumber %]
414 [% IF ( OPACLocalCoverImages ) %]
415 <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
418 [% IF ( OPACAmazonCoverImages ) %]
419 [% IF ( itemsloo.normalized_isbn ) %]
420 <span title="[% img_title | html %]" id="amazon-thumbnail[% loop.count | html %]"><img src="https://images-na.ssl-images-amazon.com/images/P/[% itemsloo.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" /></span>
422 <span class="no-image">No cover image available</span>
426 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
427 <span title="[% img_title | html %]" id="syndetics-thumbnail[% loop.count | html %]"><img src="https://secure.syndetics.com/index.aspx?isbn=[% itemsloo.normalized_isbn | html %]/[% SyndeticsCoverImageSize | uri %].GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% itemsloo.normalized_upc | html %]&oclc=[% itemsloo.normalized_oclc | html %]" alt="" /></span>
430 [% IF ( GoogleJackets ) %]
431 [% IF ( itemsloo.normalized_isbn ) %]
432 <div title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
434 <span class="no-image">No cover image available</span>
438 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
439 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
441 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
443 <span class="no-image">No cover image available</span>
448 [% IF OpenLibraryCovers %]
449 [% IF itemsloo.normalized_isbn %]
450 <span title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
452 <span class="no-image">No cover image available</span>
457 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
458 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
460 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
462 <span class="no-image">No cover image available</span>
466 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
467 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
469 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
470 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
473 <span class="no-image">No cover image available</span>
477 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
478 [% SET custom_cover_image_url = itemsloo.biblio_object.custom_cover_image_url %]
479 [% IF custom_cover_image_url %]
480 <a class="custom_cover_image" href="[% PROCESS biblio_a_href biblionumber => itemsloo.biblionumber %]">
481 <img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
487 [% itemsloo.XSLTBloc | $raw %]
490 [% IF itemsloo.shelves.count %]
491 <div class="results_summary shelves">
492 <span class="label">Lists:</span>
494 [% FOREACH item_shelf IN itemsloo.shelves %]
496 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% item_shelf.shelfnumber | uri %]">[% item_shelf.shelfname | html %]</a>
497 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
504 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
505 <div class="results_summary tags">
506 <span class="label">Tags:</span>
508 [% FOREACH TagLoo IN itemsloo.TagLoop %]
509 <li><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | uri %]&q=[% TagLoo.term | uri %]">[% TagLoo.term | html %]</a> <span class="weight">([% TagLoo.weight_total | html %])</span></li>
515 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
517 [% INCLUDE "openlibrary-readapi.inc" bib = itemsloo %]
518 <!-- COinS / Openurl -->
519 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
522 [% END # / FOREACH itemsloop %]
524 </table> <!-- / #listcontents -->
525 </div><!-- / .searchresults -->
527 [% IF ( pagination_bar ) %]
528 <div class="pages">[% pagination_bar | $raw %]</div>
531 [% IF can_remove_biblios %]
532 <input type="hidden" name="op" value="remove_biblios" />
533 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
534 <input type="hidden" name="modifyshelfcontents" value="1" />
535 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
537 </form> <!-- /myform -->
539 <div id="toolbar" class="toolbar clearfix">
540 <div class="list-actions">
541 <a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-fw fa-plus" aria-hidden="true"></i> New list</a>
542 [% IF can_manage_shelf %]
543 <span class="sep">|</span>
544 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
545 <input type="hidden" name="op" value="edit_form" />
546 <input type="hidden" name="referer" value="view" />
547 <input type="hidden" name="public" value="[% shelf.public | html %]" />
548 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
549 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
552 [% PROCESS delete_shelf context = "details" %]
555 </div> <!-- / .list-actions -->
556 </div> <!-- / #toolbar -->
558 <div class="alert alert-info">
559 <span>This list is empty.</span>
560 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
561 <span>You can add to your lists from the results of any <a href="opac-main.pl">search</a>.</span>
565 [% IF can_manage_shelf %]
566 <form method="post" action="opac-shelves.pl">
567 <input type="hidden" name="op" value="delete" />
568 <input type="hidden" name="referer" value="list" />
569 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
570 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
573 [% END # / IF itemsloop %]
574 [% END # /IF shelf AND op == 'view' %]
576 [% IF op == 'add_form' OR op == 'edit_form' %]
577 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
578 <fieldset class="rows">
579 [% IF op == 'add_form' %]
581 <legend><h1>Create a new list</h1></legend>
582 <input type="hidden" name="op" value="add" />
584 <legend><h1>Editing <em>[% shelf.shelfname | html %]</em></h1></legend>
585 <input type="hidden" name="op" value="edit" />
586 <input type="hidden" name="referer" value="[% referer | html %]" />
587 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
589 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
592 <label class="required" for="shelfname">List name: </label>
593 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="focus required"/>
594 <span class="required">Required</span></li>
596 <label for="sortfield" >Sort this list by: </label>
597 <select name="sortfield" id="sortfield">
598 [% IF shelf.sortfield == "title" %]
599 <option value="title" selected="selected">Title</option>
601 <option value="title">Title</option>
603 [% IF shelf.sortfield == "author" %]
604 <option value="author" selected="selected">Author</option>
606 <option value="author">Author</option>
608 [% IF shelf.sortfield == "copyrightdate" %]
609 <option value="copyrightdate" selected="selected">Year</option>
611 <option value="copyrightdate">Year</option>
613 [% IF shelf.sortfield == "itemcallnumber" %]
614 <option value="itemcallnumber" selected="selected">Call number</option>
616 <option value="itemcallnumber">Call number</option>
618 [% IF shelf.sortfield == "dateadded" %]
619 <option value="dateadded" selected="selected">Date added</option>
621 <option value="dateadded">Date added</option>
625 [% IF Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
627 <label for="public">Category:</label>
628 <select name="public" id="public" onchange="AdjustRemark()">
629 [% IF shelf.is_private %]
630 <option value="0" selected="selected">Private</option>
632 <option value="0">Private</option>
634 [% IF shelf.is_public %]
635 <option value="1" selected="selected">Public</option>
637 <option value="1">Public</option>
640 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
641 <span class="hint alert alert-info">The library has disabled the ability for patrons to create new public lists. If you make your list private, you will not be able to make it public again.</span>
645 [% INCLUDE list_permissions %]
647 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
648 <input type="hidden" name="public" value="0" />
650 </fieldset> <!-- /.rows -->
652 <fieldset class="action">
653 <input type="submit" value="Save" class="btn btn-primary" />
654 [% IF referer == 'view' %]
655 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
657 <a href="/cgi-bin/koha/opac-shelves.pl?op=list" class="cancel">Cancel</a>
662 [% ELSIF op == 'transfer' %]
663 <h1>Transfer ownership of shared list '[% shelf.shelfname | html %]'</h1>
665 <form action="/cgi-bin/koha/opac-shelves.pl" id="transferform" method="post">
667 <input type="hidden" name="op" value="transfer" />
668 <input type="hidden" name="public" value="0" />
669 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
671 <label for="find_patron">New owner: </label>
672 <select name="new_owner" id="new_owner">
673 [% FOREACH sharee IN shared_users %]
674 <option value="[% sharee.borrowernumber | html %]" selected="">[% sharee.email | html %]</option>
679 <fieldset class="action">
680 <input type="submit" value="Transfer" class="submit" />
681 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0" class="cancel">Cancel</a>
686 [% ELSIF op == 'list' %]
688 <div class="toptabs">
689 <ul class="nav nav-tabs" id="list-tabs">
690 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
692 <li id="privateshelves_tab" class="nav-item">
693 <a class="nav-link active" id="your_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a>
696 <li id="privateshelves_tab" class="nav-item">
697 <a class="nav-link" id="your_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a>
702 <li id="publicshelves_tab" class="nav-item">
703 <a class="nav-link active" id="public_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a>
706 <li id="publicshelves_tab" class="nav-item">
707 <a class="nav-link" id="public_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a>
712 <div class="tab-content">
714 <div id="privateshelves" class="tab-pane active">
716 <div id="publicshelves" class="tab-pane active">
719 [% IF !public || Koha.Preference('OpacAllowPublicListCreation') %]
720 [% IF loggedinusername %]
721 <div id="toolbar" class="toolbar"><a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-plus" aria-hidden="true"></i> New list</a></div>
723 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
724 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form">Log in to create a new list</a></div>
729 [% IF shelves.count %]
730 <table class="table">
732 <caption class="sr-only">Your lists</caption>
734 <caption class="sr-only">Public lists</caption>
745 [% FOREACH s IN shelves %]
746 [% SET contents = s.get_contents %]
748 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
749 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]<span>item</span>[% ELSE %]<span>items</span>[% END %][% ELSE %]<span>Empty</span>[% END %]</td>
751 [% IF s.is_private %]
752 [% IF s.is_shared %]<span>Shared</span>[% ELSE %]<span>Private</span>[% END %]
758 [% IF s.can_be_managed( loggedinusernumber ) %]
759 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
760 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
761 <input type="hidden" name="public" value="[% s.public | html %]" />
762 <input type="hidden" name="op" value="edit_form" />
763 <input type="hidden" name="referer" value="list" />
764 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
767 [% IF s.can_be_deleted( loggedinusernumber ) %]
768 [% PROCESS delete_shelf shelf = s context = "list" %]
770 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
771 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber | uri %]" class="sharelist btn btn-link"><i class="fa fa-share" aria-hidden="true"></i> Share</a>
773 [% IF s.is_shared AND s.can_be_managed( loggedinusernumber ) %]
774 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
775 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
776 <input type="hidden" name="public" value="0" />
777 <input type="hidden" name="op" value="transfer" />
778 <input type="hidden" name="referer" value="list" />
779 <button type="submit" class="btn btn-link transfershelf"> Transfer</button>
782 [% IF s.is_shared_with( loggedinusernumber ) %]
783 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
784 <input type="hidden" name="op" value="remove_share" />
785 <input type="hidden" name="referer" value="list" />
786 <input type='hidden' name='public' value='[% public | html %]' />
787 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
788 <button type="submit" class="btn btn-link remove remove_share"
789 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
796 </table> <!-- /.table -->
797 <div class="pages">[% pagination_bar | $raw %]</div>
800 <p>No public lists.</p>
801 [% ELSIF loggedinusernumber %]
802 <p>No private lists.</p>
804 [% END # /IF shelves.count %]
805 </div> <!-- /.tab-content -->
806 </div> <!-- /.toptabs -->
807 [% ELSIF NOT loggedinusernumber %]
808 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
809 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form">Log in to create a new list</a></div>
811 [% END # IF op == 'add_form' OR op == 'edit_form' %]
812 </div> <!-- / #usershelves -->
813 </div> <!-- / .col-lg-10/12 -->
814 </div> <!-- / .row -->
815 </div> <!-- / .container-fluid -->
816 </div> <!-- / .main -->
818 <form method="post" id="download_list" action="/cgi-bin/koha/opac-downloadshelf.pl">
819 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
820 <input type="hidden" name="format" id="download_format" value="" />
823 [% INCLUDE 'opac-bottom.inc' %]
824 [% BLOCK jsinclude %]
825 [% Asset.js("lib/hc-sticky.js") | $raw %]
826 [% IF OpenLibraryCovers || OpenLibrarySearch %]
827 [% Asset.js("js/openlibrary.js") | $raw %]
830 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
831 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
832 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
833 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
835 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
836 function holdSelections() {
837 var checkedBoxes = $("input:checkbox:checked");
838 if ($(checkedBoxes).size() == 0) {
839 alert( __("No item was selected") );
842 $(checkedBoxes).each(function(){
843 bibs += $(this).val() + "/";
845 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
849 [% IF ( TagsInputEnabled && loggedinusername ) %]
850 function tagSelected() {
851 var checkedBoxes = $("input:checkbox:checked");
852 if ($(checkedBoxes).size()) {
853 $("#tagsel_tag").hide();
854 $(".tag_hides").hide();
855 $("#tagsel_form").show();
857 alert( __("No item was selected") );
861 function tagCanceled() {
862 $("#tagsel_form").hide();
863 $("#tagsel_tag").show();
864 $(".tag_hides").show();
865 $("#tagsel_new").val("");
866 $(".tagstatus").empty().hide();
869 function tagAdded() {
870 var checkedBoxes = $("input:checkbox:checked");
871 if (!$(checkedBoxes).size()) {
872 alert( __("No item was selected") );
876 var tag = $("#tagsel_new").val();
877 if (!tag || (tag == "")) {
878 alert(MSG_NO_TAG_SPECIFIED);
883 for (var i = 0; i < $(checkedBoxes).size(); i++) {
884 var box = $(checkedBoxes).get(i);
885 bibs[i] = $(box).val();
888 KOHA.Tags.add_multitags_button(bibs, tag);
893 function enableCheckboxActions(){
894 // Enable/disable controls if checkboxes are checked
895 var checkedBoxes = $(".cb:checked");
896 if ($(checkedBoxes).size()) {
897 $(".selections").html(_("With selected titles: "));
898 $(".selections-toolbar .links a").removeClass("disabled");
900 $(".selections").html(_("Select titles to: "));
901 $(".selections-toolbar .links a").addClass("disabled");
906 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
908 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
909 $(".selections-toolbar a.hold").click(function(e){
917 $("#CheckAll").on("click",function(e){
919 $(".cb").prop("checked", true);
920 enableCheckboxActions();
922 $("#CheckNone").on("click",function(e){
924 $(".cb").prop("checked", false);
925 enableCheckboxActions();
928 $(".cb").click(function(){
929 enableCheckboxActions();
931 enableCheckboxActions();
933 [% IF ( TagsInputEnabled && loggedinusername ) %]
934 var tagAdd = $(".tag_add");
935 tagAdd.removeClass("hidden");
936 $("#tagsel_tag").click(function(){
940 $("#tagsel_cancel").click(function(){
944 $("#tagsel_button").click(function(){
949 tagAdd.click(function(){
950 var thisid = $(this).attr("id");
951 thisid = thisid.replace("tag_add","");
953 $("#tagform"+thisid).show();
954 $("#newtag"+thisid).focus();
955 $("#newtag"+thisid+"_status").empty().hide();
958 $(".cancel_tag_add").click(function(){
959 var thisid = $(this).attr("id");
960 thisid = thisid.replace("cancel","");
961 $("#tagform"+thisid).hide();
962 $("#tag_add"+thisid).show();
963 $("#newtag"+thisid).val("");
964 $("#newtag"+thisid+"_status").empty().hide();
967 $(".tagbutton").click(function(){
968 var thisid = $(this).attr("title");
969 var tag = $("#newtag"+thisid).val();
970 if (!tag || (tag == "")) {
971 alert(MSG_NO_TAG_SPECIFIED);
974 KOHA.Tags.add_tag_button(thisid, tag);
979 [% IF loggedinusername && can_remove_biblios %]
980 $(".removefromlist").on("click", function(e){
981 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
984 $("#myform").submit(function(){
985 var checkedBoxes = $(".cb:checked");
986 var numchecked = $(checkedBoxes).size();
988 if( numchecked > 1 ){
989 return confirmDelete(MSG_REMOVE_FROM_LIST);
991 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
994 alert( __("No item was selected") );
998 $("#removeitems").html("<a href=\"#\" class=\"btn btn-link disabled removeitems tag_hides\"><i class=\"fa fa-fw fa-remove\" aria-hidden=\"true\"></i> "+_("Remove from list")+"</a>")
1000 $("#myform").submit();
1004 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
1005 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
1006 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1007 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1008 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
1013 window.onafterprint = function () {
1016 setTimeout('window.close()', 1000); // Hack for Chrome < 63
1021 Sticky = $("#floating");
1023 stickTo: "#usershelves",
1024 stickyClass: "floating"
1028 sortMenu( $("#sorting-form") );
1030 $("#sortfield").on("change", function(){
1031 $('#sorting-form').submit();
1035 $(".deleteshelf").on("click", function(e){
1037 var shelf_name = $(this).data("shelfname");
1038 var shelf_number = $(this).data("shelfnumber");
1039 var is_shared = $(this).data("shared");
1040 var count = $(this).data("count");
1041 var message = "<p><em>" + shelf_name + "</em></p>";
1043 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
1046 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
1048 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
1050 $("#deleteshelf" + shelf_number ).submit();
1056 $(".remove_share").on("click", function(e){
1058 var shelf_name = $(this).data("shelfname");
1059 var shelf_number = $(this).data("shelfnumber");
1060 confirmModal( shelf_name, _("Are you sure you want to remove sharing? You will no longer have access to the list."), _("Yes, remove sharing"), _("No, do not remove sharing"), function( result ){
1062 $("#unshare" + shelf_number ).submit();
1068 $(".download-list").on("click", function(e){
1070 var format = $(this).data("format");
1071 $("#download_format").val( format );
1072 $("#download_list").submit();
1075 }); // document.ready
1077 function sortMenu( sorting_form ){
1078 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1079 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1080 var menu = "<div class=\"btn-group dropdown\"><button type=\"button\" class=\"btn btn-link dropdown-toggle\" data-toggle=\"dropdown\" id=\"sortmenu\" aria-haspopup=\"true\" aria-expanded=\"false\"><i class=\"fa fa-sort\" aria-hidden=\"true\"></i> " + _("Sort") + "</span></button><div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"sortmenu\">";
1081 $("#sortfield").children().each(function(){
1082 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1083 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1084 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1085 menu += "<span class=\"dropdown-header\">" + $(this).attr("label") + "</span>";
1086 $(this).children().each(function(){
1087 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1088 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "&direction=" + $(this).data('direction') + "\">" + $(this).text() + "</a>";
1094 $(".list-actions").append( menu );
1095 sorting_form.remove();
1098 function AdjustRemark() {
1100 if( $("#public").length > 0 ) {
1101 public = $("#public").val();
1103 public = "[% public | html %]";
1105 var perms = $("#allow_changes_from").val();
1108 $("#anyone_remark").hide();
1109 $("#staff_remark").hide();
1110 } else if( public==0 ) {
1111 // If we move to Private (without shares), show Anyone remark
1112 // Note: the number of shares is not tested real-time
1113 [% IF !shelf.is_shared %]
1115 $("#anyone_remark").show();
1116 $("#staff_remark").hide();
1117 } else if ( perms==3 ) {
1118 $("#anyone_remark").hide();
1119 $("#staff_remark").show();
1122 $("#anyone_remark").hide();
1123 $("#staff_remark").hide();
1125 } else { // public==1
1126 $("#anyone_remark").hide();
1127 $("#staff_remark").hide();