4 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %]
5 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %]
7 [% BLOCK delete_shelf %]
8 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline">
9 <input type="hidden" name="op" value="delete" />
10 <input type="hidden" name="referer" value="list" />
11 <input type='hidden' name='public' value='[% public | html %]' />
12 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
13 <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 %]">
14 <i class="fa fa-remove" aria-hidden="true"></i>
15 [% IF ( context == "list" ) %]
24 [% INCLUDE 'doc-head-open.inc' %]
25 <title>[% IF op == 'view' %]Contents of [% shelf.shelfname | html %][% ELSE %]Your lists[% END %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
26 [% INCLUDE 'doc-head-close.inc' %]
27 [% BLOCK cssinclude %][% END %]
29 [% IF ( loggedinusername ) %]
30 [% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %]
32 [% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %]
35 [% BLOCK list_permissions %]
37 <label for="allow_changes_from">Allow changes to contents from: </label>
38 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
40 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
42 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
43 <option value="1" selected="selected">Owner only</option>
45 <option value="1">Owner only</option>
48 [% 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 %]
51   <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span>
55 [% INCLUDE 'masthead.inc' %]
57 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
58 <ol class="breadcrumb">
59 <li class="breadcrumb-item">
60 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
62 [% IF ( loggedinusername ) %]
63 <li class="breadcrumb-item">
64 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
69 <li class="breadcrumb-item">
70 <a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
73 <li class="breadcrumb-item active">
74 <a href="#" aria-current="page">Lists</a>
78 [% IF shelf and shelf.is_private %]
79 [% IF op == 'view' OR op == 'edit_form' %]
80 <li class="breadcrumb-item">
81 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a>
84 <li class="breadcrumb-item active">
85 <a href="#" aria-current="page">Your lists</a>
88 [% ELSIF shelf AND shelf.is_public %]
90 <li class="breadcrumb-item">
91 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a>
94 <li class="breadcrumb-item active">
95 <a href="#" aria-current="page">Public lists</a>
100 [% IF op == 'view' %]
101 <li class="breadcrumb-item active">
102 <a href="#" aria-current="page">Contents of <em>[% shelf.shelfname | html %]</em></a>
106 [% IF op == 'add_form' %]
107 <li class="breadcrumb-item active">
108 <a href="#" aria-current="page">Create new list</a>
112 [% IF op == 'edit_form' %]
113 <li class="breadcrumb-item active">
114 <a href="#" aria-current="page">Edit list <em>[% shelf.shelfname | html %]</em></a>
117 </ol> <!-- / .breadcrumb -->
118 </nav> <!-- /#breadcrumbs -->
120 <div class="container-fluid">
122 [% IF ( OpacNav||loggedinusername ) %]
123 <div class="col col-lg-2 order-2 order-lg-1">
124 <div id="navigation">
125 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
128 <div class="col-md-12 col-lg-10 order-1">
130 <div class="col order-first order-md-first order-lg-2">
133 <div id="usershelves" class="maincontent">
135 [% FOR m IN messages %]
138 <div class="alert alert-success" role="alert">
140 <div class="alert alert-danger" role="alert">
143 [% CASE 'error_on_update' %]
144 <span>An error occurred when updating this list.</span>
145 [% CASE 'error_on_insert' %]
146 <span>An error occurred when creating this list.</span>
147 [% CASE 'error_on_delete' %]
148 <span>An error occurred when deleting this list.</span>
149 [% CASE 'error_on_add_biblio' %]
150 <span>The item has not been added to the list. Please check it's not already in the list.</span>
151 [% CASE 'error_on_remove_share' %]
152 <span>The share has not been removed.</span>
153 [% CASE 'success_on_update' %]
154 <span>List updated.</span>
155 [% CASE 'success_on_insert' %]
156 <span>List created.</span>
157 [% CASE 'success_on_delete' %]
158 <span>List deleted.</span>
159 [% CASE 'success_on_add_biblio' %]
160 <span>The item has been added to the list.</span>
161 [% CASE 'success_on_remove_biblios' %]
162 <span>The item has been removed from the list.</span>
163 [% CASE 'success_on_remove_share' %]
164 <span>The share has been removed.</span>
165 [% CASE 'does_not_exist' %]
166 <span>This list does not exist.</span>
167 [% CASE 'item_does_not_exist' %]
168 <span>This item does not exist.</span>
169 [% CASE 'unauthorized_on_view' %]
170 <span>You do not have permission to view this list.</span>
171 [% CASE 'unauthorized_on_insert' %]
172 <span>You do not have permission to create a new list.</span>
173 [% CASE 'unauthorized_on_update' %]
174 <span>You do not have permission to update this list.</span>
175 [% CASE 'unauthorized_on_delete' %]
176 <span>You do not have permission to delete this list.</span>
177 [% CASE 'unauthorized_on_add_biblio' %]
178 <span>You do not have permission to add a record to this list.</span>
179 [% CASE 'no_biblio_removed' %]
180 <span>No record was removed.</span>
181 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
182 <span>An error occurred when creating the list. The name [% shelfname | html %] already exists.</span>
183 [% CASE 'DBIx::Class::Exception' %]
192 [% IF shelf AND op == 'view' %]
194 [% shelf.shelfname | html %]
195 <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">
196 <i class="fa fa-fw fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this list"></i>
200 [% IF ( itemsloop ) %]
201 [% SET contents = shelf.get_contents %]
202 [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
204 <div id="toolbar" class="toolbar clearfix">
205 <div class="list-actions">
206 <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>
208 <div id="download-list" class="btn-group dropdown">
209 <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>
210 <div class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
211 <a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a>
212 <a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>
213 <a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a>
214 <a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
215 [% FOREACH csv_profile IN csv_profiles %]
216 <a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
221 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
222 <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>
225 <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>
227 [% IF can_manage_shelf %]
228 <span class="sep">|</span>
229 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
230 <input type="hidden" name="op" value="edit_form" />
231 <input type="hidden" name="referer" value="view" />
232 <input type='hidden' name='public' value='[% shelf.public | html %]' />
233 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
234 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
237 [% PROCESS delete_shelf context = "details" %]
239 [% IF !public && Koha.Preference('OpacAllowSharingPrivateLists') %]
240 <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>
242 [% ELSIF !public # not manageshelf and private means shared %]
243 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
244 <input type="hidden" name="op" value="remove_share" />
245 <input type="hidden" name="referer" value="list" />
246 <input type='hidden' name='public' value='[% public | html %]' />
247 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
248 <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
249 <i class="fa fa-remove" aria-hidden="true"></i> Remove share
252 [% END # /IF can_manage_shelf %]
253 </div> <!-- /.list-actions -->
255 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by pull-right">
256 <input type="hidden" name="op" value="view" />
257 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
259 <label for="sortfield">Sort by: </label>
260 <select name="sortfield" id="sortfield" class="resort">
261 <option value="">Default sorting</option>
262 <optgroup label="Author">
263 [% IF sortfield == 'author' && direction == 'asc' %]
264 <option value="author" data-direction="asc" selected="selected">Author (A-Z)</option>
266 <option value="author" data-direction="asc">Author (A-Z)</option>
268 [% IF sortfield == 'author' && direction == 'desc' %]
269 <option value="author" data-direction="desc" selected="selected">Author (Z-A)</option>
271 <option value="author" data-direction="desc">Author (Z-A)</option>
274 <optgroup label="Title">
275 [% IF sortfield == 'title' && direction == 'asc' %]
276 <option value="title" data-direction="asc" selected="selected">Title (A-Z)</option>
278 <option value="title" data-direction="asc">Title (A-Z)</option>
280 [% IF sortfield == 'title' && direction == 'desc' %]
281 <option value="title" data-direction="desc" selected="selected">Title (Z-A)</option>
283 <option value="title" data-direction="desc">Title (Z-A)</option>
286 <optgroup label="Call number">
287 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
288 <option value="itemcallnumber" data-direction="asc" selected="selected">Call number (A-Z)</option>
290 <option value="itemcallnumber" data-direction="asc">Call number (A-Z)</option>
292 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
293 <option value="itemcallnumber" data-direction="desc" selected="selected">Call number (Z-A)</option>
295 <option value="itemcallnumber" data-direction="desc">Call number (Z-A)</option>
298 <optgroup label="Copyright date">
299 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
300 <option value="copyrightdate" data-direction="desc" selected="selected">Copyright date (newest to oldest)</option>
302 <option value="copyrightdate" data-direction="desc">Copyright date (newest to oldest)</option>
304 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
305 <option value="copyrightdate" data-direction="asc" selected="selected">Copyright date (oldest to newest)</option>
307 <option value="copyrightdate" data-direction="asc">Copyright date (oldest to newest)</option>
310 <optgroup label="Date added">
311 [% IF sortfield == "dateadded" && direction == 'asc' %]
312 <option value="dateadded" data-direction="desc" selected="selected">Date added (newest to oldest)</option>
314 <option value="dateadded" data-direction="desc">Date added (newest to oldest)</option>
316 [% IF sortfield == "dateadded" && direction == 'desc' %]
317 <option value="dateadded" data-direction="asc" selected="selected">Date added (oldest to newest)</option>
319 <option value="dateadded" data-direction="asc">Date added (oldest to newest)</option>
324 <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
325 </form> <!-- /#sorting-form -->
327 </div> <!-- / #toolbar -->
329 <div class="selections-toolbar toolbar noprint">
330 <div class="check_control">
331 <span class="checkall">
332 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
334 <span class="clearall">
335 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
339 <span class="selections">Select titles to: </span>
340 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
341 <span id="placehold">
342 <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
346 [% IF ( TagsInputEnabled && loggedinusername ) %]
348 <a id="tagsel_tag" href="#" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
350 <span id="tagsel_form" class="form-inline" style="display:none">
351 <label for="tagsel_new">New tag(s), separated by a comma:</label>
352 <input class="form-control form-control-sm" type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
353 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-primary btn-sm" title="tagsel_button" type="submit" value="Add" />
354 <a href="#" id="tagsel_cancel">Cancel</a>
357 [% IF loggedinusername && can_remove_biblios %]
358 <span id="removeitems"></span>
360 </div> <!-- / .links -->
361 </div> <!-- / .selections-toolbar -->
362 </div> <!-- /#floating -->
364 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
365 [% IF can_manage_shelf %]
366 <input type="hidden" name="op" value="remove_biblios" />
367 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
369 <div class="searchresults">
370 <table id="listcontents" class="table">
372 [% FOREACH itemsloo IN itemsloop %]
374 [% IF ( itemsloo.title ) %]
375 [% check_title = itemsloo.title %]
377 [% check_title = itemsloo.biblionumber %]
379 <td class="selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" aria-label="[% check_title | html %]"/></td>
380 [% UNLESS ( item_level_itypes ) %]
382 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
383 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
385 [% itemsloo.description | html %]
389 <div class="coverimages">
390 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
391 [% IF ( itemsloo.title ) %]
392 [% img_title = itemsloo.title %]
394 [% img_title = itemsloo.biblionumber %]
397 [% IF ( OPACLocalCoverImages ) %]
398 <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
401 [% IF ( OPACAmazonCoverImages ) %]
402 [% IF ( itemsloo.normalized_isbn ) %]
403 <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>
405 <span class="no-image">No cover image available</span>
409 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
410 <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>
413 [% IF ( GoogleJackets ) %]
414 [% IF ( itemsloo.normalized_isbn ) %]
415 <div title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
417 <span class="no-image">No cover image available</span>
421 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
422 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
424 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
426 <span class="no-image">No cover image available</span>
431 [% IF OpenLibraryCovers %]
432 [% IF itemsloo.normalized_isbn %]
433 <span title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
435 <span class="no-image">No cover image available</span>
440 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
441 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
443 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
445 <span class="no-image">No cover image available</span>
449 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
450 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
452 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
453 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
456 <span class="no-image">No cover image available</span>
460 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
461 [% SET custom_cover_image_url = itemsloo.biblio_object.custom_cover_image_url %]
462 [% IF custom_cover_image_url %]
463 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
464 <a class="custom_cover_image" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
466 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
467 <a class="custom_cover_image" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
469 <a class="custom_cover_image" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
472 <img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
478 [% itemsloo.XSLTBloc | $raw %]
480 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
481 <div class="results_summary tags">
482 <span class="label">Tags:</span>
484 [% FOREACH TagLoo IN itemsloo.TagLoop %]
485 <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>
491 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
493 [% INCLUDE "openlibrary-readapi.inc" bib = itemsloo %]
494 <!-- COinS / Openurl -->
495 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
498 [% END # / FOREACH itemsloop %]
500 </table> <!-- / #listcontents -->
501 </div><!-- / .searchresults -->
503 [% IF ( pagination_bar ) %]
504 <div class="pages">[% pagination_bar | $raw %]</div>
507 [% IF can_remove_biblios %]
508 <input type="hidden" name="op" value="remove_biblios" />
509 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
510 <input type="hidden" name="modifyshelfcontents" value="1" />
511 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
513 </form> <!-- /myform -->
515 <div id="toolbar" class="toolbar clearfix">
516 <div class="list-actions">
517 <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>
518 [% IF can_manage_shelf %]
519 <span class="sep">|</span>
520 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
521 <input type="hidden" name="op" value="edit_form" />
522 <input type="hidden" name="referer" value="view" />
523 <input type="hidden" name="public" value="[% shelf.public | html %]" />
524 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
525 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
528 [% PROCESS delete_shelf context = "details" %]
531 </div> <!-- / .list-actions -->
532 </div> <!-- / #toolbar -->
534 <div class="alert alert-info">
536 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
537 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
541 [% IF can_manage_shelf %]
542 <form method="post" action="opac-shelves.pl">
543 <input type="hidden" name="op" value="delete" />
544 <input type="hidden" name="referer" value="list" />
545 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
546 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
549 [% END # / IF itemsloop %]
550 [% END # /IF shelf AND op == 'view' %]
552 [% IF op == 'add_form' OR op == 'edit_form' %]
553 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
554 <fieldset class="rows">
555 [% IF op == 'add_form' %]
557 <legend><h1>Create a new list</h1></legend>
558 <input type="hidden" name="op" value="add" />
560 <legend><h1>Editing <em>[% shelf.shelfname | html %]</em></h1></legend>
561 <input type="hidden" name="op" value="edit" />
562 <input type="hidden" name="referer" value="[% referer | html %]" />
563 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
565 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
568 <label class="required" for="shelfname">List name: </label>
569 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="focus required"/>
570 <span class="required">Required</span></li>
572 <label for="sortfield" >Sort this list by: </label>
573 <select name="sortfield" id="sortfield">
574 [% IF shelf.sortfield == "title" %]
575 <option value="title" selected="selected">Title</option>
577 <option value="title">Title</option>
579 [% IF shelf.sortfield == "author" %]
580 <option value="author" selected="selected">Author</option>
582 <option value="author">Author</option>
584 [% IF shelf.sortfield == "copyrightdate" %]
585 <option value="copyrightdate" selected="selected">Year</option>
587 <option value="copyrightdate">Year</option>
589 [% IF shelf.sortfield == "itemcallnumber" %]
590 <option value="itemcallnumber" selected="selected">Call number</option>
592 <option value="itemcallnumber">Call number</option>
594 [% IF shelf.sortfield == "dateadded" %]
595 <option value="dateadded" selected="selected">Date added</option>
597 <option value="dateadded">Date added</option>
601 [% IF Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
603 <label for="public">Category:</label>
604 <select name="public" id="public" onchange="AdjustRemark()">
605 [% IF shelf.is_private %]
606 <option value="0" selected="selected">Private</option>
608 <option value="0">Private</option>
610 [% IF shelf.is_public %]
611 <option value="1" selected="selected">Public</option>
613 <option value="1">Public</option>
616 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
617 <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>
621 [% INCLUDE list_permissions %]
623 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
624 <input type="hidden" name="public" value="0" />
626 </fieldset> <!-- /.rows -->
628 <fieldset class="action">
629 <input type="submit" value="Save" class="btn btn-primary" />
630 [% IF referer == 'view' %]
631 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
633 <a href="/cgi-bin/koha/opac-shelves.pl?op=list" class="cancel">Cancel</a>
638 [% ELSIF op == 'list' %]
640 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
641 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
642 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
644 <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>
646 <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>
650 <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>
652 <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>
657 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
659 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
662 [% IF !public || Koha.Preference('OpacAllowPublicListCreation') %]
663 [% IF loggedinusername %]
664 <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>
666 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
667 <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>
672 [% IF shelves.count %]
673 <table class="table">
675 <caption class="sr-only">Your lists</caption>
677 <caption class="sr-only">Public lists</caption>
688 [% FOREACH s IN shelves %]
689 [% SET contents = s.get_contents %]
691 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
692 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
694 [% IF s.is_private %]
695 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
701 [% IF s.can_be_managed( loggedinusernumber ) %]
702 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
703 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
704 <input type="hidden" name="public" value="[% s.public | html %]" />
705 <input type="hidden" name="op" value="edit_form" />
706 <input type="hidden" name="referer" value="list" />
707 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
710 [% IF s.can_be_deleted( loggedinusernumber ) %]
711 [% PROCESS delete_shelf shelf = s context = "list" %]
713 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
714 <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>
716 [% IF s.is_shared_with( loggedinusernumber ) %]
717 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
718 <input type="hidden" name="op" value="remove_share" />
719 <input type="hidden" name="referer" value="list" />
720 <input type='hidden' name='public' value='[% public | html %]' />
721 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
722 <button type="submit" class="btn btn-link remove remove_share"
723 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
730 </table> <!-- /.table -->
731 <div class="pages">[% pagination_bar | $raw %]</div>
734 <p>No public lists.</p>
735 [% ELSIF loggedinusernumber %]
736 <p>No private lists.</p>
738 [% END # /IF shelves.count %]
740 [% ELSIF NOT loggedinusernumber %]
741 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
742 <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>
744 [% END # IF op == 'add_form' OR op == 'edit_form' %]
745 </div> <!-- / #usershelves -->
746 </div> <!-- / .col-lg-10/12 -->
747 </div> <!-- / .row -->
748 </div> <!-- / .container-fluid -->
749 </div> <!-- / .main -->
751 <form method="post" id="download_list" action="/cgi-bin/koha/opac-downloadshelf.pl">
752 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
753 <input type="hidden" name="format" id="download_format" value="" />
756 [% INCLUDE 'opac-bottom.inc' %]
757 [% BLOCK jsinclude %]
758 [% Asset.js("lib/hc-sticky.js") | $raw %]
759 [% IF OpenLibraryCovers || OpenLibrarySearch %]
760 [% Asset.js("js/openlibrary.js") | $raw %]
763 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
764 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
765 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
766 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
768 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
769 function holdSelections() {
770 var checkedBoxes = $("input:checkbox:checked");
771 if ($(checkedBoxes).size() == 0) {
772 alert( __("No item was selected") );
775 $(checkedBoxes).each(function(){
776 bibs += $(this).val() + "/";
778 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
782 [% IF ( TagsInputEnabled && loggedinusername ) %]
783 function tagSelected() {
784 var checkedBoxes = $("input:checkbox:checked");
785 if ($(checkedBoxes).size()) {
786 $("#tagsel_tag").hide();
787 $(".tag_hides").hide();
788 $("#tagsel_form").show();
790 alert( __("No item was selected") );
794 function tagCanceled() {
795 $("#tagsel_form").hide();
796 $("#tagsel_tag").show();
797 $(".tag_hides").show();
798 $("#tagsel_new").val("");
799 $(".tagstatus").empty().hide();
802 function tagAdded() {
803 var checkedBoxes = $("input:checkbox:checked");
804 if (!$(checkedBoxes).size()) {
805 alert( __("No item was selected") );
809 var tag = $("#tagsel_new").val();
810 if (!tag || (tag == "")) {
811 alert(MSG_NO_TAG_SPECIFIED);
816 for (var i = 0; i < $(checkedBoxes).size(); i++) {
817 var box = $(checkedBoxes).get(i);
818 bibs[i] = $(box).val();
821 KOHA.Tags.add_multitags_button(bibs, tag);
826 function enableCheckboxActions(){
827 // Enable/disable controls if checkboxes are checked
828 var checkedBoxes = $(".cb:checked");
829 if ($(checkedBoxes).size()) {
830 $(".selections").html(_("With selected titles: "));
831 $(".selections-toolbar .links a").removeClass("disabled");
833 $(".selections").html(_("Select titles to: "));
834 $(".selections-toolbar .links a").addClass("disabled");
839 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
841 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
842 $(".selections-toolbar a.hold").click(function(e){
850 $("#CheckAll").on("click",function(e){
852 $(".cb").prop("checked", true);
853 enableCheckboxActions();
855 $("#CheckNone").on("click",function(e){
857 $(".cb").prop("checked", false);
858 enableCheckboxActions();
861 $(".cb").click(function(){
862 enableCheckboxActions();
864 enableCheckboxActions();
866 [% IF ( TagsInputEnabled && loggedinusername ) %]
867 var tagAdd = $(".tag_add");
868 tagAdd.removeClass("hidden");
869 $("#tagsel_tag").click(function(){
873 $("#tagsel_cancel").click(function(){
877 $("#tagsel_button").click(function(){
882 tagAdd.click(function(){
883 var thisid = $(this).attr("id");
884 thisid = thisid.replace("tag_add","");
886 $("#tagform"+thisid).show();
887 $("#newtag"+thisid).focus();
888 $("#newtag"+thisid+"_status").empty().hide();
891 $(".cancel_tag_add").click(function(){
892 var thisid = $(this).attr("id");
893 thisid = thisid.replace("cancel","");
894 $("#tagform"+thisid).hide();
895 $("#tag_add"+thisid).show();
896 $("#newtag"+thisid).val("");
897 $("#newtag"+thisid+"_status").empty().hide();
900 $(".tagbutton").click(function(){
901 var thisid = $(this).attr("title");
902 var tag = $("#newtag"+thisid).val();
903 if (!tag || (tag == "")) {
904 alert(MSG_NO_TAG_SPECIFIED);
907 KOHA.Tags.add_tag_button(thisid, tag);
912 [% IF loggedinusername && can_remove_biblios %]
913 $(".removefromlist").on("click", function(e){
914 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
917 $("#myform").submit(function(){
918 var checkedBoxes = $(".cb:checked");
919 var numchecked = $(checkedBoxes).size();
921 if( numchecked > 1 ){
922 return confirmDelete(MSG_REMOVE_FROM_LIST);
924 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
927 alert( __("No item was selected") );
931 $("#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>")
933 $("#myform").submit();
937 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
938 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
939 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
940 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
941 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
946 window.onafterprint = function () {
949 setTimeout('window.close()', 1000); // Hack for Chrome < 63
954 Sticky = $("#floating");
956 stickTo: "#usershelves",
957 stickyClass: "floating"
961 sortMenu( $("#sorting-form") );
963 $("#sortfield").on("change", function(){
964 $('#sorting-form').submit();
968 $(".deleteshelf").on("click", function(e){
970 var shelf_name = $(this).data("shelfname");
971 var shelf_number = $(this).data("shelfnumber");
972 var is_shared = $(this).data("shared");
973 var count = $(this).data("count");
974 var message = "<p><em>" + shelf_name + "</em></p>";
976 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
979 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
981 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
983 $("#deleteshelf" + shelf_number ).submit();
989 $(".remove_share").on("click", function(e){
991 var shelf_name = $(this).data("shelfname");
992 var shelf_number = $(this).data("shelfnumber");
993 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 ){
995 $("#unshare" + shelf_number ).submit();
1001 $(".download-list").on("click", function(e){
1003 var format = $(this).data("format");
1004 $("#download_format").val( format );
1005 $("#download_list").submit();
1008 }); // document.ready
1010 function sortMenu( sorting_form ){
1011 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1012 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1013 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\">";
1014 $("#sortfield").children().each(function(){
1015 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1016 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1017 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1018 menu += "<span class=\"dropdown-header\">" + $(this).attr("label") + "</span>";
1019 $(this).children().each(function(){
1020 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1021 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "&direction=" + $(this).data('direction') + "\">" + $(this).text() + "</a>";
1027 $(".list-actions").append( menu );
1028 sorting_form.remove();
1031 function AdjustRemark() {
1033 if( $("#public").length > 0 ) {
1034 public = $("#public").val();
1036 public = "[% public | html %]";
1038 var perms = $("#allow_changes_from").val();
1041 $("#anyone_remark").hide();
1042 } else if( public==0 ) {
1043 // If we move to Private (without shares), show Anyone remark
1044 // Note: the number of shares is not tested real-time
1045 [% IF !shelf.is_shared %]
1046 $("#anyone_remark").show();
1048 $("#anyone_remark").hide();
1050 } else { // public==1
1051 $("#anyone_remark").hide();