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 [% itemsloo.description | html %]
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 %]/SC.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 %]
489 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
490 <div class="results_summary tags">
491 <span class="label">Tags:</span>
493 [% FOREACH TagLoo IN itemsloo.TagLoop %]
494 <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>
500 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
502 [% INCLUDE "openlibrary-readapi.inc" bib = itemsloo %]
503 <!-- COinS / Openurl -->
504 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
507 [% END # / FOREACH itemsloop %]
509 </table> <!-- / #listcontents -->
510 </div><!-- / .searchresults -->
512 [% IF ( pagination_bar ) %]
513 <div class="pages">[% pagination_bar | $raw %]</div>
516 [% IF can_remove_biblios %]
517 <input type="hidden" name="op" value="remove_biblios" />
518 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
519 <input type="hidden" name="modifyshelfcontents" value="1" />
520 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
522 </form> <!-- /myform -->
524 <div id="toolbar" class="toolbar clearfix">
525 <div class="list-actions">
526 <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>
527 [% IF can_manage_shelf %]
528 <span class="sep">|</span>
529 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
530 <input type="hidden" name="op" value="edit_form" />
531 <input type="hidden" name="referer" value="view" />
532 <input type="hidden" name="public" value="[% shelf.public | html %]" />
533 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
534 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
537 [% PROCESS delete_shelf context = "details" %]
540 </div> <!-- / .list-actions -->
541 </div> <!-- / #toolbar -->
543 <div class="alert alert-info">
544 <span>This list is empty.</span>
545 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
546 <span>You can add to your lists from the results of any <a href="opac-main.pl">search</a>.</span>
550 [% IF can_manage_shelf %]
551 <form method="post" action="opac-shelves.pl">
552 <input type="hidden" name="op" value="delete" />
553 <input type="hidden" name="referer" value="list" />
554 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
555 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
558 [% END # / IF itemsloop %]
559 [% END # /IF shelf AND op == 'view' %]
561 [% IF op == 'add_form' OR op == 'edit_form' %]
562 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
563 <fieldset class="rows">
564 [% IF op == 'add_form' %]
566 <legend><h1>Create a new list</h1></legend>
567 <input type="hidden" name="op" value="add" />
569 <legend><h1>Editing <em>[% shelf.shelfname | html %]</em></h1></legend>
570 <input type="hidden" name="op" value="edit" />
571 <input type="hidden" name="referer" value="[% referer | html %]" />
572 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
574 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
577 <label class="required" for="shelfname">List name: </label>
578 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="focus required"/>
579 <span class="required">Required</span></li>
581 <label for="sortfield" >Sort this list by: </label>
582 <select name="sortfield" id="sortfield">
583 [% IF shelf.sortfield == "title" %]
584 <option value="title" selected="selected">Title</option>
586 <option value="title">Title</option>
588 [% IF shelf.sortfield == "author" %]
589 <option value="author" selected="selected">Author</option>
591 <option value="author">Author</option>
593 [% IF shelf.sortfield == "copyrightdate" %]
594 <option value="copyrightdate" selected="selected">Year</option>
596 <option value="copyrightdate">Year</option>
598 [% IF shelf.sortfield == "itemcallnumber" %]
599 <option value="itemcallnumber" selected="selected">Call number</option>
601 <option value="itemcallnumber">Call number</option>
603 [% IF shelf.sortfield == "dateadded" %]
604 <option value="dateadded" selected="selected">Date added</option>
606 <option value="dateadded">Date added</option>
610 [% IF Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
612 <label for="public">Category:</label>
613 <select name="public" id="public" onchange="AdjustRemark()">
614 [% IF shelf.is_private %]
615 <option value="0" selected="selected">Private</option>
617 <option value="0">Private</option>
619 [% IF shelf.is_public %]
620 <option value="1" selected="selected">Public</option>
622 <option value="1">Public</option>
625 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
626 <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>
630 [% INCLUDE list_permissions %]
632 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
633 <input type="hidden" name="public" value="0" />
635 </fieldset> <!-- /.rows -->
637 <fieldset class="action">
638 <input type="submit" value="Save" class="btn btn-primary" />
639 [% IF referer == 'view' %]
640 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
642 <a href="/cgi-bin/koha/opac-shelves.pl?op=list" class="cancel">Cancel</a>
647 [% ELSIF op == 'transfer' %]
648 <h1>Transfer ownership of shared list '[% shelf.shelfname | html %]'</h1>
650 <form action="/cgi-bin/koha/opac-shelves.pl" id="transferform" method="post">
652 <input type="hidden" name="op" value="transfer" />
653 <input type="hidden" name="public" value="0" />
654 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
656 <label for="find_patron">New owner: </label>
657 <select name="new_owner" id="new_owner">
658 [% FOREACH sharee IN shared_users %]
659 <option value="[% sharee.borrowernumber | html %]" selected="">[% sharee.email | html %]</option>
664 <fieldset class="action">
665 <input type="submit" value="Transfer" class="submit" />
666 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0" class="cancel">Cancel</a>
671 [% ELSIF op == 'list' %]
673 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
674 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
675 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
677 <li id="privateshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a></li>
679 <li id="privateshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a></li>
683 <li id="publicshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a></li>
685 <li id="publicshelves_tab" class="ui-state-default ui-corner-top"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a></li>
690 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
692 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
695 [% IF !public || Koha.Preference('OpacAllowPublicListCreation') %]
696 [% IF loggedinusername %]
697 <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>
699 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
700 <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>
705 [% IF shelves.count %]
706 <table class="table">
708 <caption class="sr-only">Your lists</caption>
710 <caption class="sr-only">Public lists</caption>
721 [% FOREACH s IN shelves %]
722 [% SET contents = s.get_contents %]
724 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
725 <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>
727 [% IF s.is_private %]
728 [% IF s.is_shared %]<span>Shared</span>[% ELSE %]<span>Private</span>[% END %]
734 [% IF s.can_be_managed( loggedinusernumber ) %]
735 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
736 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
737 <input type="hidden" name="public" value="[% s.public | html %]" />
738 <input type="hidden" name="op" value="edit_form" />
739 <input type="hidden" name="referer" value="list" />
740 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
743 [% IF s.can_be_deleted( loggedinusernumber ) %]
744 [% PROCESS delete_shelf shelf = s context = "list" %]
746 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
747 <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>
749 [% IF s.is_shared AND s.can_be_managed( loggedinusernumber ) %]
750 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
751 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
752 <input type="hidden" name="public" value="0" />
753 <input type="hidden" name="op" value="transfer" />
754 <input type="hidden" name="referer" value="list" />
755 <button type="submit" class="btn btn-link transfershelf"> Transfer</button>
758 [% IF s.is_shared_with( loggedinusernumber ) %]
759 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
760 <input type="hidden" name="op" value="remove_share" />
761 <input type="hidden" name="referer" value="list" />
762 <input type='hidden' name='public' value='[% public | html %]' />
763 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
764 <button type="submit" class="btn btn-link remove remove_share"
765 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
772 </table> <!-- /.table -->
773 <div class="pages">[% pagination_bar | $raw %]</div>
776 <p>No public lists.</p>
777 [% ELSIF loggedinusernumber %]
778 <p>No private lists.</p>
780 [% END # /IF shelves.count %]
782 [% ELSIF NOT loggedinusernumber %]
783 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
784 <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>
786 [% END # IF op == 'add_form' OR op == 'edit_form' %]
787 </div> <!-- / #usershelves -->
788 </div> <!-- / .col-lg-10/12 -->
789 </div> <!-- / .row -->
790 </div> <!-- / .container-fluid -->
791 </div> <!-- / .main -->
793 <form method="post" id="download_list" action="/cgi-bin/koha/opac-downloadshelf.pl">
794 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
795 <input type="hidden" name="format" id="download_format" value="" />
798 [% INCLUDE 'opac-bottom.inc' %]
799 [% BLOCK jsinclude %]
800 [% Asset.js("lib/hc-sticky.js") | $raw %]
801 [% IF OpenLibraryCovers || OpenLibrarySearch %]
802 [% Asset.js("js/openlibrary.js") | $raw %]
805 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
806 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
807 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
808 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
810 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
811 function holdSelections() {
812 var checkedBoxes = $("input:checkbox:checked");
813 if ($(checkedBoxes).size() == 0) {
814 alert( __("No item was selected") );
817 $(checkedBoxes).each(function(){
818 bibs += $(this).val() + "/";
820 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
824 [% IF ( TagsInputEnabled && loggedinusername ) %]
825 function tagSelected() {
826 var checkedBoxes = $("input:checkbox:checked");
827 if ($(checkedBoxes).size()) {
828 $("#tagsel_tag").hide();
829 $(".tag_hides").hide();
830 $("#tagsel_form").show();
832 alert( __("No item was selected") );
836 function tagCanceled() {
837 $("#tagsel_form").hide();
838 $("#tagsel_tag").show();
839 $(".tag_hides").show();
840 $("#tagsel_new").val("");
841 $(".tagstatus").empty().hide();
844 function tagAdded() {
845 var checkedBoxes = $("input:checkbox:checked");
846 if (!$(checkedBoxes).size()) {
847 alert( __("No item was selected") );
851 var tag = $("#tagsel_new").val();
852 if (!tag || (tag == "")) {
853 alert(MSG_NO_TAG_SPECIFIED);
858 for (var i = 0; i < $(checkedBoxes).size(); i++) {
859 var box = $(checkedBoxes).get(i);
860 bibs[i] = $(box).val();
863 KOHA.Tags.add_multitags_button(bibs, tag);
868 function enableCheckboxActions(){
869 // Enable/disable controls if checkboxes are checked
870 var checkedBoxes = $(".cb:checked");
871 if ($(checkedBoxes).size()) {
872 $(".selections").html(_("With selected titles: "));
873 $(".selections-toolbar .links a").removeClass("disabled");
875 $(".selections").html(_("Select titles to: "));
876 $(".selections-toolbar .links a").addClass("disabled");
881 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
883 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
884 $(".selections-toolbar a.hold").click(function(e){
892 $("#CheckAll").on("click",function(e){
894 $(".cb").prop("checked", true);
895 enableCheckboxActions();
897 $("#CheckNone").on("click",function(e){
899 $(".cb").prop("checked", false);
900 enableCheckboxActions();
903 $(".cb").click(function(){
904 enableCheckboxActions();
906 enableCheckboxActions();
908 [% IF ( TagsInputEnabled && loggedinusername ) %]
909 var tagAdd = $(".tag_add");
910 tagAdd.removeClass("hidden");
911 $("#tagsel_tag").click(function(){
915 $("#tagsel_cancel").click(function(){
919 $("#tagsel_button").click(function(){
924 tagAdd.click(function(){
925 var thisid = $(this).attr("id");
926 thisid = thisid.replace("tag_add","");
928 $("#tagform"+thisid).show();
929 $("#newtag"+thisid).focus();
930 $("#newtag"+thisid+"_status").empty().hide();
933 $(".cancel_tag_add").click(function(){
934 var thisid = $(this).attr("id");
935 thisid = thisid.replace("cancel","");
936 $("#tagform"+thisid).hide();
937 $("#tag_add"+thisid).show();
938 $("#newtag"+thisid).val("");
939 $("#newtag"+thisid+"_status").empty().hide();
942 $(".tagbutton").click(function(){
943 var thisid = $(this).attr("title");
944 var tag = $("#newtag"+thisid).val();
945 if (!tag || (tag == "")) {
946 alert(MSG_NO_TAG_SPECIFIED);
949 KOHA.Tags.add_tag_button(thisid, tag);
954 [% IF loggedinusername && can_remove_biblios %]
955 $(".removefromlist").on("click", function(e){
956 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
959 $("#myform").submit(function(){
960 var checkedBoxes = $(".cb:checked");
961 var numchecked = $(checkedBoxes).size();
963 if( numchecked > 1 ){
964 return confirmDelete(MSG_REMOVE_FROM_LIST);
966 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
969 alert( __("No item was selected") );
973 $("#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>")
975 $("#myform").submit();
979 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
980 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
981 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
982 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
983 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
988 window.onafterprint = function () {
991 setTimeout('window.close()', 1000); // Hack for Chrome < 63
996 Sticky = $("#floating");
998 stickTo: "#usershelves",
999 stickyClass: "floating"
1003 sortMenu( $("#sorting-form") );
1005 $("#sortfield").on("change", function(){
1006 $('#sorting-form').submit();
1010 $(".deleteshelf").on("click", function(e){
1012 var shelf_name = $(this).data("shelfname");
1013 var shelf_number = $(this).data("shelfnumber");
1014 var is_shared = $(this).data("shared");
1015 var count = $(this).data("count");
1016 var message = "<p><em>" + shelf_name + "</em></p>";
1018 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
1021 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
1023 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
1025 $("#deleteshelf" + shelf_number ).submit();
1031 $(".remove_share").on("click", function(e){
1033 var shelf_name = $(this).data("shelfname");
1034 var shelf_number = $(this).data("shelfnumber");
1035 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 ){
1037 $("#unshare" + shelf_number ).submit();
1043 $(".download-list").on("click", function(e){
1045 var format = $(this).data("format");
1046 $("#download_format").val( format );
1047 $("#download_list").submit();
1050 }); // document.ready
1052 function sortMenu( sorting_form ){
1053 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1054 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1055 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\">";
1056 $("#sortfield").children().each(function(){
1057 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1058 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1059 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1060 menu += "<span class=\"dropdown-header\">" + $(this).attr("label") + "</span>";
1061 $(this).children().each(function(){
1062 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1063 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "&direction=" + $(this).data('direction') + "\">" + $(this).text() + "</a>";
1069 $(".list-actions").append( menu );
1070 sorting_form.remove();
1073 function AdjustRemark() {
1075 if( $("#public").length > 0 ) {
1076 public = $("#public").val();
1078 public = "[% public | html %]";
1080 var perms = $("#allow_changes_from").val();
1083 $("#anyone_remark").hide();
1084 $("#staff_remark").hide();
1085 } else if( public==0 ) {
1086 // If we move to Private (without shares), show Anyone remark
1087 // Note: the number of shares is not tested real-time
1088 [% IF !shelf.is_shared %]
1090 $("#anyone_remark").show();
1091 $("#staff_remark").hide();
1092 } else if ( perms==3 ) {
1093 $("#anyone_remark").hide();
1094 $("#staff_remark").show();
1097 $("#anyone_remark").hide();
1098 $("#staff_remark").hide();
1100 } else { // public==1
1101 $("#anyone_remark").hide();
1102 $("#staff_remark").hide();