6 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %]
7 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %]
9 [% BLOCK delete_shelf %]
10 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline">
11 <input type="hidden" name="op" value="delete" />
12 <input type="hidden" name="referer" value="list" />
13 <input type='hidden' name='category' value='[% category | html %]' />
14 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
15 <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 %]">
16 <i class="fa fa-remove" aria-hidden="true"></i>
17 [% IF ( context == "list" ) %]
26 [% INCLUDE 'doc-head-open.inc' %]
27 <title>[% IF op == 'view' %]Contents of [% shelf.shelfname | html %][% ELSE %]Your lists[% END %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
28 [% INCLUDE 'doc-head-close.inc' %]
29 [% BLOCK cssinclude %][% END %]
31 [% IF ( loggedinusername ) %]
32 [% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %]
34 [% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %]
37 [% BLOCK list_permissions %]
39 <label for="allow_changes_from">Allow changes to contents from: </label>
40 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
42 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
44 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
45 <option value="1" selected="selected">Owner only</option>
47 <option value="1">Owner only</option>
50 [% 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   <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span>
57 [% INCLUDE 'masthead.inc' %]
59 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
60 <ol class="breadcrumb">
61 <li class="breadcrumb-item">
62 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
64 [% IF ( loggedinusername ) %]
65 <li class="breadcrumb-item">
66 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
71 <li class="breadcrumb-item">
72 <a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
75 <li class="breadcrumb-item active">
76 <a href="#" aria-current="page">Lists</a>
80 [% IF shelf and shelf.is_private %]
81 [% IF op == 'view' OR op == 'edit_form' %]
82 <li class="breadcrumb-item">
83 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]">Your lists</a>
86 <li class="breadcrumb-item active">
87 <a href="#" aria-current="page">Your lists</a>
90 [% ELSIF shelf AND shelf.is_public %]
92 <li class="breadcrumb-item">
93 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | uri %]">Public lists</a>
96 <li class="breadcrumb-item active">
97 <a href="#" aria-current="page">Public lists</a>
102 [% IF op == 'view' %]
103 <li class="breadcrumb-item active">
104 <a href="#" aria-current="page">Contents of <em>[% shelf.shelfname | html %]</em></a>
108 [% IF op == 'add_form' %]
109 <li class="breadcrumb-item active">
110 <a href="#" aria-current="page">Create new list</a>
114 [% IF op == 'edit_form' %]
115 <li class="breadcrumb-item active">
116 <a href="#" aria-current="page">Edit list <em>[% shelf.shelfname | html %]</em></a>
119 </ol> <!-- / .breadcrumb -->
120 </nav> <!-- /#breadcrumbs -->
122 <div class="container-fluid">
124 [% IF ( OpacNav||loggedinusername ) %]
125 <div class="col col-lg-2 order-2 order-lg-1">
126 <div id="navigation">
127 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
130 <div class="col-md-12 col-lg-10 order-1">
132 <div class="col order-first order-md-first order-lg-2">
135 <div id="usershelves" class="maincontent">
137 [% FOR m IN messages %]
140 <div class="alert alert-success" role="alert">
142 <div class="alert alert-danger" role="alert">
145 [% CASE 'error_on_update' %]
146 <span>An error occurred when updating this list.</span>
147 [% CASE 'error_on_insert' %]
148 <span>An error occurred when creating this list.</span>
149 [% CASE 'error_on_delete' %]
150 <span>An error occurred when deleting this list.</span>
151 [% CASE 'error_on_add_biblio' %]
152 <span>The item has not been added to the list. Please check it's not already in the list.</span>
153 [% CASE 'error_on_remove_share' %]
154 <span>The share has not been removed.</span>
155 [% CASE 'success_on_update' %]
156 <span>List updated.</span>
157 [% CASE 'success_on_insert' %]
158 <span>List created.</span>
159 [% CASE 'success_on_delete' %]
160 <span>List deleted.</span>
161 [% CASE 'success_on_add_biblio' %]
162 <span>The item has been added to the list.</span>
163 [% CASE 'success_on_remove_biblios' %]
164 <span>The item has been removed from the list.</span>
165 [% CASE 'success_on_remove_share' %]
166 <span>The share has been removed.</span>
167 [% CASE 'does_not_exist' %]
168 <span>This list does not exist.</span>
169 [% CASE 'item_does_not_exist' %]
170 <span>This item does not exist.</span>
171 [% CASE 'unauthorized_on_view' %]
172 <span>You do not have permission to view this list.</span>
173 [% CASE 'unauthorized_on_insert' %]
174 <span>You do not have permission to create a new list.</span>
175 [% CASE 'unauthorized_on_update' %]
176 <span>You do not have permission to update this list.</span>
177 [% CASE 'unauthorized_on_delete' %]
178 <span>You do not have permission to delete this list.</span>
179 [% CASE 'unauthorized_on_add_biblio' %]
180 <span>You do not have permission to add a record to this list.</span>
181 [% CASE 'no_biblio_removed' %]
182 <span>No record was removed.</span>
183 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
184 <span>An error occurred when creating the list. The name [% shelfname | html %] already exists.</span>
185 [% CASE 'DBIx::Class::Exception' %]
194 [% IF shelf AND op == 'view' %]
196 [% shelf.shelfname | html %]
197 <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">
198 <i class="fa fa-fw fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this list"></i>
202 [% IF ( itemsloop ) %]
203 [% SET contents = shelf.get_contents %]
204 [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
206 <div id="toolbar" class="toolbar clearfix">
207 <div class="list-actions">
208 <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>
210 <div id="download-list" class="btn-group dropdown">
211 <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>
212 <div class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
213 <a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a>
214 <a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>
215 <a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a>
216 <a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
217 [% FOREACH csv_profile IN csv_profiles %]
218 <a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
223 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
224 <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>
227 <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>
229 [% IF can_manage_shelf %]
230 <span class="sep">|</span>
231 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
232 <input type="hidden" name="op" value="edit_form" />
233 <input type="hidden" name="referer" value="view" />
234 <input type='hidden' name='category' value='[% shelf.category | html %]' />
235 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
236 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
239 [% PROCESS delete_shelf context = "details" %]
241 [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
242 <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>
244 [% ELSIF category == PRIVATE # not manageshelf and private means shared %]
245 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
246 <input type="hidden" name="op" value="remove_share" />
247 <input type="hidden" name="referer" value="list" />
248 <input type='hidden' name='category' value='[% category | html %]' />
249 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
250 <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
251 <i class="fa fa-remove" aria-hidden="true"></i> Remove share
254 [% END # /IF can_manage_shelf %]
255 </div> <!-- /.list-actions -->
257 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by pull-right">
258 <input type="hidden" name="op" value="view" />
259 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
261 <label for="sortfield">Sort by: </label>
262 <select name="sortfield" id="sortfield" class="resort">
263 <option value="">Default sorting</option>
264 <optgroup label="Author">
265 [% IF sortfield == 'author' && direction == 'asc' %]
266 <option value="author" data-direction="asc" selected="selected">Author (A-Z)</option>
268 <option value="author" data-direction="asc">Author (A-Z)</option>
270 [% IF sortfield == 'author' && direction == 'desc' %]
271 <option value="author" data-direction="desc" selected="selected">Author (Z-A)</option>
273 <option value="author" data-direction="desc">Author (Z-A)</option>
276 <optgroup label="Title">
277 [% IF sortfield == 'title' && direction == 'asc' %]
278 <option value="title" data-direction="asc" selected="selected">Title (A-Z)</option>
280 <option value="title" data-direction="asc">Title (A-Z)</option>
282 [% IF sortfield == 'title' && direction == 'desc' %]
283 <option value="title" data-direction="desc" selected="selected">Title (Z-A)</option>
285 <option value="title" data-direction="desc">Title (Z-A)</option>
288 <optgroup label="Call number">
289 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
290 <option value="itemcallnumber" data-direction="asc" selected="selected">Call number (A-Z)</option>
292 <option value="itemcallnumber" data-direction="asc">Call number (A-Z)</option>
294 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
295 <option value="itemcallnumber" data-direction="desc" selected="selected">Call number (Z-A)</option>
297 <option value="itemcallnumber" data-direction="desc">Call number (Z-A)</option>
300 <optgroup label="Copyright date">
301 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
302 <option value="copyrightdate" data-direction="desc" selected="selected">Copyright date (newest to oldest)</option>
304 <option value="copyrightdate" data-direction="desc">Copyright date (newest to oldest)</option>
306 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
307 <option value="copyrightdate" data-direction="asc" selected="selected">Copyright date (oldest to newest)</option>
309 <option value="copyrightdate" data-direction="asc">Copyright date (oldest to newest)</option>
312 <optgroup label="Date added">
313 [% IF sortfield == "dateadded" && direction == 'asc' %]
314 <option value="dateadded" data-direction="desc" selected="selected">Date added (newest to oldest)</option>
316 <option value="dateadded" data-direction="desc">Date added (newest to oldest)</option>
318 [% IF sortfield == "dateadded" && direction == 'desc' %]
319 <option value="dateadded" data-direction="asc" selected="selected">Date added (oldest to newest)</option>
321 <option value="dateadded" data-direction="asc">Date added (oldest to newest)</option>
326 <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
327 </form> <!-- /#sorting-form -->
329 </div> <!-- / #toolbar -->
331 <div class="selections-toolbar toolbar noprint">
332 <div class="check_control">
333 <span class="checkall">
334 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
336 <span class="clearall">
337 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
341 <span class="selections">Select titles to: </span>
342 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
343 <span id="placehold">
344 <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
348 [% IF ( TagsInputEnabled && loggedinusername ) %]
350 <a id="tagsel_tag" href="#" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
352 <span id="tagsel_form" class="form-inline" style="display:none">
353 <label for="tagsel_new">New tag(s), separated by a comma:</label>
354 <input class="form-control form-control-sm" type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
355 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-primary btn-sm" title="tagsel_button" type="submit" value="Add" />
356 <a href="#" id="tagsel_cancel">Cancel</a>
359 [% IF loggedinusername && can_remove_biblios %]
360 <span id="removeitems"></span>
362 </div> <!-- / .links -->
363 </div> <!-- / .selections-toolbar -->
364 </div> <!-- /#floating -->
366 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
367 [% IF can_manage_shelf %]
368 <input type="hidden" name="op" value="remove_biblios" />
369 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
371 <div class="searchresults">
372 <table id="listcontents" class="table">
374 [% FOREACH itemsloo IN itemsloop %]
376 [% IF ( itemsloo.title ) %]
377 [% check_title = itemsloo.title %]
379 [% check_title = itemsloo.biblionumber %]
381 <td class="selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" aria-label="[% check_title | html %]"/></td>
382 [% UNLESS ( item_level_itypes ) %]
384 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
385 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
387 [% itemsloo.description | html %]
391 <div class="coverimages">
392 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
393 [% IF ( itemsloo.title ) %]
394 [% img_title = itemsloo.title %]
396 [% img_title = itemsloo.biblionumber %]
399 [% IF ( OPACLocalCoverImages ) %]
400 <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
403 [% IF ( OPACAmazonCoverImages ) %]
404 [% IF ( itemsloo.normalized_isbn ) %]
405 <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>
407 <span class="no-image">No cover image available</span>
411 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
412 <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>
415 [% IF ( GoogleJackets ) %]
416 [% IF ( itemsloo.normalized_isbn ) %]
417 <div title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
419 <span class="no-image">No cover image available</span>
423 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
424 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
426 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
428 <span class="no-image">No cover image available</span>
433 [% IF OpenLibraryCovers %]
434 [% IF itemsloo.normalized_isbn %]
435 <span title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
437 <span class="no-image">No cover image available</span>
442 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
443 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
445 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
447 <span class="no-image">No cover image available</span>
451 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
452 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
454 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
455 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
458 <span class="no-image">No cover image available</span>
462 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
463 [% SET custom_cover_image_url = itemsloo.biblio_object.custom_cover_image_url %]
464 [% IF custom_cover_image_url %]
465 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
466 <a class="custom_cover_image" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
468 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
469 <a class="custom_cover_image" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
471 <a class="custom_cover_image" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
474 <img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
480 [% itemsloo.XSLTBloc | $raw %]
482 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
483 <div class="results_summary tags">
484 <span class="label">Tags:</span>
486 [% FOREACH TagLoo IN itemsloo.TagLoop %]
487 <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>
493 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
495 [% INCLUDE "openlibrary-readapi.inc" bib = itemsloo %]
496 <!-- COinS / Openurl -->
497 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
500 [% END # / FOREACH itemsloop %]
502 </table> <!-- / #listcontents -->
503 </div><!-- / .searchresults -->
505 [% IF ( pagination_bar ) %]
506 <div class="pages">[% pagination_bar | $raw %]</div>
509 [% IF can_remove_biblios %]
510 <input type="hidden" name="op" value="remove_biblios" />
511 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
512 <input type="hidden" name="modifyshelfcontents" value="1" />
513 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
515 </form> <!-- /myform -->
517 <div id="toolbar" class="toolbar clearfix">
518 <div class="list-actions">
519 <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>
520 [% IF can_manage_shelf %]
521 <span class="sep">|</span>
522 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
523 <input type="hidden" name="op" value="edit_form" />
524 <input type="hidden" name="referer" value="view" />
525 <input type="hidden" name="category" value="[% shelf.category | html %]" />
526 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
527 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
530 [% PROCESS delete_shelf context = "details" %]
533 </div> <!-- / .list-actions -->
534 </div> <!-- / #toolbar -->
536 <div class="alert alert-info">
538 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
539 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
543 [% IF can_manage_shelf %]
544 <form method="post" action="opac-shelves.pl">
545 <input type="hidden" name="op" value="delete" />
546 <input type="hidden" name="referer" value="list" />
547 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
548 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
551 [% END # / IF itemsloop %]
552 [% END # /IF shelf AND op == 'view' %]
554 [% IF op == 'add_form' OR op == 'edit_form' %]
555 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
556 <fieldset class="rows">
557 [% IF op == 'add_form' %]
559 <legend><h1>Create a new list</h1></legend>
560 <input type="hidden" name="op" value="add" />
562 <legend><h1>Editing <em>[% shelf.shelfname | html %]</em></h1></legend>
563 <input type="hidden" name="op" value="edit" />
564 <input type="hidden" name="referer" value="[% referer | html %]" />
565 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
567 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
570 <label class="required" for="shelfname">List name: </label>
571 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="focus required"/>
572 <span class="required">Required</span></li>
574 <label for="sortfield" >Sort this list by: </label>
575 <select name="sortfield" id="sortfield">
576 [% IF shelf.sortfield == "title" %]
577 <option value="title" selected="selected">Title</option>
579 <option value="title">Title</option>
581 [% IF shelf.sortfield == "author" %]
582 <option value="author" selected="selected">Author</option>
584 <option value="author">Author</option>
586 [% IF shelf.sortfield == "copyrightdate" %]
587 <option value="copyrightdate" selected="selected">Year</option>
589 <option value="copyrightdate">Year</option>
591 [% IF shelf.sortfield == "itemcallnumber" %]
592 <option value="itemcallnumber" selected="selected">Call number</option>
594 <option value="itemcallnumber">Call number</option>
596 [% IF shelf.sortfield == "dateadded" %]
597 <option value="dateadded" selected="selected">Date added</option>
599 <option value="dateadded">Date added</option>
603 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
605 <label for="category">Category:</label>
606 <select name="category" id="category" onchange="AdjustRemark()">
607 [% IF shelf.is_private %]
608 <option value="1" selected="selected">Private</option>
610 <option value="1">Private</option>
612 [% IF shelf.is_public %]
613 <option value="2" selected="selected">Public</option>
615 <option value="2">Public</option>
618 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
619 <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>
623 [% INCLUDE list_permissions %]
625 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
626 <input type="hidden" name="category" value="[% PRIVATE | html %]" />
628 </fieldset> <!-- /.rows -->
630 <fieldset class="action">
631 <input type="submit" value="Save" class="btn btn-primary" />
632 [% IF referer == 'view' %]
633 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
635 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a>
640 [% ELSIF op == 'list' %]
642 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
643 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
644 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
645 [% IF category == PRIVATE %]
646 <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&category=[% PRIVATE | html %]">Your lists</a></li>
648 <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>
651 [% IF category == PUBLIC %]
652 <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>
654 <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>
658 [% IF category == PRIVATE %]
659 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
661 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
664 [% IF category == PRIVATE || Koha.Preference('OpacAllowPublicListCreation') %]
665 [% IF loggedinusername %]
666 <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>
668 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
669 <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>
674 [% IF shelves.count %]
675 <table class="table">
676 [% IF category == PRIVATE %]
677 <caption class="sr-only">Your lists</caption>
678 [% ELSIF category == PUBLIC %]
679 <caption class="sr-only">Public lists</caption>
690 [% FOREACH s IN shelves %]
691 [% SET contents = s.get_contents %]
693 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
694 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
696 [% IF s.is_private %]
697 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
703 [% IF s.can_be_managed( loggedinusernumber ) %]
704 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
705 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
706 <input type="hidden" name="category" value="[% s.category | html %]" />
707 <input type="hidden" name="op" value="edit_form" />
708 <input type="hidden" name="referer" value="list" />
709 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
712 [% IF s.can_be_deleted( loggedinusernumber ) %]
713 [% PROCESS delete_shelf shelf = s context = "list" %]
715 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
716 <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>
718 [% IF s.is_shared_with( loggedinusernumber ) %]
719 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
720 <input type="hidden" name="op" value="remove_share" />
721 <input type="hidden" name="referer" value="list" />
722 <input type='hidden' name='category' value='[% category | html %]' />
723 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
724 <button type="submit" class="btn btn-link remove remove_share"
725 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
732 </table> <!-- /.table -->
733 <div class="pages">[% pagination_bar | $raw %]</div>
735 [% IF category == PUBLIC %]
736 <p>No public lists.</p>
737 [% ELSIF loggedinusernumber %]
738 <p>No private lists.</p>
740 [% END # /IF shelves.count %]
742 [% ELSIF NOT loggedinusernumber %]
743 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
744 <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>
746 [% END # IF op == 'add_form' OR op == 'edit_form' %]
747 </div> <!-- / #usershelves -->
748 </div> <!-- / .col-lg-10/12 -->
749 </div> <!-- / .row -->
750 </div> <!-- / .container-fluid -->
751 </div> <!-- / .main -->
753 <form method="post" id="download_list" action="/cgi-bin/koha/opac-downloadshelf.pl">
754 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
755 <input type="hidden" name="format" id="download_format" value="" />
758 [% INCLUDE 'opac-bottom.inc' %]
759 [% BLOCK jsinclude %]
760 [% Asset.js("lib/hc-sticky.js") | $raw %]
761 [% IF OpenLibraryCovers || OpenLibrarySearch %]
762 [% Asset.js("js/openlibrary.js") | $raw %]
765 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
766 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
767 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
768 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
770 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
771 function holdSelections() {
772 var checkedBoxes = $("input:checkbox:checked");
773 if ($(checkedBoxes).size() == 0) {
774 alert( __("No item was selected") );
777 $(checkedBoxes).each(function(){
778 bibs += $(this).val() + "/";
780 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
784 [% IF ( TagsInputEnabled && loggedinusername ) %]
785 function tagSelected() {
786 var checkedBoxes = $("input:checkbox:checked");
787 if ($(checkedBoxes).size()) {
788 $("#tagsel_tag").hide();
789 $(".tag_hides").hide();
790 $("#tagsel_form").show();
792 alert( __("No item was selected") );
796 function tagCanceled() {
797 $("#tagsel_form").hide();
798 $("#tagsel_tag").show();
799 $(".tag_hides").show();
800 $("#tagsel_new").val("");
801 $(".tagstatus").empty().hide();
804 function tagAdded() {
805 var checkedBoxes = $("input:checkbox:checked");
806 if (!$(checkedBoxes).size()) {
807 alert( __("No item was selected") );
811 var tag = $("#tagsel_new").val();
812 if (!tag || (tag == "")) {
813 alert(MSG_NO_TAG_SPECIFIED);
818 for (var i = 0; i < $(checkedBoxes).size(); i++) {
819 var box = $(checkedBoxes).get(i);
820 bibs[i] = $(box).val();
823 KOHA.Tags.add_multitags_button(bibs, tag);
828 function enableCheckboxActions(){
829 // Enable/disable controls if checkboxes are checked
830 var checkedBoxes = $(".cb:checked");
831 if ($(checkedBoxes).size()) {
832 $(".selections").html(_("With selected titles: "));
833 $(".selections-toolbar .links a").removeClass("disabled");
835 $(".selections").html(_("Select titles to: "));
836 $(".selections-toolbar .links a").addClass("disabled");
841 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
843 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
844 $(".selections-toolbar a.hold").click(function(e){
852 $("#CheckAll").on("click",function(e){
854 $(".cb").prop("checked", true);
855 enableCheckboxActions();
857 $("#CheckNone").on("click",function(e){
859 $(".cb").prop("checked", false);
860 enableCheckboxActions();
863 $(".cb").click(function(){
864 enableCheckboxActions();
866 enableCheckboxActions();
868 [% IF ( TagsInputEnabled && loggedinusername ) %]
869 var tagAdd = $(".tag_add");
870 tagAdd.removeClass("hidden");
871 $("#tagsel_tag").click(function(){
875 $("#tagsel_cancel").click(function(){
879 $("#tagsel_button").click(function(){
884 tagAdd.click(function(){
885 var thisid = $(this).attr("id");
886 thisid = thisid.replace("tag_add","");
888 $("#tagform"+thisid).show();
889 $("#newtag"+thisid).focus();
890 $("#newtag"+thisid+"_status").empty().hide();
893 $(".cancel_tag_add").click(function(){
894 var thisid = $(this).attr("id");
895 thisid = thisid.replace("cancel","");
896 $("#tagform"+thisid).hide();
897 $("#tag_add"+thisid).show();
898 $("#newtag"+thisid).val("");
899 $("#newtag"+thisid+"_status").empty().hide();
902 $(".tagbutton").click(function(){
903 var thisid = $(this).attr("title");
904 var tag = $("#newtag"+thisid).val();
905 if (!tag || (tag == "")) {
906 alert(MSG_NO_TAG_SPECIFIED);
909 KOHA.Tags.add_tag_button(thisid, tag);
914 [% IF loggedinusername && can_remove_biblios %]
915 $(".removefromlist").on("click", function(e){
916 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
919 $("#myform").submit(function(){
920 var checkedBoxes = $(".cb:checked");
921 var numchecked = $(checkedBoxes).size();
923 if( numchecked > 1 ){
924 return confirmDelete(MSG_REMOVE_FROM_LIST);
926 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
929 alert( __("No item was selected") );
933 $("#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>")
935 $("#myform").submit();
939 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
940 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
941 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
942 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
943 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
948 window.onafterprint = function () {
951 setTimeout('window.close()', 1000); // Hack for Chrome < 63
956 Sticky = $("#floating");
958 stickTo: "#usershelves",
959 stickyClass: "floating"
963 sortMenu( $("#sorting-form") );
965 $("#sortfield").on("change", function(){
966 $('#sorting-form').submit();
970 $(".deleteshelf").on("click", function(e){
972 var shelf_name = $(this).data("shelfname");
973 var shelf_number = $(this).data("shelfnumber");
974 var is_shared = $(this).data("shared");
975 var count = $(this).data("count");
976 var message = "<p><em>" + shelf_name + "</em></p>";
978 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
981 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
983 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
985 $("#deleteshelf" + shelf_number ).submit();
991 $(".remove_share").on("click", function(e){
993 var shelf_name = $(this).data("shelfname");
994 var shelf_number = $(this).data("shelfnumber");
995 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 ){
997 $("#unshare" + shelf_number ).submit();
1003 $(".download-list").on("click", function(e){
1005 var format = $(this).data("format");
1006 $("#download_format").val( format );
1007 $("#download_list").submit();
1010 }); // document.ready
1012 function sortMenu( sorting_form ){
1013 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1014 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1015 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\">";
1016 $("#sortfield").children().each(function(){
1017 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1018 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1019 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1020 menu += "<span class=\"dropdown-header\">" + $(this).attr("label") + "</span>";
1021 $(this).children().each(function(){
1022 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1023 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "&direction=" + $(this).data('direction') + "\">" + $(this).text() + "</a>";
1029 $(".list-actions").append( menu );
1030 sorting_form.remove();
1033 function AdjustRemark() {
1035 if( $("#category").length > 0 ) {
1036 category = $("#category").val();
1038 category = "[% category | html %]";
1040 var perms = $("#allow_changes_from").val();
1043 $("#anyone_remark").hide();
1044 } else if( category==1 ) {
1045 // If we move to Private (without shares), show Anyone remark
1046 // Note: the number of shares is not tested real-time
1047 [% IF !shelf.is_shared %]
1048 $("#anyone_remark").show();
1050 $("#anyone_remark").hide();
1052 } else { // category==2
1053 $("#anyone_remark").hide();