6 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %]
7 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %]
8 [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
9 [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
11 [% BLOCK delete_shelf %]
12 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline">
13 <input type="hidden" name="op" value="delete" />
14 <input type="hidden" name="referer" value="list" />
15 <input type='hidden' name='category' value='[% category | html %]' />
16 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
17 <button type="submit" class="btn btn-link remove deleteshelf" data-shelfnumber="[% shelf.shelfnumber | html %]" data-shelfname="[% shelf.shelfname | html %]" data-shared="[% shelf.is_shared | html %]" data-count="[% contents.count | html %]">
18 <i class="fa fa-remove" aria-hidden="true"></i>
19 [% IF ( context == "list" ) %]
28 [% INCLUDE 'doc-head-open.inc' %]
29 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › [% IF op == 'view' %]Contents of [% shelf.shelfname | html %][% ELSE %]Your lists[% END %]</title>[% 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 aria-label="breadcrumb">
61 <ul 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" aria-current="page">
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&category=[% PRIVATE | uri %]">Your lists</a>
87 <li class="breadcrumb-item" aria-current="page">
91 [% ELSIF shelf AND shelf.is_public %]
93 <li class="breadcrumb-item">
94 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | uri %]">Public lists</a>
97 <li class="breadcrumb-item" aria-current="page">
103 [% IF op == 'view' %]
104 <li class="breadcrumb-item" aria-current="page">
105 Contents of <em>[% shelf.shelfname | html %]</em>
109 [% IF op == 'add_form' %]
110 <li class="breadcrumb-item" aria-current="page">
115 [% IF op == 'edit_form' %]
116 <li class="breadcrumb-item" aria-current="page">
117 Edit list <em>[% shelf.shelfname | html %]</em>
120 </ul> <!-- / .breadcrumb -->
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 <a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | uri %]" class="btn btn-link download" data-toggle="modal" data-target="#modalWin"><i class="fa fa-fw fa-download" aria-hidden="true"></i> Download list</a>
213 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
214 <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>
217 <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>
219 [% IF can_manage_shelf %]
220 <span class="sep">|</span>
221 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
222 <input type="hidden" name="op" value="edit_form" />
223 <input type="hidden" name="referer" value="view" />
224 <input type='hidden' name='category' value='[% shelf.category | html %]' />
225 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
226 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
229 [% PROCESS delete_shelf context = "details" %]
231 [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
232 <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>
234 [% ELSIF category == PRIVATE # not manageshelf and private means shared %]
235 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
236 <input type="hidden" name="op" value="remove_share" />
237 <input type="hidden" name="referer" value="list" />
238 <input type='hidden' name='category' value='[% category | html %]' />
239 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
240 <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
241 <i class="fa fa-remove" aria-hidden="true"></i> Remove share
244 [% END # /IF can_manage_shelf %]
245 </div> <!-- /.list-actions -->
247 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by pull-right">
248 <input type="hidden" name="op" value="view" />
249 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
251 <label for="sortfield">Sort by: </label>
252 <select name="sortfield" id="sortfield" class="resort">
253 <option value="">Default sorting</option>
254 <optgroup label="Author">
255 [% IF sortfield == 'author' && direction == 'asc' %]
256 <option value="author:asc" selected="selected">Author (A-Z)</option>
258 <option value="author:asc">Author (A-Z)</option>
260 [% IF sortfield == 'author' && direction == 'desc' %]
261 <option value="author:desc" selected="selected">Author (Z-A)</option>
263 <option value="author:desc">Author (Z-A)</option>
266 <optgroup label="Title">
267 [% IF sortfield == 'title' && direction == 'asc' %]
268 <option value="title:asc" selected="selected">Title (A-Z)</option>
270 <option value="title:asc">Title (A-Z)</option>
272 [% IF sortfield == 'title' && direction == 'desc' %]
273 <option value="title:desc" selected="selected">Title (Z-A)</option>
275 <option value="title:desc">Title (Z-A)</option>
278 <optgroup label="Call number">
279 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
280 <option value="itemcallnumber:asc" selected="selected">Call number (A-Z)</option>
282 <option value="itemcallnumber:asc">Call number (A-Z)</option>
284 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
285 <option value="itemcallnumber:desc" selected="selected">Call number (Z-A)</option>
287 <option value="itemcallnumber:desc">Call number (Z-A)</option>
290 <optgroup label="Copyright date">
291 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
292 <option value="copyrightdate:desc" selected="selected">Copyright date (newest to oldest)</option>
294 <option value="copyrightdate:desc">Copyright date (newest to oldest)</option>
296 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
297 <option value="copyrightdate:asc" selected="selected">Copyright date (oldest to newest)</option>
299 <option value="copyrightdate:asc">Copyright date (oldest to newest)</option>
302 <optgroup label="Date added">
303 [% IF sortfield == "dateadded" && direction == 'asc' %]
304 <option value="dateadded:desc" selected="selected">Date added (newest to oldest)</option>
306 <option value="dateadded:desc">Date added (newest to oldest)</option>
308 [% IF sortfield == "dateadded" && direction == 'desc' %]
309 <option value="dateadded:asc" selected="selected">Date added (oldest to newest)</option>
311 <option value="dateadded:asc">Date added (oldest to newest)</option>
316 <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
317 </form> <!-- /#sorting-form -->
319 </div> <!-- / #toolbar -->
321 <div id="selections-toolbar" class="toolbar noprint">
322 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
324 <span id="selections">Select titles to: </span>
325 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
326 <span id="placehold"></span>
328 [% IF ( TagsInputEnabled && loggedinusername ) %]
330 <a id="tagsel_tag" href="#" class="btn btn-link btn-disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
332 <span id="tagsel_form" class="form-inline" style="display:none">
333 <label for="tagsel_new">New tag(s), separated by a comma:</label>
334 <input class="form-control form-control-sm" type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
335 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-primary btn-sm" title="tagsel_button" type="submit" value="Add" />
336 <a href="#" id="tagsel_cancel">Cancel</a>
339 [% IF loggedinusername && can_remove_biblios %]
340 <span id="removeitems"></span>
342 </span> <!-- / .links -->
343 </div> <!-- / #selections-toolbar -->
344 </div> <!-- /#floating -->
346 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed">
347 [% IF can_manage_shelf %]
348 <input type="hidden" name="op" value="remove_biblios" />
349 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
351 <div class="searchresults">
352 <table id="listcontents" class="table">
354 [% FOREACH itemsloo IN itemsloop %]
356 [% IF ( itemsloo.title ) %]
357 [% check_title = itemsloo.title %]
359 [% check_title = itemsloo.biblionumber %]
361 <td class="select selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" aria-label="[% check_title | html %]"/></td>
362 [% UNLESS ( item_level_itypes ) %]
364 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
365 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
367 [% itemsloo.description | html %]
371 <div class="coverimages">
372 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
373 [% IF ( itemsloo.title ) %]
374 [% img_title = itemsloo.title %]
376 [% img_title = itemsloo.biblionumber %]
379 [% IF ( OPACLocalCoverImages ) %]
380 <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
382 [% IF ( AdlibrisEnabled && itemsloo.normalized_isbn ) %]
383 <img src="[% AdlibrisURL | html %]?isbn=[% itemsloo.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" />
385 [% IF ( OPACAmazonCoverImages ) %]
386 [% IF ( itemsloo.normalized_isbn ) %]
387 <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>
389 <span class="no-image">No cover image available</span>
393 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
394 <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>
397 [% IF ( GoogleJackets ) %]
398 [% IF ( itemsloo.normalized_isbn ) %]
399 <div title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
401 <span class="no-image">No cover image available</span>
405 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
406 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
408 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
410 <span class="no-image">No cover image available</span>
415 [% IF OpenLibraryCovers %]
416 [% IF itemsloo.normalized_isbn %]
417 <span title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
419 <span class="no-image">No cover image available</span>
424 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
425 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
427 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
429 <span class="no-image">No cover image available</span>
433 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
434 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
436 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
437 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
440 <span class="no-image">No cover image available</span>
444 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
445 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
446 <a class="custom_cover_image" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
448 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
449 <a class="custom_cover_image" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
451 <a class="custom_cover_image" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
454 <img alt="Cover image" src="[% itemsloo.biblio_object.custom_cover_image_url | url %]" /></a>
458 [% IF ( itemsloo.XSLTBloc ) %]
459 [% itemsloo.XSLTBloc | $raw %]
462 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
463 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
465 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
466 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
468 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
472 [% INCLUDE 'biblio-title.inc' biblio=itemsloo %]
475 [% IF ( itemsloo.author ) %]
476 by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% itemsloo.author |url %]" title="Search for works by this author" class="author">[% itemsloo.author | html %]</a>
481 <span class="results_summary">
482 <span class="label">Publication:</span>
483 [% IF ( itemsloo.place ) %]
484 [% itemsloo.place | html %]
486 [% IF ( itemsloo.publishercode ) %]
487 [% itemsloo.publishercode | html %]
489 [% IF ( itemsloo.publicationyear ) %]
490 [% itemsloo.publicationyear | html %]
492 [% IF ( itemsloo.copyrightdate ) %]
493 [% itemsloo.copyrightdate | html %]
496 [% IF ( itemsloo.pages ) %]. [% itemsloo.pages | html %][% END %]
497 [% IF ( itemsloo.notes ) %], [% itemsloo.notes | html %][% END %]
498 [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') | html %][% END %]
500 <span class="results_summary">
501 <span class="label">Holdings:</span>
502 [% IF ( itemsloo.ITEM_RESULTS ) %]
503 [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
504 [% ITEM_RESULT.homebranch | html %]
505 [% IF ( ITEM_RESULT.location_opac ) %]
506 <span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>
508 [% IF ( ITEM_RESULT.itemcallnumber ) %]
509 ([% ITEM_RESULT.itemcallnumber | html %])
510 [% IF ( loop.last ) %].[% ELSE %],[% END %]
514 This record has no items.
517 [% END # / IF itemsloo.XSLTBloc %]
519 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
520 <div class="results_summary tags">
521 <span class="label">Tags:</span>
523 [% FOREACH TagLoo IN itemsloo.TagLoop %]
524 <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>
530 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
532 [% INCLUDE "openlibrary-readapi.inc" bib = itemsloo %]
533 <!-- COinS / Openurl -->
534 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
537 [% END # / FOREACH itemsloop %]
539 </table> <!-- / #listcontents -->
540 </div><!-- / .searchresults -->
542 [% IF ( pagination_bar ) %]
543 <div class="pages">[% pagination_bar | $raw %]</div>
546 [% IF can_remove_biblios %]
547 <input type="hidden" name="op" value="remove_biblios" />
548 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
549 <input type="hidden" name="modifyshelfcontents" value="1" />
550 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
552 </form> <!-- /myform -->
554 <div id="toolbar" class="toolbar clearfix">
555 <div class="list-actions">
556 <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>
557 [% IF can_manage_shelf %]
558 <span class="sep">|</span>
559 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
560 <input type="hidden" name="op" value="edit_form" />
561 <input type="hidden" name="referer" value="view" />
562 <input type="hidden" name="category" value="[% shelf.category | html %]" />
563 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
564 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
567 [% PROCESS delete_shelf context = "details" %]
570 </div> <!-- / .list-actions -->
571 </div> <!-- / #toolbar -->
573 <div class="alert alert-info">
575 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
576 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
580 [% IF can_manage_shelf %]
581 <form method="post" action="opac-shelves.pl">
582 <input type="hidden" name="op" value="delete" />
583 <input type="hidden" name="referer" value="list" />
584 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
585 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
588 [% END # / IF itemsloop %]
589 [% END # /IF shelf AND op == 'view' %]
591 [% IF op == 'add_form' OR op == 'edit_form' %]
592 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
593 <fieldset class="rows">
594 [% IF op == 'add_form' %]
596 <legend>Create a new list</legend>
597 <input type="hidden" name="op" value="add" />
599 <legend>Editing <em>[% shelf.shelfname | html %]</em></legend>
600 <input type="hidden" name="op" value="edit" />
601 <input type="hidden" name="referer" value="[% referer | html %]" />
602 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
604 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
607 <label class="required" for="shelfname">List name: </label>
608 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="required"/>
609 <span class="required">Required</span></li>
611 <label for="sortfield" >Sort this list by: </label>
612 <select name="sortfield" id="sortfield">
613 [% IF shelf.sortfield == "title" %]
614 <option value="title" selected="selected">Title</option>
616 <option value="title">Title</option>
618 [% IF shelf.sortfield == "author" %]
619 <option value="author" selected="selected">Author</option>
621 <option value="author">Author</option>
623 [% IF shelf.sortfield == "copyrightdate" %]
624 <option value="copyrightdate" selected="selected">Year</option>
626 <option value="copyrightdate">Year</option>
628 [% IF shelf.sortfield == "itemcallnumber" %]
629 <option value="itemcallnumber" selected="selected">Call number</option>
631 <option value="itemcallnumber">Call number</option>
633 [% IF shelf.sortfield == "dateadded" %]
634 <option value="dateadded" selected="selected">Date added</option>
636 <option value="dateadded">Date added</option>
640 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
642 <label for="category">Category:</label>
643 <select name="category" id="category" onchange="AdjustRemark()">
644 [% IF shelf.is_private %]
645 <option value="1" selected="selected">Private</option>
647 <option value="1">Private</option>
649 [% IF shelf.is_public %]
650 <option value="2" selected="selected">Public</option>
652 <option value="2">Public</option>
655 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
656 <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>
660 [% INCLUDE list_permissions %]
662 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
663 <input type="hidden" name="category" value="[% PRIVATE | html %]" />
665 </fieldset> <!-- /.rows -->
667 <fieldset class="action">
668 <input type="submit" value="Save" class="btn btn-primary" />
669 [% IF referer == 'view' %]
670 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
672 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a>
677 [% ELSIF op == 'list' %]
679 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
680 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
681 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
682 [% IF category == PRIVATE %]
683 <li id="privateshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=listamp;category=[% PRIVATE | html %]">Your lists</a></li>
685 <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>
688 [% IF category == PUBLIC %]
689 <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>
691 <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>
695 [% IF category == PRIVATE %]
696 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
698 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
701 [% IF category == PRIVATE || Koha.Preference('OpacAllowPublicListCreation') %]
702 [% IF loggedinusername %]
703 <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>
705 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
706 <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>
711 [% IF shelves.count %]
712 <table class="table">
722 [% FOREACH s IN shelves %]
723 [% SET contents = s.get_contents %]
725 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
726 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
728 [% IF s.is_private %]
729 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
735 [% IF s.can_be_managed( loggedinusernumber ) %]
736 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
737 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
738 <input type="hidden" name="category" value="[% s.category | html %]" />
739 <input type="hidden" name="op" value="edit_form" />
740 <input type="hidden" name="referer" value="list" />
741 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
744 [% IF s.can_be_deleted( loggedinusernumber ) %]
745 [% PROCESS delete_shelf shelf = s context = "list" %]
747 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
748 <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>
750 [% IF s.is_shared_with( loggedinusernumber ) %]
751 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
752 <input type="hidden" name="op" value="remove_share" />
753 <input type="hidden" name="referer" value="list" />
754 <input type='hidden' name='category' value='[% category | html %]' />
755 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
756 <button type="submit" class="btn btn-link remove remove_share"
757 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
764 </table> <!-- /.table -->
765 <div class="pages">[% pagination_bar | $raw %]</div>
767 [% IF category == PUBLIC %]
768 <p>No public lists.</p>
769 [% ELSIF loggedinusernumber %]
770 <p>No private lists.</p>
772 [% END # /IF shelves.count %]
773 </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
774 [% ELSIF NOT loggedinusernumber %]
775 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
776 <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>
778 [% END # IF op == 'add_form' OR op == 'edit_form' %]
779 </div> <!-- / #usershelves -->
780 </div> <!-- / .col-lg-10/12 -->
781 </div> <!-- / .row -->
782 </div> <!-- / .container-fluid -->
783 </div> <!-- / .main -->
785 <div class="modal" id="modalWin" role="dialog" aria-hidden="true" tabindex="-1">
786 <div class="modal-content">
787 <div class="modal-body">
788 <div style="margin:1em;padding:1em;font-size:150%;">
789 <img src="[% interface | html %]/[% theme | html %]/images/loading.gif" alt="" /> Loading
796 <div id="debug"></div>
799 [% INCLUDE 'opac-bottom.inc' %]
800 [% BLOCK jsinclude %]
801 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
802 [% Asset.js("lib/hc-sticky.js") | $raw %]
803 [% IF OpenLibraryCovers || OpenLibrarySearch %]
804 [% Asset.js("js/openlibrary.js") | $raw %]
807 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
808 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
809 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
810 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
812 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
813 function holdSelections() {
814 var checkedBoxes = $("input:checkbox:checked");
815 if ($(checkedBoxes).size() == 0) {
816 alert(MSG_NO_RECORD_SELECTED);
819 $(checkedBoxes).each(function(){
820 bibs += $(this).val() + "/";
822 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
826 [% IF ( TagsInputEnabled && loggedinusername ) %]
827 function tagSelected() {
828 var checkedBoxes = $("input:checkbox:checked");
829 if ($(checkedBoxes).size()) {
830 $("#tagsel_tag").hide();
831 $(".tag_hides").hide();
832 $("#tagsel_form").show();
834 alert(MSG_NO_RECORD_SELECTED);
838 function tagCanceled() {
839 $("#tagsel_form").hide();
840 $("#tagsel_tag").show();
841 $(".tag_hides").show();
842 $("#tagsel_new").val("");
843 $(".tagstatus").empty().hide();
846 function tagAdded() {
847 var checkedBoxes = $("input:checkbox:checked");
848 if (!$(checkedBoxes).size()) {
849 alert(MSG_NO_RECORD_SELECTED);
853 var tag = $("#tagsel_new").val();
854 if (!tag || (tag == "")) {
855 alert(MSG_NO_TAG_SPECIFIED);
860 for (var i = 0; i < $(checkedBoxes).size(); i++) {
861 var box = $(checkedBoxes).get(i);
862 bibs[i] = $(box).val();
865 KOHA.Tags.add_multitags_button(bibs, tag);
870 function enableCheckboxActions(){
871 // Enable/disable controls if checkboxes are checked
872 var checkedBoxes = $(".checkboxed input:checkbox:checked");
873 if ($(checkedBoxes).size()) {
874 $("#selections").html(_("With selected titles: "));
875 $("#selections-toolbar .links a").removeClass("disabled");
877 $("#selections").html(_("Select titles to: "));
878 $("#selections-toolbar .links a").addClass("disabled");
883 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
884 $("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
885 $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
888 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
889 $("#placehold").html("<a href=\"#\" class=\"btn btn-link hold tag_hides btn-disabled\"><i class=\"fa fa-fw fa-bookmark\" aria-hidden=\"true\"></i> "+_("Place hold")+"<\/a>");
890 $("#selections-toolbar a.hold").click(function(){
896 $("#CheckAll").click(function(){
897 $(".checkboxed").checkCheckboxes();
898 enableCheckboxActions();
901 $("#CheckNone").click(function(){
902 $(".checkboxed").unCheckCheckboxes();
903 enableCheckboxActions();
907 $(".cb").click(function(){
908 enableCheckboxActions();
910 enableCheckboxActions();
912 [% IF ( TagsInputEnabled && loggedinusername ) %]
913 var tagAdd = $(".tag_add");
914 tagAdd.removeClass("hidden");
915 $("#tagsel_tag").click(function(){
919 $("#tagsel_cancel").click(function(){
923 $("#tagsel_button").click(function(){
928 tagAdd.click(function(){
929 var thisid = $(this).attr("id");
930 thisid = thisid.replace("tag_add","");
932 $("#tagform"+thisid).show();
933 $("#newtag"+thisid).focus();
934 $("#newtag"+thisid+"_status").empty().hide();
937 $(".cancel_tag_add").click(function(){
938 var thisid = $(this).attr("id");
939 thisid = thisid.replace("cancel","");
940 $("#tagform"+thisid).hide();
941 $("#tag_add"+thisid).show();
942 $("#newtag"+thisid).val("");
943 $("#newtag"+thisid+"_status").empty().hide();
946 $(".tagbutton").click(function(){
947 var thisid = $(this).attr("title");
948 var tag = $("#newtag"+thisid).val();
949 if (!tag || (tag == "")) {
950 alert(MSG_NO_TAG_SPECIFIED);
953 KOHA.Tags.add_tag_button(thisid, tag);
958 [% IF loggedinusername && can_remove_biblios %]
959 $(".removefromlist").on("click", function(e){
960 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
963 $("#myform").submit(function(){
964 var checkedBoxes = $(".checkboxed input:checkbox:checked");
965 var numchecked = $(checkedBoxes).size();
967 if( numchecked > 1 ){
968 return confirmDelete(MSG_REMOVE_FROM_LIST);
970 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
973 alert(MSG_NO_RECORD_SELECTED);
977 $("#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>")
979 $("#myform").submit();
983 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
984 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
985 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
986 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
987 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
992 window.onafterprint = function () {
995 setTimeout('window.close()', 1000); // Hack for Chrome < 63
1000 Sticky = $("#floating");
1002 stickTo: "#usershelves",
1003 stickyClass: "floating"
1007 sortMenu( $("#sorting-form") );
1009 $("#sortfield").on("change", function(){
1010 $('#sorting-form').submit();
1014 $(".deleteshelf").on("click", function(e){
1016 var shelf_name = $(this).data("shelfname");
1017 var shelf_number = $(this).data("shelfnumber");
1018 var is_shared = $(this).data("shared");
1019 var count = $(this).data("count");
1020 var message = "<p><em>" + shelf_name + "</em></p>";
1022 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
1025 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
1027 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
1029 $("#deleteshelf" + shelf_number ).submit();
1035 $(".remove_share").on("click", function(e){
1037 var shelf_name = $(this).data("shelfname");
1038 var shelf_number = $(this).data("shelfnumber");
1039 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 ){
1041 $("#unshare" + shelf_number ).submit();
1047 }); // document.ready
1049 function sortMenu( sorting_form ){
1050 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1051 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1052 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\">";
1053 $("#sortfield").children().each(function(){
1054 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1055 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1056 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1057 menu += "<span class=\"dropdown-header\">" + $(this).attr("label") + "</span>";
1058 $(this).children().each(function(){
1059 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1060 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1066 $(".list-actions").append( menu );
1067 sorting_form.remove();
1070 function AdjustRemark() {
1072 if( $("#category").length > 0 ) {
1073 category = $("#category").val();
1075 category = [% category | html %];
1077 var perms = $("#allow_changes_from").val();
1080 $("#anyone_remark").hide();
1081 } else if( category==1 ) {
1082 // If we move to Private (without shares), show Anyone remark
1083 // Note: the number of shares is not tested real-time
1084 [% IF !shelf.is_shared %]
1085 $("#anyone_remark").show();
1087 $("#anyone_remark").hide();
1089 } else { // category==2
1090 $("#anyone_remark").hide();