5 [% USE AdditionalContents %]
6 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
8 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %]
9 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %]
11 [% BLOCK delete_shelf %]
12 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline">
13 <input type="hidden" name="op" value="delete" />
14 <input type="hidden" name="referer" value="list" />
15 <input type='hidden' name='public' value='[% public | html %]' />
16 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
17 <button type="submit" class="btn btn-link remove deleteshelf" data-shelfnumber="[% shelf.shelfnumber | html %]" data-shelfname="[% shelf.shelfname | html %]" data-shared="[% shelf.is_shared | html %]" data-count="[% contents.count | html %]">
18 <i class="fa fa-remove" aria-hidden="true"></i>
19 [% IF ( context == "list" ) %]
28 [% INCLUDE 'doc-head-open.inc' %]
29 <title>[% IF op == 'view' %]Contents of [% shelf.shelfname | html %][% ELSE %]Your lists[% END %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
30 [% INCLUDE 'doc-head-close.inc' %]
31 [% BLOCK cssinclude %][% END %]
33 [% IF ( loggedinusername ) %]
34 [% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %]
36 [% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %]
39 [% BLOCK list_permissions %]
41 <label for="allow_changes_from">Allow changes to contents from: </label>
42 <select name="allow_changes_from" id="allow_changes_from">
44 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
46 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
47 <option value="1" selected="selected">Owner only</option>
49 <option value="1">Owner only</option>
52 [% IF permitteduser == 1 %][% IF shelf.allow_change_from_permitted_staff %]<option value="4" selected="selected">Permitted staff only</option>[% ELSE %]<option value="4">Permitted staff only</option>[% END %][% END %]
54 [% IF staffuser == 1 %][% IF shelf.allow_change_from_staff %]<option value="3" selected="selected">Staff only</option>[% ELSE %]<option value="3">Staff only</option>[% END %][% END %]
56 [% 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 %]
60   <span id="permitted_staff_remark" style="display:none;color:red;">The "Permitted staff only" permission has no actual effect while this list is strictly private.</span>
61   <span id="staff_remark" style="display:none;color:red;">The "Staff only" permission has no actual effect while this list is strictly private.</span>
62   <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span>
66 [% INCLUDE 'masthead.inc' %]
68 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
69 <ol class="breadcrumb">
70 <li class="breadcrumb-item">
71 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
73 [% IF ( loggedinusername ) %]
74 <li class="breadcrumb-item">
75 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
80 <li class="breadcrumb-item">
81 <a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
84 <li class="breadcrumb-item active">
85 <a href="#" aria-current="page">Lists</a>
89 [% IF shelf and shelf.is_private %]
90 [% IF op == 'view' OR op == 'edit_form' %]
91 <li class="breadcrumb-item">
92 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a>
95 <li class="breadcrumb-item active">
96 <a href="#" aria-current="page">Your lists</a>
99 [% ELSIF shelf AND shelf.is_public %]
100 [% IF op == 'view' %]
101 <li class="breadcrumb-item">
102 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a>
105 <li class="breadcrumb-item active">
106 <a href="#" aria-current="page">Public lists</a>
111 [% IF op == 'view' %]
112 <li class="breadcrumb-item active">
113 <a href="#" aria-current="page">Contents of <em>[% shelf.shelfname | html %]</em></a>
117 [% IF op == 'add_form' %]
118 <li class="breadcrumb-item active">
119 <a href="#" aria-current="page">Create new list</a>
123 [% IF op == 'edit_form' %]
124 <li class="breadcrumb-item active">
125 <a href="#" aria-current="page">Edit list <em>[% shelf.shelfname | html %]</em></a>
128 </ol> <!-- / .breadcrumb -->
129 </nav> <!-- /#breadcrumbs -->
131 <div class="container-fluid">
133 [% IF ( OpacNav||loggedinusername ) %]
134 <div class="col col-lg-2 order-2 order-lg-1">
135 <div id="navigation">
136 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
139 <div class="col-md-12 col-lg-10 order-1">
141 <div class="col order-first order-md-first order-lg-2">
144 <div id="usershelves" class="maincontent">
146 [% FOR m IN messages %]
149 <div class="alert alert-success" role="alert">
151 <div class="alert alert-danger" role="alert">
154 [% CASE 'error_on_update' %]
155 <span>An error occurred when updating this list.</span>
156 [% CASE 'error_on_insert' %]
157 <span>An error occurred when creating this list.</span>
158 [% CASE 'error_on_delete' %]
159 <span>An error occurred when deleting this list.</span>
160 [% CASE 'error_on_add_biblio' %]
161 <span>The item has not been added to the list. Please check it's not already in the list.</span>
162 [% CASE 'error_on_remove_share' %]
163 <span>The share has not been removed.</span>
164 [% CASE 'no_email_found' %]
165 <span>No email found for the patrons that accepted the share</span>
166 [% CASE 'success_on_update' %]
167 <span>List updated.</span>
168 [% CASE 'success_on_insert' %]
169 <span>List created.</span>
170 [% CASE 'success_on_delete' %]
171 <span>List deleted.</span>
172 [% CASE 'success_on_add_biblio' %]
173 <span>The item has been added to the list.</span>
174 [% CASE 'success_on_remove_biblios' %]
175 <span>The item has been removed from the list.</span>
176 [% CASE 'success_on_remove_share' %]
177 <span>The share has been removed.</span>
178 [% CASE 'does_not_exist' %]
179 <span>This list does not exist.</span>
180 [% CASE 'item_does_not_exist' %]
181 <span>This item does not exist.</span>
182 [% CASE 'unauthorized_on_view' %]
183 <span>You do not have permission to view this list.</span>
184 [% CASE 'unauthorized_on_insert' %]
185 <span>You do not have permission to create a new list.</span>
186 [% CASE 'unauthorized_on_update' %]
187 <span>You do not have permission to update this list.</span>
188 [% CASE 'unauthorized_on_delete' %]
189 <span>You do not have permission to delete this list.</span>
190 [% CASE 'unauthorized_on_add_biblio' %]
191 <span>You do not have permission to add a record to this list.</span>
192 [% CASE 'unauthorized_transfer' %]
193 <span>You do not have permission to transfer ownership of this list.</span>
194 [% CASE 'no_biblio_removed' %]
195 <span>No record was removed.</span>
196 [% CASE 'new_owner_not_found' %]
197 <span>The new owner could not be found anymore.</span>
198 [% CASE 'new_owner_has_no_share' %]
199 <span>The new owner has no share for this list.</span>
201 [% CASE 'Koha::Exceptions::Virtualshelf::DuplicateObject' %]
202 <span>An error occurred when creating the list. The name [% shelfname | html %] already exists.</span>
203 [% CASE 'DBIx::Class::Exception' %]
212 [% IF shelf AND op == 'view' %]
214 [% shelf.shelfname | html %]
216 <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">
217 <i class="fa fa-fw fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this list"></i>
222 [% IF ( itemsloop ) %]
223 [% SET contents = shelf.get_contents %]
224 [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
226 <div id="toolbar" class="toolbar clearfix">
227 <div class="list-actions">
228 <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>
230 <div id="download-list" class="btn-group dropdown">
231 <a id="format" class="btn btn-link dropdown-toggle" aria-haspopup="menu" aria-label="Select format and download list" 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>
232 <div class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
233 <a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a>
234 [% IF Koha.Preference('OPACISBD') %]<a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>[% END %]
235 <a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a>
236 <a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
237 [% FOREACH csv_profile IN csv_profiles %]
238 <a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
243 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
244 <span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelf.shelfnumber | uri %]" class="btn btn-link send"><i class="fa fa-fw fa-envelope" aria-hidden="true"></i> Send list</a></span>
247 <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>
249 [% IF can_manage_shelf %]
250 <span class="sep">|</span>
251 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
252 <input type="hidden" name="op" value="edit_form" />
253 <input type="hidden" name="referer" value="view" />
254 <input type='hidden' name='public' value='[% shelf.public | html %]' />
255 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
256 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
259 [% PROCESS delete_shelf context = "details" %]
261 [% IF !public && Koha.Preference('OpacAllowSharingPrivateLists') %]
262 <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>
264 [% ELSIF !public # not manageshelf and private means shared %]
265 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
266 <input type="hidden" name="op" value="remove_share" />
267 <input type="hidden" name="referer" value="list" />
268 <input type='hidden' name='public' value='[% public | html %]' />
269 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
270 <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
271 <i class="fa fa-remove" aria-hidden="true"></i> Remove share
274 [% END # /IF can_manage_shelf %]
275 </div> <!-- /.list-actions -->
277 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by pull-right">
278 <input type="hidden" name="op" value="view" />
279 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
281 <label for="sortfield">Sort by: </label>
282 <select name="sortfield" id="sortfield" class="resort">
283 <option value="">Default sorting</option>
284 <optgroup label="Author">
285 [% IF sortfield == 'author' && direction == 'asc' %]
286 <option value="author" data-direction="asc" selected="selected">Author (A-Z)</option>
288 <option value="author" data-direction="asc">Author (A-Z)</option>
290 [% IF sortfield == 'author' && direction == 'desc' %]
291 <option value="author" data-direction="desc" selected="selected">Author (Z-A)</option>
293 <option value="author" data-direction="desc">Author (Z-A)</option>
296 <optgroup label="Title">
297 [% IF sortfield == 'title' && direction == 'asc' %]
298 <option value="title" data-direction="asc" selected="selected">Title (A-Z)</option>
300 <option value="title" data-direction="asc">Title (A-Z)</option>
302 [% IF sortfield == 'title' && direction == 'desc' %]
303 <option value="title" data-direction="desc" selected="selected">Title (Z-A)</option>
305 <option value="title" data-direction="desc">Title (Z-A)</option>
308 <optgroup label="Call number">
309 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
310 <option value="itemcallnumber" data-direction="asc" selected="selected">Call number (A-Z)</option>
312 <option value="itemcallnumber" data-direction="asc">Call number (A-Z)</option>
314 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
315 <option value="itemcallnumber" data-direction="desc" selected="selected">Call number (Z-A)</option>
317 <option value="itemcallnumber" data-direction="desc">Call number (Z-A)</option>
320 <optgroup label="Copyright date">
321 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
322 <option value="copyrightdate" data-direction="desc" selected="selected">Copyright date (newest to oldest)</option>
324 <option value="copyrightdate" data-direction="desc">Copyright date (newest to oldest)</option>
326 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
327 <option value="copyrightdate" data-direction="asc" selected="selected">Copyright date (oldest to newest)</option>
329 <option value="copyrightdate" data-direction="asc">Copyright date (oldest to newest)</option>
332 <optgroup label="Date added">
333 [% IF sortfield == "dateadded" && direction == 'asc' %]
334 <option value="dateadded" data-direction="desc" selected="selected">Date added (newest to oldest)</option>
336 <option value="dateadded" data-direction="desc">Date added (newest to oldest)</option>
338 [% IF sortfield == "dateadded" && direction == 'desc' %]
339 <option value="dateadded" data-direction="asc" selected="selected">Date added (oldest to newest)</option>
341 <option value="dateadded" data-direction="asc">Date added (oldest to newest)</option>
346 <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
347 </form> <!-- /#sorting-form -->
349 </div> <!-- / #toolbar -->
351 <div class="selections-toolbar toolbar noprint">
352 <div class="check_control">
353 <span class="checkall">
354 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
356 <span class="clearall">
357 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
361 <span class="selections">Select titles to: </span>
362 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
363 <span id="placehold">
364 <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
368 [% IF ( TagsInputEnabled && loggedinusername ) %]
370 <a id="tagsel_tag" href="#" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
372 <span id="tagsel_form" class="form-inline" style="display:none">
373 <label for="tagsel_new">New tag(s), separated by a comma:</label>
374 <input class="form-control form-control-sm" type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
375 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-primary btn-sm" title="tagsel_button" type="submit" value="Add" />
376 <a href="#" id="tagsel_cancel">Cancel</a>
379 [% IF loggedinusername && can_remove_biblios %]
380 <span id="removeitems"></span>
382 </div> <!-- / .links -->
383 </div> <!-- / .selections-toolbar -->
384 </div> <!-- /#floating -->
386 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
387 [% IF can_manage_shelf %]
388 <input type="hidden" name="op" value="remove_biblios" />
389 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
391 <div class="searchresults">
392 <table id="listcontents" class="table">
394 [% FOREACH itemsloo IN itemsloop %]
396 [% IF ( itemsloo.title ) %]
397 [% check_title = itemsloo.title %]
399 [% check_title = itemsloo.biblionumber %]
401 <td class="selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" aria-label="[% check_title | html %]"/></td>
402 [% UNLESS ( item_level_itypes ) %]
404 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
405 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
407 <span class="itypetext">[% itemsloo.description | html %]</span>
411 <div class="coverimages">
412 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
413 [% IF ( itemsloo.title ) %]
414 [% img_title = itemsloo.title %]
416 [% img_title = itemsloo.biblionumber %]
419 [% IF ( OPACLocalCoverImages ) %]
420 <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
423 [% IF ( OPACAmazonCoverImages ) %]
424 [% IF ( itemsloo.normalized_isbn ) %]
425 <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>
427 <span class="no-image">No cover image available</span>
431 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
432 <span title="[% img_title | html %]" id="syndetics-thumbnail[% loop.count | html %]"><img src="https://secure.syndetics.com/index.aspx?isbn=[% itemsloo.normalized_isbn | html %]/[% SyndeticsCoverImageSize | uri %].GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% itemsloo.normalized_upc | html %]&oclc=[% itemsloo.normalized_oclc | html %]" alt="" /></span>
435 [% IF ( GoogleJackets ) %]
436 [% IF ( itemsloo.normalized_isbn ) %]
437 <div title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
439 <span class="no-image">No cover image available</span>
443 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
444 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
446 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
448 <span class="no-image">No cover image available</span>
453 [% IF OpenLibraryCovers %]
454 [% IF itemsloo.normalized_isbn %]
455 <span title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
457 <span class="no-image">No cover image available</span>
462 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
463 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
465 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
467 <span class="no-image">No cover image available</span>
471 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
472 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
474 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
475 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
478 <span class="no-image">No cover image available</span>
482 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
483 [% SET custom_cover_image_url = itemsloo.biblio_object.custom_cover_image_url %]
484 [% IF custom_cover_image_url %]
485 <a class="custom_cover_image" href="[% PROCESS biblio_a_href biblionumber => itemsloo.biblionumber %]">
486 <img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
492 [% itemsloo.XSLTBloc | $raw %]
495 [% IF itemsloo.shelves.count %]
496 <div class="results_summary shelves">
497 <span class="label">Lists:</span>
499 [% FOREACH item_shelf IN itemsloo.shelves %]
501 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% item_shelf.shelfnumber | uri %]">[% item_shelf.shelfname | html %]</a>
502 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
509 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
510 <div class="results_summary tags">
511 <span class="label">Tags:</span>
513 [% FOREACH TagLoo IN itemsloo.TagLoop %]
514 <li><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term | uri %]&q=[% TagLoo.term | uri %]">[% TagLoo.term | html %]</a> <span class="weight">([% TagLoo.weight_total | html %])</span></li>
520 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
522 [% INCLUDE "openlibrary-readapi.inc" bib = itemsloo %]
523 <!-- COinS / Openurl -->
524 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
527 [% END # / FOREACH itemsloop %]
529 </table> <!-- / #listcontents -->
530 </div><!-- / .searchresults -->
532 [% IF ( pagination_bar ) %]
533 <div class="pages">[% pagination_bar | $raw %]</div>
536 [% IF can_remove_biblios %]
537 <input type="hidden" name="op" value="remove_biblios" />
538 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
539 <input type="hidden" name="modifyshelfcontents" value="1" />
540 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
542 </form> <!-- /myform -->
544 <div id="toolbar" class="toolbar clearfix">
545 <div class="list-actions">
546 <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>
547 [% IF can_manage_shelf %]
548 <span class="sep">|</span>
549 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
550 <input type="hidden" name="op" value="edit_form" />
551 <input type="hidden" name="referer" value="view" />
552 <input type="hidden" name="public" value="[% shelf.public | html %]" />
553 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
554 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
557 [% PROCESS delete_shelf context = "details" %]
560 </div> <!-- / .list-actions -->
561 </div> <!-- / #toolbar -->
563 <div class="alert alert-info">
564 <span>This list is empty.</span>
565 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
566 <span>You can add to your lists from the results of any <a href="opac-main.pl">search</a>.</span>
570 [% END # / IF itemsloop %]
571 [% END # /IF shelf AND op == 'view' %]
573 [% IF op == 'add_form' OR op == 'edit_form' %]
574 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
575 <fieldset class="rows">
576 [% IF op == 'add_form' %]
578 <legend><h1>Create a new list</h1></legend>
579 <input type="hidden" name="op" value="add" />
581 <legend><h1>Editing <em>[% shelf.shelfname | html %]</em></h1></legend>
582 <input type="hidden" name="op" value="edit" />
583 <input type="hidden" name="referer" value="[% referer | html %]" />
584 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
586 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
589 <label class="required" for="shelfname">List name: </label>
590 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="focus required"/>
591 <span class="required">Required</span></li>
593 <label for="sortfield" >Sort this list by: </label>
594 <select name="sortfield" id="sortfield">
595 [% IF shelf.sortfield == "title" %]
596 <option value="title" selected="selected">Title</option>
598 <option value="title">Title</option>
600 [% IF shelf.sortfield == "author" %]
601 <option value="author" selected="selected">Author</option>
603 <option value="author">Author</option>
605 [% IF shelf.sortfield == "copyrightdate" %]
606 <option value="copyrightdate" selected="selected">Year</option>
608 <option value="copyrightdate">Year</option>
610 [% IF shelf.sortfield == "itemcallnumber" %]
611 <option value="itemcallnumber" selected="selected">Call number</option>
613 <option value="itemcallnumber">Call number</option>
615 [% IF shelf.sortfield == "dateadded" %]
616 <option value="dateadded" selected="selected">Date added</option>
618 <option value="dateadded">Date added</option>
622 [% IF Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
624 <label for="public">Category:</label>
625 <select name="public" id="public">
626 [% IF shelf.is_private %]
627 <option value="0" selected="selected">Private</option>
629 <option value="0">Private</option>
631 [% IF shelf.is_public %]
632 <option value="1" selected="selected">Public</option>
634 <option value="1">Public</option>
637 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
638 <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>
642 [% INCLUDE list_permissions %]
644 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR public == 1 %]
645 <input type="hidden" name="public" value="0" />
647 </fieldset> <!-- /.rows -->
649 <fieldset class="action">
650 <input type="submit" value="Save" class="btn btn-primary" />
651 [% IF referer == 'view' %]
652 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
654 <a href="/cgi-bin/koha/opac-shelves.pl?op=list" class="cancel">Cancel</a>
659 [% ELSIF op == 'transfer' %]
660 <h1>Transfer ownership of shared list '[% shelf.shelfname | html %]'</h1>
662 <form action="/cgi-bin/koha/opac-shelves.pl" id="transferform" method="post">
664 <input type="hidden" name="op" value="transfer" />
665 <input type="hidden" name="public" value="0" />
666 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
668 <label for="find_patron">New owner: </label>
669 <select name="new_owner" id="new_owner">
670 [% FOREACH sharee IN shared_users %]
671 <option value="[% sharee.borrowernumber | html %]" selected="">[% sharee.email | html %]</option>
676 <fieldset class="action">
677 <input type="submit" value="Transfer" class="submit" />
678 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0" class="cancel">Cancel</a>
683 [% ELSIF op == 'list' %]
685 <div class="toptabs">
686 <ul class="nav nav-tabs" id="list-tabs">
687 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
689 <li id="privateshelves_tab" class="nav-item">
690 <a class="nav-link active" id="your_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a>
693 <li id="privateshelves_tab" class="nav-item">
694 <a class="nav-link" id="your_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a>
699 <li id="publicshelves_tab" class="nav-item">
700 <a class="nav-link active" id="public_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a>
703 <li id="publicshelves_tab" class="nav-item">
704 <a class="nav-link" id="public_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a>
709 <div class="tab-content">
711 <div id="privateshelves" class="tab-pane active">
713 <div id="publicshelves" class="tab-pane active">
716 [% IF !public || Koha.Preference('OpacAllowPublicListCreation') %]
717 [% IF loggedinusername %]
718 <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>
720 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
721 <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>
726 [% IF shelves.count %]
727 <table class="table">
729 <caption class="sr-only">Your lists</caption>
731 <caption class="sr-only">Public lists</caption>
738 <th>Modification date</th>
743 [% FOREACH s IN shelves %]
744 [% SET contents = s.get_contents %]
746 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
747 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]<span>item</span>[% ELSE %]<span>items</span>[% END %][% ELSE %]<span>Empty</span>[% END %]</td>
749 [% IF s.is_private %]
750 [% IF s.is_shared %]<span>Shared</span>[% ELSE %]<span>Private</span>[% END %]
755 <td>[% s.lastmodified | $KohaDates %]</td>
757 [% IF s.can_be_managed( loggedinusernumber ) %]
758 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
759 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
760 <input type="hidden" name="public" value="[% s.public | html %]" />
761 <input type="hidden" name="op" value="edit_form" />
762 <input type="hidden" name="referer" value="list" />
763 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
766 [% IF s.can_be_deleted( loggedinusernumber ) %]
767 [% PROCESS delete_shelf shelf = s context = "list" %]
769 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
770 <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>
772 [% IF s.is_shared AND s.can_be_managed( loggedinusernumber ) %]
773 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
774 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
775 <input type="hidden" name="public" value="0" />
776 <input type="hidden" name="op" value="transfer" />
777 <input type="hidden" name="referer" value="list" />
778 <button type="submit" class="btn btn-link transfershelf"> Transfer</button>
781 [% IF s.is_shared_with( loggedinusernumber ) %]
782 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
783 <input type="hidden" name="op" value="remove_share" />
784 <input type="hidden" name="referer" value="list" />
785 <input type='hidden' name='public' value='[% public | html %]' />
786 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
787 <button type="submit" class="btn btn-link remove remove_share"
788 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
795 </table> <!-- /.table -->
796 <div class="pages">[% pagination_bar | $raw %]</div>
799 <p>No public lists.</p>
800 [% ELSIF loggedinusernumber %]
801 <p>No private lists.</p>
803 [% END # /IF shelves.count %]
804 </div> <!-- /.tab-content -->
805 </div> <!-- /.toptabs -->
806 [% ELSIF NOT loggedinusernumber %]
807 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
808 <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>
810 [% END # IF op == 'add_form' OR op == 'edit_form' %]
811 </div> <!-- / #usershelves -->
812 </div> <!-- / .col-lg-10/12 -->
813 </div> <!-- / .row -->
814 </div> <!-- / .container-fluid -->
815 </div> <!-- / .main -->
817 <form method="post" id="download_list" action="/cgi-bin/koha/opac-downloadshelf.pl">
818 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
819 <input type="hidden" name="format" id="download_format" value="" />
822 [% INCLUDE 'opac-bottom.inc' %]
823 [% BLOCK jsinclude %]
824 [% Asset.js("lib/hc-sticky.js") | $raw %]
825 [% IF OpenLibraryCovers || OpenLibrarySearch %]
826 [% Asset.js("js/openlibrary.js") | $raw %]
829 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
830 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
831 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
832 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
834 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
835 function holdSelections() {
836 var checkedBoxes = $("input:checkbox:checked");
837 if ($(checkedBoxes).size() == 0) {
838 alert( _("No item was selected") );
841 $(checkedBoxes).each(function(){
842 bibs += $(this).val() + "/";
844 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
848 [% IF ( TagsInputEnabled && loggedinusername ) %]
849 function tagSelected() {
850 var checkedBoxes = $("input:checkbox:checked");
851 if ($(checkedBoxes).size()) {
852 $("#tagsel_tag").hide();
853 $(".tag_hides").hide();
854 $("#tagsel_form").show();
856 alert( _("No item was selected") );
860 function tagCanceled() {
861 $("#tagsel_form").hide();
862 $("#tagsel_tag").show();
863 $(".tag_hides").show();
864 $("#tagsel_new").val("");
865 $(".tagstatus").empty().hide();
868 function tagAdded() {
869 var checkedBoxes = $("input:checkbox:checked");
870 if (!$(checkedBoxes).size()) {
871 alert( _("No item was selected") );
875 var tag = $("#tagsel_new").val();
876 if (!tag || (tag == "")) {
877 alert(MSG_NO_TAG_SPECIFIED);
882 for (var i = 0; i < $(checkedBoxes).size(); i++) {
883 var box = $(checkedBoxes).get(i);
884 bibs[i] = $(box).val();
887 KOHA.Tags.add_multitags_button(bibs, tag);
892 function enableCheckboxActions(){
893 // Enable/disable controls if checkboxes are checked
894 var checkedBoxes = $(".cb:checked");
895 if ($(checkedBoxes).size()) {
896 $(".selections").html(_("With selected titles: "));
897 $(".selections-toolbar .links a").removeClass("disabled");
899 $(".selections").html(_("Select titles to: "));
900 $(".selections-toolbar .links a").addClass("disabled");
905 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
907 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
908 $(".selections-toolbar a.hold").click(function(e){
916 $("#CheckAll").on("click",function(e){
918 $(".cb").prop("checked", true);
919 enableCheckboxActions();
921 $("#CheckNone").on("click",function(e){
923 $(".cb").prop("checked", false);
924 enableCheckboxActions();
927 $(".cb").click(function(){
928 enableCheckboxActions();
930 enableCheckboxActions();
932 [% IF ( TagsInputEnabled && loggedinusername ) %]
933 var tagAdd = $(".tag_add");
934 tagAdd.removeClass("hidden");
935 $("#tagsel_tag").click(function(){
939 $("#tagsel_cancel").click(function(){
943 $("#tagsel_button").click(function(){
948 tagAdd.click(function(){
949 var thisid = $(this).attr("id");
950 thisid = thisid.replace("tag_add","");
952 $("#tagform"+thisid).show();
953 $("#newtag"+thisid).focus();
954 $("#newtag"+thisid+"_status").empty().hide();
957 $(".cancel_tag_add").click(function(){
958 var thisid = $(this).attr("id");
959 thisid = thisid.replace("cancel","");
960 $("#tagform"+thisid).hide();
961 $("#tag_add"+thisid).show();
962 $("#newtag"+thisid).val("");
963 $("#newtag"+thisid+"_status").empty().hide();
966 $(".tagbutton").click(function(){
967 var thisid = $(this).attr("title");
968 var tag = $("#newtag"+thisid).val();
969 if (!tag || (tag == "")) {
970 alert(MSG_NO_TAG_SPECIFIED);
973 KOHA.Tags.add_tag_button(thisid, tag);
978 [% IF loggedinusername && can_remove_biblios %]
979 $(".removefromlist").on("click", function(e){
980 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
983 $("#myform").submit(function(){
984 var checkedBoxes = $(".cb:checked");
985 var numchecked = $(checkedBoxes).size();
987 if( numchecked > 1 ){
988 return confirmDelete(MSG_REMOVE_FROM_LIST);
990 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
993 alert( _("No item was selected") );
997 $("#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>")
999 $("#myform").submit();
1003 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
1004 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
1005 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1006 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1007 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
1012 window.onafterprint = function () {
1015 setTimeout('window.close()', 1000); // Hack for Chrome < 63
1020 Sticky = $("#floating");
1022 stickTo: "#usershelves",
1023 stickyClass: "floating"
1027 sortMenu( $("#sorting-form") );
1029 $("#sortfield").on("change", function(){
1030 $('#sorting-form').submit();
1034 $(".deleteshelf").on("click", function(e){
1036 var shelf_name = $(this).data("shelfname");
1037 var shelf_number = $(this).data("shelfnumber");
1038 var is_shared = $(this).data("shared");
1039 var count = $(this).data("count");
1040 var message = "<p><em>" + shelf_name + "</em></p>";
1042 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
1045 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
1047 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
1049 $("#deleteshelf" + shelf_number ).submit();
1055 $(".remove_share").on("click", function(e){
1057 var shelf_name = $(this).data("shelfname");
1058 var shelf_number = $(this).data("shelfnumber");
1059 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 ){
1061 $("#unshare" + shelf_number ).submit();
1067 $(".download-list").on("click", function(e){
1069 var format = $(this).data("format");
1070 $("#download_format").val( format );
1071 $("#download_list").submit();
1074 $("#allow_changes_from, #public").on("change", function(){
1078 $(".send").on("click", function(e){
1080 let link = this.href;
1084 }); // document.ready
1086 function sortMenu( sorting_form ){
1087 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1088 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1089 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\">";
1090 $("#sortfield").children().each(function(){
1091 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1092 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1093 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1094 menu += "<span class=\"dropdown-header\">" + $(this).attr("label") + "</span>";
1095 $(this).children().each(function(){
1096 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1097 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "&direction=" + $(this).data('direction') + "\">" + $(this).text() + "</a>";
1103 $(".list-actions").append( menu );
1104 sorting_form.remove();
1107 function AdjustRemark() {
1109 if( $("#public").length > 0 ) {
1110 public = $("#public").val();
1112 public = "[% public | html %]";
1114 var perms = $("#allow_changes_from").val();
1117 $("#anyone_remark").hide();
1118 $("#staff_remark").hide();
1119 $("#permitted_staff_remark").hide();
1120 } else if( public==0 ) {
1121 // If we move to Private (without shares), show Anyone remark
1122 // Note: the number of shares is not tested real-time
1123 [% IF !shelf.is_shared %]
1125 $("#anyone_remark").show();
1126 $("#staff_remark").hide();
1127 $("#permitted_staff_remark").hide();
1128 } else if ( perms==3 ) {
1129 $("#anyone_remark").hide();
1130 $("#staff_remark").show();
1131 $("#permitted_staff_remark").hide();
1132 } else if ( perms==4 ) {
1133 $("#anyone_remark").hide();
1134 $("#staff_remark").hide();
1135 $("#permitted_staff_remark").show();
1138 $("#anyone_remark").hide();
1139 $("#staff_remark").hide();
1140 $("#permitted_staff_remark").hide();
1142 } else { // public==1
1143 $("#anyone_remark").hide();
1144 $("#staff_remark").hide();
1145 $("#permitted_staff_remark").hide();