6 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %]
7 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %]
8 [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
9 [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
11 [% BLOCK delete_shelf %]
12 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline">
13 <input type="hidden" name="op" value="delete" />
14 <input type="hidden" name="referer" value="list" />
15 <input type='hidden' name='category' value='[% category | html %]' />
16 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
17 <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 %]">
18 <i class="fa fa-remove" aria-hidden="true"></i>
19 [% IF ( context == "list" ) %]
28 [% INCLUDE 'doc-head-open.inc' %]
29 <title>[% IF op == 'view' %]Contents of [% shelf.shelfname | html %][% ELSE %]Your lists[% END %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
30 [% INCLUDE 'doc-head-close.inc' %]
31 [% BLOCK cssinclude %][% END %]
33 [% IF ( loggedinusername ) %]
34 [% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %]
36 [% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %]
39 [% BLOCK list_permissions %]
41 <label for="allow_changes_from">Allow changes to contents from: </label>
42 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
44 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
46 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
47 <option value="1" selected="selected">Owner only</option>
49 <option value="1">Owner only</option>
52 [% 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 %]
55   <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span>
59 [% INCLUDE 'masthead.inc' %]
61 <nav aria-label="breadcrumb">
62 <ul class="breadcrumb">
63 <li class="breadcrumb-item">
64 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
66 [% IF ( loggedinusername ) %]
67 <li class="breadcrumb-item">
68 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
73 <li class="breadcrumb-item">
74 <a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
77 <li class="breadcrumb-item" aria-current="page">
82 [% IF shelf and shelf.is_private %]
83 [% IF op == 'view' OR op == 'edit_form' %]
84 <li class="breadcrumb-item">
85 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]">Your lists</a>
88 <li class="breadcrumb-item" aria-current="page">
92 [% ELSIF shelf AND shelf.is_public %]
94 <li class="breadcrumb-item">
95 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | uri %]">Public lists</a>
98 <li class="breadcrumb-item" aria-current="page">
104 [% IF op == 'view' %]
105 <li class="breadcrumb-item" aria-current="page">
106 Contents of <em>[% shelf.shelfname | html %]</em>
110 [% IF op == 'add_form' %]
111 <li class="breadcrumb-item" aria-current="page">
116 [% IF op == 'edit_form' %]
117 <li class="breadcrumb-item" aria-current="page">
118 Edit list <em>[% shelf.shelfname | html %]</em>
121 </ul> <!-- / .breadcrumb -->
124 <div class="container-fluid">
126 [% IF ( OpacNav||loggedinusername ) %]
127 <div class="col col-lg-2 order-2 order-lg-1">
128 <div id="navigation">
129 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
132 <div class="col-md-12 col-lg-10 order-1">
134 <div class="col order-first order-md-first order-lg-2">
137 <div id="usershelves" class="maincontent">
139 [% FOR m IN messages %]
142 <div class="alert alert-success" role="alert">
144 <div class="alert alert-danger" role="alert">
147 [% CASE 'error_on_update' %]
148 <span>An error occurred when updating this list.</span>
149 [% CASE 'error_on_insert' %]
150 <span>An error occurred when creating this list.</span>
151 [% CASE 'error_on_delete' %]
152 <span>An error occurred when deleting this list.</span>
153 [% CASE 'error_on_add_biblio' %]
154 <span>The item has not been added to the list. Please check it's not already in the list.</span>
155 [% CASE 'error_on_remove_share' %]
156 <span>The share has not been removed.</span>
157 [% CASE 'success_on_update' %]
158 <span>List updated.</span>
159 [% CASE 'success_on_insert' %]
160 <span>List created.</span>
161 [% CASE 'success_on_delete' %]
162 <span>List deleted.</span>
163 [% CASE 'success_on_add_biblio' %]
164 <span>The item has been added to the list.</span>
165 [% CASE 'success_on_remove_biblios' %]
166 <span>The item has been removed from the list.</span>
167 [% CASE 'success_on_remove_share' %]
168 <span>The share has been removed.</span>
169 [% CASE 'does_not_exist' %]
170 <span>This list does not exist.</span>
171 [% CASE 'item_does_not_exist' %]
172 <span>This item does not exist.</span>
173 [% CASE 'unauthorized_on_view' %]
174 <span>You do not have permission to view this list.</span>
175 [% CASE 'unauthorized_on_insert' %]
176 <span>You do not have permission to create a new list.</span>
177 [% CASE 'unauthorized_on_update' %]
178 <span>You do not have permission to update this list.</span>
179 [% CASE 'unauthorized_on_delete' %]
180 <span>You do not have permission to delete this list.</span>
181 [% CASE 'unauthorized_on_add_biblio' %]
182 <span>You do not have permission to add a record to this list.</span>
183 [% CASE 'no_biblio_removed' %]
184 <span>No record was removed.</span>
185 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
186 <span>An error occurred when creating the list. The name [% shelfname | html %] already exists.</span>
187 [% CASE 'DBIx::Class::Exception' %]
196 [% IF shelf AND op == 'view' %]
198 [% shelf.shelfname | html %]
199 <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">
200 <i class="fa fa-fw fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this list"></i>
204 [% IF ( itemsloop ) %]
205 [% SET contents = shelf.get_contents %]
206 [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
208 <div id="toolbar" class="toolbar clearfix">
209 <div class="list-actions">
210 <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>
212 <div id="download-list" class="btn-group dropdown">
213 <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>
214 <div class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
215 <a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a>
216 <a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>
217 <a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a>
218 <a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
219 [% FOREACH csv_profile IN csv_profiles %]
220 <a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
225 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
226 <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>
229 <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>
231 [% IF can_manage_shelf %]
232 <span class="sep">|</span>
233 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
234 <input type="hidden" name="op" value="edit_form" />
235 <input type="hidden" name="referer" value="view" />
236 <input type='hidden' name='category' value='[% shelf.category | html %]' />
237 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
238 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
241 [% PROCESS delete_shelf context = "details" %]
243 [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
244 <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>
246 [% ELSIF category == PRIVATE # not manageshelf and private means shared %]
247 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
248 <input type="hidden" name="op" value="remove_share" />
249 <input type="hidden" name="referer" value="list" />
250 <input type='hidden' name='category' value='[% category | html %]' />
251 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
252 <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
253 <i class="fa fa-remove" aria-hidden="true"></i> Remove share
256 [% END # /IF can_manage_shelf %]
257 </div> <!-- /.list-actions -->
259 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by pull-right">
260 <input type="hidden" name="op" value="view" />
261 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
263 <label for="sortfield">Sort by: </label>
264 <select name="sortfield" id="sortfield" class="resort">
265 <option value="">Default sorting</option>
266 <optgroup label="Author">
267 [% IF sortfield == 'author' && direction == 'asc' %]
268 <option value="author:asc" selected="selected">Author (A-Z)</option>
270 <option value="author:asc">Author (A-Z)</option>
272 [% IF sortfield == 'author' && direction == 'desc' %]
273 <option value="author:desc" selected="selected">Author (Z-A)</option>
275 <option value="author:desc">Author (Z-A)</option>
278 <optgroup label="Title">
279 [% IF sortfield == 'title' && direction == 'asc' %]
280 <option value="title:asc" selected="selected">Title (A-Z)</option>
282 <option value="title:asc">Title (A-Z)</option>
284 [% IF sortfield == 'title' && direction == 'desc' %]
285 <option value="title:desc" selected="selected">Title (Z-A)</option>
287 <option value="title:desc">Title (Z-A)</option>
290 <optgroup label="Call number">
291 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
292 <option value="itemcallnumber:asc" selected="selected">Call number (A-Z)</option>
294 <option value="itemcallnumber:asc">Call number (A-Z)</option>
296 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
297 <option value="itemcallnumber:desc" selected="selected">Call number (Z-A)</option>
299 <option value="itemcallnumber:desc">Call number (Z-A)</option>
302 <optgroup label="Copyright date">
303 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
304 <option value="copyrightdate:desc" selected="selected">Copyright date (newest to oldest)</option>
306 <option value="copyrightdate:desc">Copyright date (newest to oldest)</option>
308 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
309 <option value="copyrightdate:asc" selected="selected">Copyright date (oldest to newest)</option>
311 <option value="copyrightdate:asc">Copyright date (oldest to newest)</option>
314 <optgroup label="Date added">
315 [% IF sortfield == "dateadded" && direction == 'asc' %]
316 <option value="dateadded:desc" selected="selected">Date added (newest to oldest)</option>
318 <option value="dateadded:desc">Date added (newest to oldest)</option>
320 [% IF sortfield == "dateadded" && direction == 'desc' %]
321 <option value="dateadded:asc" selected="selected">Date added (oldest to newest)</option>
323 <option value="dateadded:asc">Date added (oldest to newest)</option>
328 <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
329 </form> <!-- /#sorting-form -->
331 </div> <!-- / #toolbar -->
333 <div class="selections-toolbar toolbar noprint">
334 <div class="check_control">
335 <span class="checkall">
336 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
338 <span class="clearall">
339 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
343 <span class="selections">Select titles to: </span>
344 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
345 <span id="placehold">
346 <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
350 [% IF ( TagsInputEnabled && loggedinusername ) %]
352 <a id="tagsel_tag" href="#" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
354 <span id="tagsel_form" class="form-inline" style="display:none">
355 <label for="tagsel_new">New tag(s), separated by a comma:</label>
356 <input class="form-control form-control-sm" type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
357 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-primary btn-sm" title="tagsel_button" type="submit" value="Add" />
358 <a href="#" id="tagsel_cancel">Cancel</a>
361 [% IF loggedinusername && can_remove_biblios %]
362 <span id="removeitems"></span>
364 </div> <!-- / .links -->
365 </div> <!-- / .selections-toolbar -->
366 </div> <!-- /#floating -->
368 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
369 [% IF can_manage_shelf %]
370 <input type="hidden" name="op" value="remove_biblios" />
371 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
373 <div class="searchresults">
374 <table id="listcontents" class="table">
376 [% FOREACH itemsloo IN itemsloop %]
378 [% IF ( itemsloo.title ) %]
379 [% check_title = itemsloo.title %]
381 [% check_title = itemsloo.biblionumber %]
383 <td class="selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" aria-label="[% check_title | html %]"/></td>
384 [% UNLESS ( item_level_itypes ) %]
386 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
387 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
389 [% itemsloo.description | html %]
393 <div class="coverimages">
394 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
395 [% IF ( itemsloo.title ) %]
396 [% img_title = itemsloo.title %]
398 [% img_title = itemsloo.biblionumber %]
401 [% IF ( OPACLocalCoverImages ) %]
402 <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
404 [% IF ( AdlibrisEnabled && itemsloo.normalized_isbn ) %]
405 <img src="[% AdlibrisURL | html %]?isbn=[% itemsloo.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" />
407 [% IF ( OPACAmazonCoverImages ) %]
408 [% IF ( itemsloo.normalized_isbn ) %]
409 <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>
411 <span class="no-image">No cover image available</span>
415 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
416 <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>
419 [% IF ( GoogleJackets ) %]
420 [% IF ( itemsloo.normalized_isbn ) %]
421 <div title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
423 <span class="no-image">No cover image available</span>
427 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
428 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
430 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
432 <span class="no-image">No cover image available</span>
437 [% IF OpenLibraryCovers %]
438 [% IF itemsloo.normalized_isbn %]
439 <span title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
441 <span class="no-image">No cover image available</span>
446 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
447 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
449 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
451 <span class="no-image">No cover image available</span>
455 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
456 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
458 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
459 <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('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
467 [% SET custom_cover_image_url = itemsloo.biblio_object.custom_cover_image_url %]
468 [% IF custom_cover_image_url %]
469 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
470 <a class="custom_cover_image" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
472 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
473 <a class="custom_cover_image" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
475 <a class="custom_cover_image" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
478 <img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
483 [% IF ( itemsloo.XSLTBloc ) %]
484 [% itemsloo.XSLTBloc | $raw %]
487 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
488 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
490 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
491 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
493 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
497 [% INCLUDE 'biblio-title.inc' biblio=itemsloo %]
500 [% IF ( itemsloo.author ) %]
501 by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% itemsloo.author |url %]" title="Search for works by this author" class="author">[% itemsloo.author | html %]</a>
506 <span class="results_summary">
507 <span class="label">Publication:</span>
508 [% IF ( itemsloo.place ) %]
509 [% itemsloo.place | html %]
511 [% IF ( itemsloo.publishercode ) %]
512 [% itemsloo.publishercode | html %]
514 [% IF ( itemsloo.publicationyear ) %]
515 [% itemsloo.publicationyear | html %]
517 [% IF ( itemsloo.copyrightdate ) %]
518 [% itemsloo.copyrightdate | html %]
521 [% IF ( itemsloo.pages ) %]. [% itemsloo.pages | html %][% END %]
522 [% IF ( itemsloo.notes ) %], [% itemsloo.notes | html %][% END %]
523 [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') | html %][% END %]
525 <span class="results_summary">
526 <span class="label">Holdings:</span>
527 [% IF itemsloo.ITEM_RESULTS %]
528 [% FOREACH item IN itemsloo.ITEM_RESULTS %]
529 [% item.homebranch | html %]
530 [% SET location_opac = AuthorisedValues.GetByCode( 'LOC', item.location, 1 ) %]
531 [% IF location_opac %]
532 <span class="shelvingloc">[% location_opac | html %]</span>
534 [% IF item.itemcallnumber %]
535 ([% item.itemcallnumber | html %])
536 [% IF ( loop.last ) %].[% ELSE %],[% END %]
540 This record has no items.
543 [% END # / IF itemsloo.XSLTBloc %]
545 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
546 <div class="results_summary tags">
547 <span class="label">Tags:</span>
549 [% FOREACH TagLoo IN itemsloo.TagLoop %]
550 <li><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term | html %]</a> <span class="weight">([% TagLoo.weight_total | html %])</span></li>
556 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
558 [% INCLUDE "openlibrary-readapi.inc" bib = itemsloo %]
559 <!-- COinS / Openurl -->
560 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
563 [% END # / FOREACH itemsloop %]
565 </table> <!-- / #listcontents -->
566 </div><!-- / .searchresults -->
568 [% IF ( pagination_bar ) %]
569 <div class="pages">[% pagination_bar | $raw %]</div>
572 [% IF can_remove_biblios %]
573 <input type="hidden" name="op" value="remove_biblios" />
574 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
575 <input type="hidden" name="modifyshelfcontents" value="1" />
576 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
578 </form> <!-- /myform -->
580 <div id="toolbar" class="toolbar clearfix">
581 <div class="list-actions">
582 <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>
583 [% IF can_manage_shelf %]
584 <span class="sep">|</span>
585 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
586 <input type="hidden" name="op" value="edit_form" />
587 <input type="hidden" name="referer" value="view" />
588 <input type="hidden" name="category" value="[% shelf.category | html %]" />
589 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
590 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
593 [% PROCESS delete_shelf context = "details" %]
596 </div> <!-- / .list-actions -->
597 </div> <!-- / #toolbar -->
599 <div class="alert alert-info">
601 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
602 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
606 [% IF can_manage_shelf %]
607 <form method="post" action="opac-shelves.pl">
608 <input type="hidden" name="op" value="delete" />
609 <input type="hidden" name="referer" value="list" />
610 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
611 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
614 [% END # / IF itemsloop %]
615 [% END # /IF shelf AND op == 'view' %]
617 [% IF op == 'add_form' OR op == 'edit_form' %]
618 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
619 <fieldset class="rows">
620 [% IF op == 'add_form' %]
622 <legend><h1>Create a new list</h1></legend>
623 <input type="hidden" name="op" value="add" />
625 <legend><h1>Editing <em>[% shelf.shelfname | html %]</em></h1></legend>
626 <input type="hidden" name="op" value="edit" />
627 <input type="hidden" name="referer" value="[% referer | html %]" />
628 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
630 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
633 <label class="required" for="shelfname">List name: </label>
634 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="focus required"/>
635 <span class="required">Required</span></li>
637 <label for="sortfield" >Sort this list by: </label>
638 <select name="sortfield" id="sortfield">
639 [% IF shelf.sortfield == "title" %]
640 <option value="title" selected="selected">Title</option>
642 <option value="title">Title</option>
644 [% IF shelf.sortfield == "author" %]
645 <option value="author" selected="selected">Author</option>
647 <option value="author">Author</option>
649 [% IF shelf.sortfield == "copyrightdate" %]
650 <option value="copyrightdate" selected="selected">Year</option>
652 <option value="copyrightdate">Year</option>
654 [% IF shelf.sortfield == "itemcallnumber" %]
655 <option value="itemcallnumber" selected="selected">Call number</option>
657 <option value="itemcallnumber">Call number</option>
659 [% IF shelf.sortfield == "dateadded" %]
660 <option value="dateadded" selected="selected">Date added</option>
662 <option value="dateadded">Date added</option>
666 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
668 <label for="category">Category:</label>
669 <select name="category" id="category" onchange="AdjustRemark()">
670 [% IF shelf.is_private %]
671 <option value="1" selected="selected">Private</option>
673 <option value="1">Private</option>
675 [% IF shelf.is_public %]
676 <option value="2" selected="selected">Public</option>
678 <option value="2">Public</option>
681 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
682 <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>
686 [% INCLUDE list_permissions %]
688 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
689 <input type="hidden" name="category" value="[% PRIVATE | html %]" />
691 </fieldset> <!-- /.rows -->
693 <fieldset class="action">
694 <input type="submit" value="Save" class="btn btn-primary" />
695 [% IF referer == 'view' %]
696 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
698 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a>
703 [% ELSIF op == 'list' %]
705 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
706 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
707 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
708 [% IF category == PRIVATE %]
709 <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=listamp;category=[% PRIVATE | html %]">Your lists</a></li>
711 <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&category=[% PRIVATE | html %]">Your lists</a></li>
714 [% IF category == PUBLIC %]
715 <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&category=[% PUBLIC | html %]">Public lists</a></li>
717 <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&category=[% PUBLIC | html %]">Public lists</a></li>
721 [% IF category == PRIVATE %]
722 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
724 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
727 [% IF category == PRIVATE || Koha.Preference('OpacAllowPublicListCreation') %]
728 [% IF loggedinusername %]
729 <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>
731 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
732 <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>
737 [% IF shelves.count %]
738 <table class="table">
739 [% IF category == PRIVATE %]
740 <caption class="sr-only">Your lists</caption>
741 [% ELSIF category == PUBLIC %]
742 <caption class="sr-only">Public lists</caption>
753 [% FOREACH s IN shelves %]
754 [% SET contents = s.get_contents %]
756 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
757 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
759 [% IF s.is_private %]
760 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
766 [% IF s.can_be_managed( loggedinusernumber ) %]
767 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
768 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
769 <input type="hidden" name="category" value="[% s.category | html %]" />
770 <input type="hidden" name="op" value="edit_form" />
771 <input type="hidden" name="referer" value="list" />
772 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
775 [% IF s.can_be_deleted( loggedinusernumber ) %]
776 [% PROCESS delete_shelf shelf = s context = "list" %]
778 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
779 <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>
781 [% IF s.is_shared_with( loggedinusernumber ) %]
782 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
783 <input type="hidden" name="op" value="remove_share" />
784 <input type="hidden" name="referer" value="list" />
785 <input type='hidden' name='category' value='[% category | html %]' />
786 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
787 <button type="submit" class="btn btn-link remove remove_share"
788 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
795 </table> <!-- /.table -->
796 <div class="pages">[% pagination_bar | $raw %]</div>
798 [% IF category == PUBLIC %]
799 <p>No public lists.</p>
800 [% ELSIF loggedinusernumber %]
801 <p>No private lists.</p>
803 [% END # /IF shelves.count %]
805 [% ELSIF NOT loggedinusernumber %]
806 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
807 <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>
809 [% END # IF op == 'add_form' OR op == 'edit_form' %]
810 </div> <!-- / #usershelves -->
811 </div> <!-- / .col-lg-10/12 -->
812 </div> <!-- / .row -->
813 </div> <!-- / .container-fluid -->
814 </div> <!-- / .main -->
816 <form method="post" id="download_list" action="/cgi-bin/koha/opac-downloadshelf.pl">
817 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
818 <input type="hidden" name="format" id="download_format" value="" />
821 [% INCLUDE 'opac-bottom.inc' %]
822 [% BLOCK jsinclude %]
823 [% Asset.js("lib/hc-sticky.js") | $raw %]
824 [% IF OpenLibraryCovers || OpenLibrarySearch %]
825 [% Asset.js("js/openlibrary.js") | $raw %]
828 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
829 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
830 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
831 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
833 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
834 function holdSelections() {
835 var checkedBoxes = $("input:checkbox:checked");
836 if ($(checkedBoxes).size() == 0) {
837 alert( __("No item was selected") );
840 $(checkedBoxes).each(function(){
841 bibs += $(this).val() + "/";
843 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
847 [% IF ( TagsInputEnabled && loggedinusername ) %]
848 function tagSelected() {
849 var checkedBoxes = $("input:checkbox:checked");
850 if ($(checkedBoxes).size()) {
851 $("#tagsel_tag").hide();
852 $(".tag_hides").hide();
853 $("#tagsel_form").show();
855 alert( __("No item was selected") );
859 function tagCanceled() {
860 $("#tagsel_form").hide();
861 $("#tagsel_tag").show();
862 $(".tag_hides").show();
863 $("#tagsel_new").val("");
864 $(".tagstatus").empty().hide();
867 function tagAdded() {
868 var checkedBoxes = $("input:checkbox:checked");
869 if (!$(checkedBoxes).size()) {
870 alert( __("No item was selected") );
874 var tag = $("#tagsel_new").val();
875 if (!tag || (tag == "")) {
876 alert(MSG_NO_TAG_SPECIFIED);
881 for (var i = 0; i < $(checkedBoxes).size(); i++) {
882 var box = $(checkedBoxes).get(i);
883 bibs[i] = $(box).val();
886 KOHA.Tags.add_multitags_button(bibs, tag);
891 function enableCheckboxActions(){
892 // Enable/disable controls if checkboxes are checked
893 var checkedBoxes = $(".cb:checked");
894 if ($(checkedBoxes).size()) {
895 $(".selections").html(_("With selected titles: "));
896 $(".selections-toolbar .links a").removeClass("disabled");
898 $(".selections").html(_("Select titles to: "));
899 $(".selections-toolbar .links a").addClass("disabled");
904 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
906 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
907 $(".selections-toolbar a.hold").click(function(e){
915 $("#CheckAll").on("click",function(e){
917 $(".cb").prop("checked", true);
918 enableCheckboxActions();
920 $("#CheckNone").on("click",function(e){
922 $(".cb").prop("checked", false);
923 enableCheckboxActions();
926 $(".cb").click(function(){
927 enableCheckboxActions();
929 enableCheckboxActions();
931 [% IF ( TagsInputEnabled && loggedinusername ) %]
932 var tagAdd = $(".tag_add");
933 tagAdd.removeClass("hidden");
934 $("#tagsel_tag").click(function(){
938 $("#tagsel_cancel").click(function(){
942 $("#tagsel_button").click(function(){
947 tagAdd.click(function(){
948 var thisid = $(this).attr("id");
949 thisid = thisid.replace("tag_add","");
951 $("#tagform"+thisid).show();
952 $("#newtag"+thisid).focus();
953 $("#newtag"+thisid+"_status").empty().hide();
956 $(".cancel_tag_add").click(function(){
957 var thisid = $(this).attr("id");
958 thisid = thisid.replace("cancel","");
959 $("#tagform"+thisid).hide();
960 $("#tag_add"+thisid).show();
961 $("#newtag"+thisid).val("");
962 $("#newtag"+thisid+"_status").empty().hide();
965 $(".tagbutton").click(function(){
966 var thisid = $(this).attr("title");
967 var tag = $("#newtag"+thisid).val();
968 if (!tag || (tag == "")) {
969 alert(MSG_NO_TAG_SPECIFIED);
972 KOHA.Tags.add_tag_button(thisid, tag);
977 [% IF loggedinusername && can_remove_biblios %]
978 $(".removefromlist").on("click", function(e){
979 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
982 $("#myform").submit(function(){
983 var checkedBoxes = $(".cb:checked");
984 var numchecked = $(checkedBoxes).size();
986 if( numchecked > 1 ){
987 return confirmDelete(MSG_REMOVE_FROM_LIST);
989 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
992 alert( __("No item was selected") );
996 $("#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>")
998 $("#myform").submit();
1002 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
1003 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
1004 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1005 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1006 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
1011 window.onafterprint = function () {
1014 setTimeout('window.close()', 1000); // Hack for Chrome < 63
1019 Sticky = $("#floating");
1021 stickTo: "#usershelves",
1022 stickyClass: "floating"
1026 sortMenu( $("#sorting-form") );
1028 $("#sortfield").on("change", function(){
1029 $('#sorting-form').submit();
1033 $(".deleteshelf").on("click", function(e){
1035 var shelf_name = $(this).data("shelfname");
1036 var shelf_number = $(this).data("shelfnumber");
1037 var is_shared = $(this).data("shared");
1038 var count = $(this).data("count");
1039 var message = "<p><em>" + shelf_name + "</em></p>";
1041 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
1044 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
1046 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
1048 $("#deleteshelf" + shelf_number ).submit();
1054 $(".remove_share").on("click", function(e){
1056 var shelf_name = $(this).data("shelfname");
1057 var shelf_number = $(this).data("shelfnumber");
1058 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 ){
1060 $("#unshare" + shelf_number ).submit();
1066 $(".download-list").on("click", function(e){
1068 var format = $(this).data("format");
1069 $("#download_format").val( format );
1070 $("#download_list").submit();
1073 }); // document.ready
1075 function sortMenu( sorting_form ){
1076 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1077 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1078 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\">";
1079 $("#sortfield").children().each(function(){
1080 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1081 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1082 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1083 menu += "<span class=\"dropdown-header\">" + $(this).attr("label") + "</span>";
1084 $(this).children().each(function(){
1085 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1086 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1092 $(".list-actions").append( menu );
1093 sorting_form.remove();
1096 function AdjustRemark() {
1098 if( $("#category").length > 0 ) {
1099 category = $("#category").val();
1101 category = "[% category | html %]";
1103 var perms = $("#allow_changes_from").val();
1106 $("#anyone_remark").hide();
1107 } else if( category==1 ) {
1108 // If we move to Private (without shares), show Anyone remark
1109 // Note: the number of shares is not tested real-time
1110 [% IF !shelf.is_shared %]
1111 $("#anyone_remark").show();
1113 $("#anyone_remark").hide();
1115 } else { // category==2
1116 $("#anyone_remark").hide();