4 [% USE AdditionalContents %]
5 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
6 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %]
8 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %]
10 [% BLOCK delete_shelf %]
11 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline">
12 <input type="hidden" name="op" value="delete" />
13 <input type="hidden" name="referer" value="list" />
14 <input type='hidden' name='public' value='[% public | html %]' />
15 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
16 <button type="submit" class="btn btn-link remove deleteshelf" data-shelfnumber="[% shelf.shelfnumber | html %]" data-shelfname="[% shelf.shelfname | html %]" data-shared="[% shelf.is_shared | html %]" data-count="[% contents.count | html %]">
17 <i class="fa fa-remove" aria-hidden="true"></i>
18 [% IF ( context == "list" ) %]
27 [% INCLUDE 'doc-head-open.inc' %]
28 <title>[% IF op == 'view' %]Contents of [% shelf.shelfname | html %][% ELSE %]Your lists[% END %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
29 [% INCLUDE 'doc-head-close.inc' %]
30 [% BLOCK cssinclude %][% END %]
32 [% IF ( loggedinusername ) %]
33 [% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %]
35 [% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %]
38 [% BLOCK list_permissions %]
40 <label for="allow_changes_from">Allow changes to contents from: </label>
41 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
43 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
45 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
46 <option value="1" selected="selected">Owner only</option>
48 <option value="1">Owner only</option>
51 [% IF shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %]
54   <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span>
58 [% INCLUDE 'masthead.inc' %]
60 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
61 <ol class="breadcrumb">
62 <li class="breadcrumb-item">
63 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
65 [% IF ( loggedinusername ) %]
66 <li class="breadcrumb-item">
67 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
72 <li class="breadcrumb-item">
73 <a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
76 <li class="breadcrumb-item active">
77 <a href="#" aria-current="page">Lists</a>
81 [% IF shelf and shelf.is_private %]
82 [% IF op == 'view' OR op == 'edit_form' %]
83 <li class="breadcrumb-item">
84 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a>
87 <li class="breadcrumb-item active">
88 <a href="#" aria-current="page">Your lists</a>
91 [% ELSIF shelf AND shelf.is_public %]
93 <li class="breadcrumb-item">
94 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a>
97 <li class="breadcrumb-item active">
98 <a href="#" aria-current="page">Public lists</a>
103 [% IF op == 'view' %]
104 <li class="breadcrumb-item active">
105 <a href="#" aria-current="page">Contents of <em>[% shelf.shelfname | html %]</em></a>
109 [% IF op == 'add_form' %]
110 <li class="breadcrumb-item active">
111 <a href="#" aria-current="page">Create new list</a>
115 [% IF op == 'edit_form' %]
116 <li class="breadcrumb-item active">
117 <a href="#" aria-current="page">Edit list <em>[% shelf.shelfname | html %]</em></a>
120 </ol> <!-- / .breadcrumb -->
121 </nav> <!-- /#breadcrumbs -->
123 <div class="container-fluid">
125 [% IF ( OpacNav||loggedinusername ) %]
126 <div class="col col-lg-2 order-2 order-lg-1">
127 <div id="navigation">
128 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
131 <div class="col-md-12 col-lg-10 order-1">
133 <div class="col order-first order-md-first order-lg-2">
136 <div id="usershelves" class="maincontent">
138 [% FOR m IN messages %]
141 <div class="alert alert-success" role="alert">
143 <div class="alert alert-danger" role="alert">
146 [% CASE 'error_on_update' %]
147 <span>An error occurred when updating this list.</span>
148 [% CASE 'error_on_insert' %]
149 <span>An error occurred when creating this list.</span>
150 [% CASE 'error_on_delete' %]
151 <span>An error occurred when deleting this list.</span>
152 [% CASE 'error_on_add_biblio' %]
153 <span>The item has not been added to the list. Please check it's not already in the list.</span>
154 [% CASE 'error_on_remove_share' %]
155 <span>The share has not been removed.</span>
156 [% CASE 'success_on_update' %]
157 <span>List updated.</span>
158 [% CASE 'success_on_insert' %]
159 <span>List created.</span>
160 [% CASE 'success_on_delete' %]
161 <span>List deleted.</span>
162 [% CASE 'success_on_add_biblio' %]
163 <span>The item has been added to the list.</span>
164 [% CASE 'success_on_remove_biblios' %]
165 <span>The item has been removed from the list.</span>
166 [% CASE 'success_on_remove_share' %]
167 <span>The share has been removed.</span>
168 [% CASE 'does_not_exist' %]
169 <span>This list does not exist.</span>
170 [% CASE 'item_does_not_exist' %]
171 <span>This item does not exist.</span>
172 [% CASE 'unauthorized_on_view' %]
173 <span>You do not have permission to view this list.</span>
174 [% CASE 'unauthorized_on_insert' %]
175 <span>You do not have permission to create a new list.</span>
176 [% CASE 'unauthorized_on_update' %]
177 <span>You do not have permission to update this list.</span>
178 [% CASE 'unauthorized_on_delete' %]
179 <span>You do not have permission to delete this list.</span>
180 [% CASE 'unauthorized_on_add_biblio' %]
181 <span>You do not have permission to add a record to this list.</span>
182 [% CASE 'no_biblio_removed' %]
183 <span>No record was removed.</span>
184 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
185 <span>An error occurred when creating the list. The name [% shelfname | html %] already exists.</span>
186 [% CASE 'DBIx::Class::Exception' %]
195 [% IF shelf AND op == 'view' %]
197 [% shelf.shelfname | html %]
198 <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">
199 <i class="fa fa-fw fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this list"></i>
203 [% IF ( itemsloop ) %]
204 [% SET contents = shelf.get_contents %]
205 [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
207 <div id="toolbar" class="toolbar clearfix">
208 <div class="list-actions">
209 <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>
211 <div id="download-list" class="btn-group dropdown">
212 <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>
213 <div class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
214 <a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a>
215 [% IF Koha.Preference('OPACISBD') %]<a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>[% END %]
216 <a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a>
217 <a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
218 [% FOREACH csv_profile IN csv_profiles %]
219 <a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
224 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
225 <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>
228 <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>
230 [% IF can_manage_shelf %]
231 <span class="sep">|</span>
232 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
233 <input type="hidden" name="op" value="edit_form" />
234 <input type="hidden" name="referer" value="view" />
235 <input type='hidden' name='public' value='[% shelf.public | html %]' />
236 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
237 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
240 [% PROCESS delete_shelf context = "details" %]
242 [% IF !public && Koha.Preference('OpacAllowSharingPrivateLists') %]
243 <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>
245 [% ELSIF !public # not manageshelf and private means shared %]
246 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
247 <input type="hidden" name="op" value="remove_share" />
248 <input type="hidden" name="referer" value="list" />
249 <input type='hidden' name='public' value='[% public | html %]' />
250 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
251 <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
252 <i class="fa fa-remove" aria-hidden="true"></i> Remove share
255 [% END # /IF can_manage_shelf %]
256 </div> <!-- /.list-actions -->
258 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by pull-right">
259 <input type="hidden" name="op" value="view" />
260 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
262 <label for="sortfield">Sort by: </label>
263 <select name="sortfield" id="sortfield" class="resort">
264 <option value="">Default sorting</option>
265 <optgroup label="Author">
266 [% IF sortfield == 'author' && direction == 'asc' %]
267 <option value="author" data-direction="asc" selected="selected">Author (A-Z)</option>
269 <option value="author" data-direction="asc">Author (A-Z)</option>
271 [% IF sortfield == 'author' && direction == 'desc' %]
272 <option value="author" data-direction="desc" selected="selected">Author (Z-A)</option>
274 <option value="author" data-direction="desc">Author (Z-A)</option>
277 <optgroup label="Title">
278 [% IF sortfield == 'title' && direction == 'asc' %]
279 <option value="title" data-direction="asc" selected="selected">Title (A-Z)</option>
281 <option value="title" data-direction="asc">Title (A-Z)</option>
283 [% IF sortfield == 'title' && direction == 'desc' %]
284 <option value="title" data-direction="desc" selected="selected">Title (Z-A)</option>
286 <option value="title" data-direction="desc">Title (Z-A)</option>
289 <optgroup label="Call number">
290 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
291 <option value="itemcallnumber" data-direction="asc" selected="selected">Call number (A-Z)</option>
293 <option value="itemcallnumber" data-direction="asc">Call number (A-Z)</option>
295 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
296 <option value="itemcallnumber" data-direction="desc" selected="selected">Call number (Z-A)</option>
298 <option value="itemcallnumber" data-direction="desc">Call number (Z-A)</option>
301 <optgroup label="Copyright date">
302 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
303 <option value="copyrightdate" data-direction="desc" selected="selected">Copyright date (newest to oldest)</option>
305 <option value="copyrightdate" data-direction="desc">Copyright date (newest to oldest)</option>
307 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
308 <option value="copyrightdate" data-direction="asc" selected="selected">Copyright date (oldest to newest)</option>
310 <option value="copyrightdate" data-direction="asc">Copyright date (oldest to newest)</option>
313 <optgroup label="Date added">
314 [% IF sortfield == "dateadded" && direction == 'asc' %]
315 <option value="dateadded" data-direction="desc" selected="selected">Date added (newest to oldest)</option>
317 <option value="dateadded" data-direction="desc">Date added (newest to oldest)</option>
319 [% IF sortfield == "dateadded" && direction == 'desc' %]
320 <option value="dateadded" data-direction="asc" selected="selected">Date added (oldest to newest)</option>
322 <option value="dateadded" data-direction="asc">Date added (oldest to newest)</option>
327 <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
328 </form> <!-- /#sorting-form -->
330 </div> <!-- / #toolbar -->
332 <div class="selections-toolbar toolbar noprint">
333 <div class="check_control">
334 <span class="checkall">
335 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
337 <span class="clearall">
338 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
342 <span class="selections">Select titles to: </span>
343 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
344 <span id="placehold">
345 <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
349 [% IF ( TagsInputEnabled && loggedinusername ) %]
351 <a id="tagsel_tag" href="#" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
353 <span id="tagsel_form" class="form-inline" style="display:none">
354 <label for="tagsel_new">New tag(s), separated by a comma:</label>
355 <input class="form-control form-control-sm" type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
356 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-primary btn-sm" title="tagsel_button" type="submit" value="Add" />
357 <a href="#" id="tagsel_cancel">Cancel</a>
360 [% IF loggedinusername && can_remove_biblios %]
361 <span id="removeitems"></span>
363 </div> <!-- / .links -->
364 </div> <!-- / .selections-toolbar -->
365 </div> <!-- /#floating -->
367 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
368 [% IF can_manage_shelf %]
369 <input type="hidden" name="op" value="remove_biblios" />
370 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
372 <div class="searchresults">
373 <table id="listcontents" class="table">
375 [% FOREACH itemsloo IN itemsloop %]
377 [% IF ( itemsloo.title ) %]
378 [% check_title = itemsloo.title %]
380 [% check_title = itemsloo.biblionumber %]
382 <td class="selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" aria-label="[% check_title | html %]"/></td>
383 [% UNLESS ( item_level_itypes ) %]
385 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
386 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
388 [% itemsloo.description | html %]
392 <div class="coverimages">
393 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
394 [% IF ( itemsloo.title ) %]
395 [% img_title = itemsloo.title %]
397 [% img_title = itemsloo.biblionumber %]
400 [% IF ( OPACLocalCoverImages ) %]
401 <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
404 [% IF ( OPACAmazonCoverImages ) %]
405 [% IF ( itemsloo.normalized_isbn ) %]
406 <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>
408 <span class="no-image">No cover image available</span>
412 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
413 <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>
416 [% IF ( GoogleJackets ) %]
417 [% IF ( itemsloo.normalized_isbn ) %]
418 <div title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
420 <span class="no-image">No cover image available</span>
424 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
425 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
427 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
429 <span class="no-image">No cover image available</span>
434 [% IF OpenLibraryCovers %]
435 [% IF itemsloo.normalized_isbn %]
436 <span title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
438 <span class="no-image">No cover image available</span>
443 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
444 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
446 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
448 <span class="no-image">No cover image available</span>
452 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
453 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
455 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
456 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
459 <span class="no-image">No cover image available</span>
463 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
464 [% SET custom_cover_image_url = itemsloo.biblio_object.custom_cover_image_url %]
465 [% IF custom_cover_image_url %]
466 <a class="custom_cover_image" href="[% PROCESS biblio_a_href biblionumber => itemsloo.biblionumber %]">
467 <img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
473 [% itemsloo.XSLTBloc | $raw %]
475 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
476 <div class="results_summary tags">
477 <span class="label">Tags:</span>
479 [% FOREACH TagLoo IN itemsloo.TagLoop %]
480 <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>
486 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
488 [% INCLUDE "openlibrary-readapi.inc" bib = itemsloo %]
489 <!-- COinS / Openurl -->
490 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
493 [% END # / FOREACH itemsloop %]
495 </table> <!-- / #listcontents -->
496 </div><!-- / .searchresults -->
498 [% IF ( pagination_bar ) %]
499 <div class="pages">[% pagination_bar | $raw %]</div>
502 [% IF can_remove_biblios %]
503 <input type="hidden" name="op" value="remove_biblios" />
504 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
505 <input type="hidden" name="modifyshelfcontents" value="1" />
506 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
508 </form> <!-- /myform -->
510 <div id="toolbar" class="toolbar clearfix">
511 <div class="list-actions">
512 <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>
513 [% IF can_manage_shelf %]
514 <span class="sep">|</span>
515 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
516 <input type="hidden" name="op" value="edit_form" />
517 <input type="hidden" name="referer" value="view" />
518 <input type="hidden" name="public" value="[% shelf.public | html %]" />
519 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
520 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
523 [% PROCESS delete_shelf context = "details" %]
526 </div> <!-- / .list-actions -->
527 </div> <!-- / #toolbar -->
529 <div class="alert alert-info">
531 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
532 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
536 [% IF can_manage_shelf %]
537 <form method="post" action="opac-shelves.pl">
538 <input type="hidden" name="op" value="delete" />
539 <input type="hidden" name="referer" value="list" />
540 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
541 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
544 [% END # / IF itemsloop %]
545 [% END # /IF shelf AND op == 'view' %]
547 [% IF op == 'add_form' OR op == 'edit_form' %]
548 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
549 <fieldset class="rows">
550 [% IF op == 'add_form' %]
552 <legend><h1>Create a new list</h1></legend>
553 <input type="hidden" name="op" value="add" />
555 <legend><h1>Editing <em>[% shelf.shelfname | html %]</em></h1></legend>
556 <input type="hidden" name="op" value="edit" />
557 <input type="hidden" name="referer" value="[% referer | html %]" />
558 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
560 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
563 <label class="required" for="shelfname">List name: </label>
564 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="focus required"/>
565 <span class="required">Required</span></li>
567 <label for="sortfield" >Sort this list by: </label>
568 <select name="sortfield" id="sortfield">
569 [% IF shelf.sortfield == "title" %]
570 <option value="title" selected="selected">Title</option>
572 <option value="title">Title</option>
574 [% IF shelf.sortfield == "author" %]
575 <option value="author" selected="selected">Author</option>
577 <option value="author">Author</option>
579 [% IF shelf.sortfield == "copyrightdate" %]
580 <option value="copyrightdate" selected="selected">Year</option>
582 <option value="copyrightdate">Year</option>
584 [% IF shelf.sortfield == "itemcallnumber" %]
585 <option value="itemcallnumber" selected="selected">Call number</option>
587 <option value="itemcallnumber">Call number</option>
589 [% IF shelf.sortfield == "dateadded" %]
590 <option value="dateadded" selected="selected">Date added</option>
592 <option value="dateadded">Date added</option>
596 [% IF Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
598 <label for="public">Category:</label>
599 <select name="public" id="public" onchange="AdjustRemark()">
600 [% IF shelf.is_private %]
601 <option value="0" selected="selected">Private</option>
603 <option value="0">Private</option>
605 [% IF shelf.is_public %]
606 <option value="1" selected="selected">Public</option>
608 <option value="1">Public</option>
611 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
612 <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>
616 [% INCLUDE list_permissions %]
618 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
619 <input type="hidden" name="public" value="0" />
621 </fieldset> <!-- /.rows -->
623 <fieldset class="action">
624 <input type="submit" value="Save" class="btn btn-primary" />
625 [% IF referer == 'view' %]
626 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
628 <a href="/cgi-bin/koha/opac-shelves.pl?op=list" class="cancel">Cancel</a>
633 [% ELSIF op == 'list' %]
635 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
636 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
637 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
639 <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>
641 <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>
645 <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>
647 <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>
652 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
654 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
657 [% IF !public || Koha.Preference('OpacAllowPublicListCreation') %]
658 [% IF loggedinusername %]
659 <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>
661 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
662 <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>
667 [% IF shelves.count %]
668 <table class="table">
670 <caption class="sr-only">Your lists</caption>
672 <caption class="sr-only">Public lists</caption>
683 [% FOREACH s IN shelves %]
684 [% SET contents = s.get_contents %]
686 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
687 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
689 [% IF s.is_private %]
690 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
696 [% IF s.can_be_managed( loggedinusernumber ) %]
697 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
698 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
699 <input type="hidden" name="public" value="[% s.public | html %]" />
700 <input type="hidden" name="op" value="edit_form" />
701 <input type="hidden" name="referer" value="list" />
702 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
705 [% IF s.can_be_deleted( loggedinusernumber ) %]
706 [% PROCESS delete_shelf shelf = s context = "list" %]
708 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
709 <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>
711 [% IF s.is_shared_with( loggedinusernumber ) %]
712 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
713 <input type="hidden" name="op" value="remove_share" />
714 <input type="hidden" name="referer" value="list" />
715 <input type='hidden' name='public' value='[% public | html %]' />
716 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
717 <button type="submit" class="btn btn-link remove remove_share"
718 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
725 </table> <!-- /.table -->
726 <div class="pages">[% pagination_bar | $raw %]</div>
729 <p>No public lists.</p>
730 [% ELSIF loggedinusernumber %]
731 <p>No private lists.</p>
733 [% END # /IF shelves.count %]
735 [% ELSIF NOT loggedinusernumber %]
736 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
737 <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>
739 [% END # IF op == 'add_form' OR op == 'edit_form' %]
740 </div> <!-- / #usershelves -->
741 </div> <!-- / .col-lg-10/12 -->
742 </div> <!-- / .row -->
743 </div> <!-- / .container-fluid -->
744 </div> <!-- / .main -->
746 <form method="post" id="download_list" action="/cgi-bin/koha/opac-downloadshelf.pl">
747 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
748 <input type="hidden" name="format" id="download_format" value="" />
751 [% INCLUDE 'opac-bottom.inc' %]
752 [% BLOCK jsinclude %]
753 [% Asset.js("lib/hc-sticky.js") | $raw %]
754 [% IF OpenLibraryCovers || OpenLibrarySearch %]
755 [% Asset.js("js/openlibrary.js") | $raw %]
758 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
759 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
760 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
761 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
763 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
764 function holdSelections() {
765 var checkedBoxes = $("input:checkbox:checked");
766 if ($(checkedBoxes).size() == 0) {
767 alert( __("No item was selected") );
770 $(checkedBoxes).each(function(){
771 bibs += $(this).val() + "/";
773 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
777 [% IF ( TagsInputEnabled && loggedinusername ) %]
778 function tagSelected() {
779 var checkedBoxes = $("input:checkbox:checked");
780 if ($(checkedBoxes).size()) {
781 $("#tagsel_tag").hide();
782 $(".tag_hides").hide();
783 $("#tagsel_form").show();
785 alert( __("No item was selected") );
789 function tagCanceled() {
790 $("#tagsel_form").hide();
791 $("#tagsel_tag").show();
792 $(".tag_hides").show();
793 $("#tagsel_new").val("");
794 $(".tagstatus").empty().hide();
797 function tagAdded() {
798 var checkedBoxes = $("input:checkbox:checked");
799 if (!$(checkedBoxes).size()) {
800 alert( __("No item was selected") );
804 var tag = $("#tagsel_new").val();
805 if (!tag || (tag == "")) {
806 alert(MSG_NO_TAG_SPECIFIED);
811 for (var i = 0; i < $(checkedBoxes).size(); i++) {
812 var box = $(checkedBoxes).get(i);
813 bibs[i] = $(box).val();
816 KOHA.Tags.add_multitags_button(bibs, tag);
821 function enableCheckboxActions(){
822 // Enable/disable controls if checkboxes are checked
823 var checkedBoxes = $(".cb:checked");
824 if ($(checkedBoxes).size()) {
825 $(".selections").html(_("With selected titles: "));
826 $(".selections-toolbar .links a").removeClass("disabled");
828 $(".selections").html(_("Select titles to: "));
829 $(".selections-toolbar .links a").addClass("disabled");
834 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
836 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
837 $(".selections-toolbar a.hold").click(function(e){
845 $("#CheckAll").on("click",function(e){
847 $(".cb").prop("checked", true);
848 enableCheckboxActions();
850 $("#CheckNone").on("click",function(e){
852 $(".cb").prop("checked", false);
853 enableCheckboxActions();
856 $(".cb").click(function(){
857 enableCheckboxActions();
859 enableCheckboxActions();
861 [% IF ( TagsInputEnabled && loggedinusername ) %]
862 var tagAdd = $(".tag_add");
863 tagAdd.removeClass("hidden");
864 $("#tagsel_tag").click(function(){
868 $("#tagsel_cancel").click(function(){
872 $("#tagsel_button").click(function(){
877 tagAdd.click(function(){
878 var thisid = $(this).attr("id");
879 thisid = thisid.replace("tag_add","");
881 $("#tagform"+thisid).show();
882 $("#newtag"+thisid).focus();
883 $("#newtag"+thisid+"_status").empty().hide();
886 $(".cancel_tag_add").click(function(){
887 var thisid = $(this).attr("id");
888 thisid = thisid.replace("cancel","");
889 $("#tagform"+thisid).hide();
890 $("#tag_add"+thisid).show();
891 $("#newtag"+thisid).val("");
892 $("#newtag"+thisid+"_status").empty().hide();
895 $(".tagbutton").click(function(){
896 var thisid = $(this).attr("title");
897 var tag = $("#newtag"+thisid).val();
898 if (!tag || (tag == "")) {
899 alert(MSG_NO_TAG_SPECIFIED);
902 KOHA.Tags.add_tag_button(thisid, tag);
907 [% IF loggedinusername && can_remove_biblios %]
908 $(".removefromlist").on("click", function(e){
909 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
912 $("#myform").submit(function(){
913 var checkedBoxes = $(".cb:checked");
914 var numchecked = $(checkedBoxes).size();
916 if( numchecked > 1 ){
917 return confirmDelete(MSG_REMOVE_FROM_LIST);
919 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
922 alert( __("No item was selected") );
926 $("#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>")
928 $("#myform").submit();
932 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
933 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
934 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
935 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
936 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
941 window.onafterprint = function () {
944 setTimeout('window.close()', 1000); // Hack for Chrome < 63
949 Sticky = $("#floating");
951 stickTo: "#usershelves",
952 stickyClass: "floating"
956 sortMenu( $("#sorting-form") );
958 $("#sortfield").on("change", function(){
959 $('#sorting-form').submit();
963 $(".deleteshelf").on("click", function(e){
965 var shelf_name = $(this).data("shelfname");
966 var shelf_number = $(this).data("shelfnumber");
967 var is_shared = $(this).data("shared");
968 var count = $(this).data("count");
969 var message = "<p><em>" + shelf_name + "</em></p>";
971 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
974 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
976 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
978 $("#deleteshelf" + shelf_number ).submit();
984 $(".remove_share").on("click", function(e){
986 var shelf_name = $(this).data("shelfname");
987 var shelf_number = $(this).data("shelfnumber");
988 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 ){
990 $("#unshare" + shelf_number ).submit();
996 $(".download-list").on("click", function(e){
998 var format = $(this).data("format");
999 $("#download_format").val( format );
1000 $("#download_list").submit();
1003 }); // document.ready
1005 function sortMenu( sorting_form ){
1006 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1007 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1008 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\">";
1009 $("#sortfield").children().each(function(){
1010 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1011 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1012 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1013 menu += "<span class=\"dropdown-header\">" + $(this).attr("label") + "</span>";
1014 $(this).children().each(function(){
1015 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1016 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "&direction=" + $(this).data('direction') + "\">" + $(this).text() + "</a>";
1022 $(".list-actions").append( menu );
1023 sorting_form.remove();
1026 function AdjustRemark() {
1028 if( $("#public").length > 0 ) {
1029 public = $("#public").val();
1031 public = "[% public | html %]";
1033 var perms = $("#allow_changes_from").val();
1036 $("#anyone_remark").hide();
1037 } else if( public==0 ) {
1038 // If we move to Private (without shares), show Anyone remark
1039 // Note: the number of shares is not tested real-time
1040 [% IF !shelf.is_shared %]
1041 $("#anyone_remark").show();
1043 $("#anyone_remark").hide();
1045 } else { // public==1
1046 $("#anyone_remark").hide();