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 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" onchange="AdjustRemark()">
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 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 %]
55   <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span>
59 [% INCLUDE 'masthead.inc' %]
61 <nav aria-label="breadcrumb">
62 <ul class="breadcrumb">
63 <li class="breadcrumb-item">
64 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
66 [% IF ( loggedinusername ) %]
67 <li class="breadcrumb-item">
68 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
73 <li class="breadcrumb-item">
74 <a href="/cgi-bin/koha/opac-shelves.pl">Lists</a>
77 <li class="breadcrumb-item" aria-current="page">
82 [% IF shelf and shelf.is_private %]
83 [% IF op == 'view' OR op == 'edit_form' %]
84 <li class="breadcrumb-item">
85 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]">Your lists</a>
88 <li class="breadcrumb-item" aria-current="page">
92 [% ELSIF shelf AND shelf.is_public %]
94 <li class="breadcrumb-item">
95 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | uri %]">Public lists</a>
98 <li class="breadcrumb-item" aria-current="page">
104 [% IF op == 'view' %]
105 <li class="breadcrumb-item" aria-current="page">
106 Contents of <em>[% shelf.shelfname | html %]</em>
110 [% IF op == 'add_form' %]
111 <li class="breadcrumb-item" aria-current="page">
116 [% IF op == 'edit_form' %]
117 <li class="breadcrumb-item" aria-current="page">
118 Edit list <em>[% shelf.shelfname | html %]</em>
121 </ul> <!-- / .breadcrumb -->
124 <div class="container-fluid">
126 [% IF ( OpacNav||loggedinusername ) %]
127 <div class="col col-lg-2 order-2 order-lg-1">
128 <div id="navigation">
129 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
132 <div class="col-md-12 col-lg-10 order-1">
134 <div class="col order-first order-md-first order-lg-2">
137 <div id="usershelves" class="maincontent">
139 [% FOR m IN messages %]
142 <div class="alert alert-success" role="alert">
144 <div class="alert alert-danger" role="alert">
147 [% CASE 'error_on_update' %]
148 <span>An error occurred when updating this list.</span>
149 [% CASE 'error_on_insert' %]
150 <span>An error occurred when creating this list.</span>
151 [% CASE 'error_on_delete' %]
152 <span>An error occurred when deleting this list.</span>
153 [% CASE 'error_on_add_biblio' %]
154 <span>The item has not been added to the list. Please check it's not already in the list.</span>
155 [% CASE 'error_on_remove_share' %]
156 <span>The share has not been removed.</span>
157 [% CASE 'success_on_update' %]
158 <span>List updated.</span>
159 [% CASE 'success_on_insert' %]
160 <span>List created.</span>
161 [% CASE 'success_on_delete' %]
162 <span>List deleted.</span>
163 [% CASE 'success_on_add_biblio' %]
164 <span>The item has been added to the list.</span>
165 [% CASE 'success_on_remove_biblios' %]
166 <span>The item has been removed from the list.</span>
167 [% CASE 'success_on_remove_share' %]
168 <span>The share has been removed.</span>
169 [% CASE 'does_not_exist' %]
170 <span>This list does not exist.</span>
171 [% CASE 'item_does_not_exist' %]
172 <span>This item does not exist.</span>
173 [% CASE 'unauthorized_on_view' %]
174 <span>You do not have permission to view this list.</span>
175 [% CASE 'unauthorized_on_insert' %]
176 <span>You do not have permission to create a new list.</span>
177 [% CASE 'unauthorized_on_update' %]
178 <span>You do not have permission to update this list.</span>
179 [% CASE 'unauthorized_on_delete' %]
180 <span>You do not have permission to delete this list.</span>
181 [% CASE 'unauthorized_on_add_biblio' %]
182 <span>You do not have permission to add a record to this list.</span>
183 [% CASE 'no_biblio_removed' %]
184 <span>No record was removed.</span>
185 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
186 <span>An error occurred when creating the list. The name [% shelfname | html %] already exists.</span>
187 [% CASE 'DBIx::Class::Exception' %]
196 [% IF shelf AND op == 'view' %]
198 [% shelf.shelfname | html %]
199 <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">
200 <i class="fa fa-fw fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this list"></i>
204 [% IF ( itemsloop ) %]
205 [% SET contents = shelf.get_contents %]
206 [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
208 <div id="toolbar" class="toolbar clearfix">
209 <div class="list-actions">
210 <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>
212 <div id="download-list" class="btn-group dropdown">
213 <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>
214 <div class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
215 <a role="menuitem" class="dropdown-item download-list" data-format="bibtex" href="#">BibTeX</a>
216 <a role="menuitem" class="dropdown-item download-list" data-format="isbd" href="#">ISBD</a>
217 <a role="menuitem" class="dropdown-item download-list" data-format="iso2709" href="#">MARC</a>
218 <a role="menuitem" class="dropdown-item download-list" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
219 [% FOREACH csv_profile IN csv_profiles %]
220 <a role="menuitem" class="dropdown-item download-list" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
225 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
226 <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>
229 <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>
231 [% IF can_manage_shelf %]
232 <span class="sep">|</span>
233 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
234 <input type="hidden" name="op" value="edit_form" />
235 <input type="hidden" name="referer" value="view" />
236 <input type='hidden' name='category' value='[% shelf.category | html %]' />
237 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
238 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
241 [% PROCESS delete_shelf context = "details" %]
243 [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
244 <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>
246 [% ELSIF category == PRIVATE # not manageshelf and private means shared %]
247 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="d-inline">
248 <input type="hidden" name="op" value="remove_share" />
249 <input type="hidden" name="referer" value="list" />
250 <input type='hidden' name='category' value='[% category | html %]' />
251 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
252 <button type="submit" class="btn btn-link remove remove_share" data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]">
253 <i class="fa fa-remove" aria-hidden="true"></i> Remove share
256 [% END # /IF can_manage_shelf %]
257 </div> <!-- /.list-actions -->
259 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="d-inline sort_by pull-right">
260 <input type="hidden" name="op" value="view" />
261 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
263 <label for="sortfield">Sort by: </label>
264 <select name="sortfield" id="sortfield" class="resort">
265 <option value="">Default sorting</option>
266 <optgroup label="Author">
267 [% IF sortfield == 'author' && direction == 'asc' %]
268 <option value="author" data-direction="asc" selected="selected">Author (A-Z)</option>
270 <option value="author" data-direction="asc">Author (A-Z)</option>
272 [% IF sortfield == 'author' && direction == 'desc' %]
273 <option value="author" data-direction="desc" selected="selected">Author (Z-A)</option>
275 <option value="author" data-direction="desc">Author (Z-A)</option>
278 <optgroup label="Title">
279 [% IF sortfield == 'title' && direction == 'asc' %]
280 <option value="title" data-direction="asc" selected="selected">Title (A-Z)</option>
282 <option value="title" data-direction="asc">Title (A-Z)</option>
284 [% IF sortfield == 'title' && direction == 'desc' %]
285 <option value="title" data-direction="desc" selected="selected">Title (Z-A)</option>
287 <option value="title" data-direction="desc">Title (Z-A)</option>
290 <optgroup label="Call number">
291 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
292 <option value="itemcallnumber" data-direction="asc" selected="selected">Call number (A-Z)</option>
294 <option value="itemcallnumber" data-direction="asc">Call number (A-Z)</option>
296 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
297 <option value="itemcallnumber" data-direction="desc" selected="selected">Call number (Z-A)</option>
299 <option value="itemcallnumber" data-direction="desc">Call number (Z-A)</option>
302 <optgroup label="Copyright date">
303 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
304 <option value="copyrightdate" data-direction="desc" selected="selected">Copyright date (newest to oldest)</option>
306 <option value="copyrightdate" data-direction="desc">Copyright date (newest to oldest)</option>
308 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
309 <option value="copyrightdate" data-direction="asc" selected="selected">Copyright date (oldest to newest)</option>
311 <option value="copyrightdate" data-direction="asc">Copyright date (oldest to newest)</option>
314 <optgroup label="Date added">
315 [% IF sortfield == "dateadded" && direction == 'asc' %]
316 <option value="dateadded" data-direction="desc" selected="selected">Date added (newest to oldest)</option>
318 <option value="dateadded" data-direction="desc">Date added (newest to oldest)</option>
320 [% IF sortfield == "dateadded" && direction == 'desc' %]
321 <option value="dateadded" data-direction="asc" selected="selected">Date added (oldest to newest)</option>
323 <option value="dateadded" data-direction="asc">Date added (oldest to newest)</option>
328 <input type="submit" class="btn btn-primary btn-sm" id="sort-submit" value="Resort list" />
329 </form> <!-- /#sorting-form -->
331 </div> <!-- / #toolbar -->
333 <div class="selections-toolbar toolbar noprint">
334 <div class="check_control">
335 <span class="checkall">
336 <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
338 <span class="clearall">
339 <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
343 <span class="selections">Select titles to: </span>
344 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
345 <span id="placehold">
346 <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
350 [% IF ( TagsInputEnabled && loggedinusername ) %]
352 <a id="tagsel_tag" href="#" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
354 <span id="tagsel_form" class="form-inline" style="display:none">
355 <label for="tagsel_new">New tag(s), separated by a comma:</label>
356 <input class="form-control form-control-sm" type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
357 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-primary btn-sm" title="tagsel_button" type="submit" value="Add" />
358 <a href="#" id="tagsel_cancel">Cancel</a>
361 [% IF loggedinusername && can_remove_biblios %]
362 <span id="removeitems"></span>
364 </div> <!-- / .links -->
365 </div> <!-- / .selections-toolbar -->
366 </div> <!-- /#floating -->
368 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
369 [% IF can_manage_shelf %]
370 <input type="hidden" name="op" value="remove_biblios" />
371 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
373 <div class="searchresults">
374 <table id="listcontents" class="table">
376 [% FOREACH itemsloo IN itemsloop %]
378 [% IF ( itemsloo.title ) %]
379 [% check_title = itemsloo.title %]
381 [% check_title = itemsloo.biblionumber %]
383 <td class="selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" aria-label="[% check_title | html %]"/></td>
384 [% UNLESS ( item_level_itypes ) %]
386 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
387 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
389 [% itemsloo.description | html %]
393 <div class="coverimages">
394 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
395 [% IF ( itemsloo.title ) %]
396 [% img_title = itemsloo.title %]
398 [% img_title = itemsloo.biblionumber %]
401 [% IF ( OPACLocalCoverImages ) %]
402 <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
404 [% IF ( AdlibrisEnabled && itemsloo.normalized_isbn ) %]
405 <img src="[% AdlibrisURL | html %]?isbn=[% itemsloo.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" />
407 [% IF ( OPACAmazonCoverImages ) %]
408 [% IF ( itemsloo.normalized_isbn ) %]
409 <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>
411 <span class="no-image">No cover image available</span>
415 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
416 <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>
419 [% IF ( GoogleJackets ) %]
420 [% IF ( itemsloo.normalized_isbn ) %]
421 <div title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
423 <span class="no-image">No cover image available</span>
427 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
428 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
430 <span title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
432 <span class="no-image">No cover image available</span>
437 [% IF OpenLibraryCovers %]
438 [% IF itemsloo.normalized_isbn %]
439 <span title="[% img_title | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
441 <span class="no-image">No cover image available</span>
446 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
447 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
449 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
451 <span class="no-image">No cover image available</span>
455 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
456 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
458 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
459 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
462 <span class="no-image">No cover image available</span>
466 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
467 [% SET custom_cover_image_url = itemsloo.biblio_object.custom_cover_image_url %]
468 [% IF custom_cover_image_url %]
469 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
470 <a class="custom_cover_image" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
472 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
473 <a class="custom_cover_image" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
475 <a class="custom_cover_image" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
478 <img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
484 [% itemsloo.XSLTBloc | $raw %]
486 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
487 <div class="results_summary tags">
488 <span class="label">Tags:</span>
490 [% FOREACH TagLoo IN itemsloo.TagLoop %]
491 <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>
497 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
499 [% INCLUDE "openlibrary-readapi.inc" bib = itemsloo %]
500 <!-- COinS / Openurl -->
501 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
504 [% END # / FOREACH itemsloop %]
506 </table> <!-- / #listcontents -->
507 </div><!-- / .searchresults -->
509 [% IF ( pagination_bar ) %]
510 <div class="pages">[% pagination_bar | $raw %]</div>
513 [% IF can_remove_biblios %]
514 <input type="hidden" name="op" value="remove_biblios" />
515 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
516 <input type="hidden" name="modifyshelfcontents" value="1" />
517 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
519 </form> <!-- /myform -->
521 <div id="toolbar" class="toolbar clearfix">
522 <div class="list-actions">
523 <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>
524 [% IF can_manage_shelf %]
525 <span class="sep">|</span>
526 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
527 <input type="hidden" name="op" value="edit_form" />
528 <input type="hidden" name="referer" value="view" />
529 <input type="hidden" name="category" value="[% shelf.category | html %]" />
530 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
531 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
534 [% PROCESS delete_shelf context = "details" %]
537 </div> <!-- / .list-actions -->
538 </div> <!-- / #toolbar -->
540 <div class="alert alert-info">
542 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
543 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
547 [% IF can_manage_shelf %]
548 <form method="post" action="opac-shelves.pl">
549 <input type="hidden" name="op" value="delete" />
550 <input type="hidden" name="referer" value="list" />
551 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
552 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
555 [% END # / IF itemsloop %]
556 [% END # /IF shelf AND op == 'view' %]
558 [% IF op == 'add_form' OR op == 'edit_form' %]
559 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
560 <fieldset class="rows">
561 [% IF op == 'add_form' %]
563 <legend><h1>Create a new list</h1></legend>
564 <input type="hidden" name="op" value="add" />
566 <legend><h1>Editing <em>[% shelf.shelfname | html %]</em></h1></legend>
567 <input type="hidden" name="op" value="edit" />
568 <input type="hidden" name="referer" value="[% referer | html %]" />
569 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
571 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
574 <label class="required" for="shelfname">List name: </label>
575 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="focus required"/>
576 <span class="required">Required</span></li>
578 <label for="sortfield" >Sort this list by: </label>
579 <select name="sortfield" id="sortfield">
580 [% IF shelf.sortfield == "title" %]
581 <option value="title" selected="selected">Title</option>
583 <option value="title">Title</option>
585 [% IF shelf.sortfield == "author" %]
586 <option value="author" selected="selected">Author</option>
588 <option value="author">Author</option>
590 [% IF shelf.sortfield == "copyrightdate" %]
591 <option value="copyrightdate" selected="selected">Year</option>
593 <option value="copyrightdate">Year</option>
595 [% IF shelf.sortfield == "itemcallnumber" %]
596 <option value="itemcallnumber" selected="selected">Call number</option>
598 <option value="itemcallnumber">Call number</option>
600 [% IF shelf.sortfield == "dateadded" %]
601 <option value="dateadded" selected="selected">Date added</option>
603 <option value="dateadded">Date added</option>
607 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
609 <label for="category">Category:</label>
610 <select name="category" id="category" onchange="AdjustRemark()">
611 [% IF shelf.is_private %]
612 <option value="1" selected="selected">Private</option>
614 <option value="1">Private</option>
616 [% IF shelf.is_public %]
617 <option value="2" selected="selected">Public</option>
619 <option value="2">Public</option>
622 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
623 <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>
627 [% INCLUDE list_permissions %]
629 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
630 <input type="hidden" name="category" value="[% PRIVATE | html %]" />
632 </fieldset> <!-- /.rows -->
634 <fieldset class="action">
635 <input type="submit" value="Save" class="btn btn-primary" />
636 [% IF referer == 'view' %]
637 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
639 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a>
644 [% ELSIF op == 'list' %]
646 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
647 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
648 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
649 [% IF category == PRIVATE %]
650 <li id="privateshelves_tab" class="ui-state-default ui-corner-top ui-tabs-active ui-state-active"><a class="ui-tabs-anchor" href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | html %]">Your lists</a></li>
652 <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>
655 [% IF category == PUBLIC %]
656 <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>
658 <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>
662 [% IF category == PRIVATE %]
663 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
665 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
668 [% IF category == PRIVATE || Koha.Preference('OpacAllowPublicListCreation') %]
669 [% IF loggedinusername %]
670 <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>
672 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
673 <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>
678 [% IF shelves.count %]
679 <table class="table">
680 [% IF category == PRIVATE %]
681 <caption class="sr-only">Your lists</caption>
682 [% ELSIF category == PUBLIC %]
683 <caption class="sr-only">Public lists</caption>
694 [% FOREACH s IN shelves %]
695 [% SET contents = s.get_contents %]
697 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
698 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
700 [% IF s.is_private %]
701 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
707 [% IF s.can_be_managed( loggedinusernumber ) %]
708 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
709 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
710 <input type="hidden" name="category" value="[% s.category | html %]" />
711 <input type="hidden" name="op" value="edit_form" />
712 <input type="hidden" name="referer" value="list" />
713 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
716 [% IF s.can_be_deleted( loggedinusernumber ) %]
717 [% PROCESS delete_shelf shelf = s context = "list" %]
719 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
720 <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>
722 [% IF s.is_shared_with( loggedinusernumber ) %]
723 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="d-inline">
724 <input type="hidden" name="op" value="remove_share" />
725 <input type="hidden" name="referer" value="list" />
726 <input type='hidden' name='category' value='[% category | html %]' />
727 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
728 <button type="submit" class="btn btn-link remove remove_share"
729 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
736 </table> <!-- /.table -->
737 <div class="pages">[% pagination_bar | $raw %]</div>
739 [% IF category == PUBLIC %]
740 <p>No public lists.</p>
741 [% ELSIF loggedinusernumber %]
742 <p>No private lists.</p>
744 [% END # /IF shelves.count %]
746 [% ELSIF NOT loggedinusernumber %]
747 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
748 <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>
750 [% END # IF op == 'add_form' OR op == 'edit_form' %]
751 </div> <!-- / #usershelves -->
752 </div> <!-- / .col-lg-10/12 -->
753 </div> <!-- / .row -->
754 </div> <!-- / .container-fluid -->
755 </div> <!-- / .main -->
757 <form method="post" id="download_list" action="/cgi-bin/koha/opac-downloadshelf.pl">
758 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
759 <input type="hidden" name="format" id="download_format" value="" />
762 [% INCLUDE 'opac-bottom.inc' %]
763 [% BLOCK jsinclude %]
764 [% Asset.js("lib/hc-sticky.js") | $raw %]
765 [% IF OpenLibraryCovers || OpenLibrarySearch %]
766 [% Asset.js("js/openlibrary.js") | $raw %]
769 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
770 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
771 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
772 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
774 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
775 function holdSelections() {
776 var checkedBoxes = $("input:checkbox:checked");
777 if ($(checkedBoxes).size() == 0) {
778 alert( __("No item was selected") );
781 $(checkedBoxes).each(function(){
782 bibs += $(this).val() + "/";
784 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
788 [% IF ( TagsInputEnabled && loggedinusername ) %]
789 function tagSelected() {
790 var checkedBoxes = $("input:checkbox:checked");
791 if ($(checkedBoxes).size()) {
792 $("#tagsel_tag").hide();
793 $(".tag_hides").hide();
794 $("#tagsel_form").show();
796 alert( __("No item was selected") );
800 function tagCanceled() {
801 $("#tagsel_form").hide();
802 $("#tagsel_tag").show();
803 $(".tag_hides").show();
804 $("#tagsel_new").val("");
805 $(".tagstatus").empty().hide();
808 function tagAdded() {
809 var checkedBoxes = $("input:checkbox:checked");
810 if (!$(checkedBoxes).size()) {
811 alert( __("No item was selected") );
815 var tag = $("#tagsel_new").val();
816 if (!tag || (tag == "")) {
817 alert(MSG_NO_TAG_SPECIFIED);
822 for (var i = 0; i < $(checkedBoxes).size(); i++) {
823 var box = $(checkedBoxes).get(i);
824 bibs[i] = $(box).val();
827 KOHA.Tags.add_multitags_button(bibs, tag);
832 function enableCheckboxActions(){
833 // Enable/disable controls if checkboxes are checked
834 var checkedBoxes = $(".cb:checked");
835 if ($(checkedBoxes).size()) {
836 $(".selections").html(_("With selected titles: "));
837 $(".selections-toolbar .links a").removeClass("disabled");
839 $(".selections").html(_("Select titles to: "));
840 $(".selections-toolbar .links a").addClass("disabled");
845 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
847 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
848 $(".selections-toolbar a.hold").click(function(e){
856 $("#CheckAll").on("click",function(e){
858 $(".cb").prop("checked", true);
859 enableCheckboxActions();
861 $("#CheckNone").on("click",function(e){
863 $(".cb").prop("checked", false);
864 enableCheckboxActions();
867 $(".cb").click(function(){
868 enableCheckboxActions();
870 enableCheckboxActions();
872 [% IF ( TagsInputEnabled && loggedinusername ) %]
873 var tagAdd = $(".tag_add");
874 tagAdd.removeClass("hidden");
875 $("#tagsel_tag").click(function(){
879 $("#tagsel_cancel").click(function(){
883 $("#tagsel_button").click(function(){
888 tagAdd.click(function(){
889 var thisid = $(this).attr("id");
890 thisid = thisid.replace("tag_add","");
892 $("#tagform"+thisid).show();
893 $("#newtag"+thisid).focus();
894 $("#newtag"+thisid+"_status").empty().hide();
897 $(".cancel_tag_add").click(function(){
898 var thisid = $(this).attr("id");
899 thisid = thisid.replace("cancel","");
900 $("#tagform"+thisid).hide();
901 $("#tag_add"+thisid).show();
902 $("#newtag"+thisid).val("");
903 $("#newtag"+thisid+"_status").empty().hide();
906 $(".tagbutton").click(function(){
907 var thisid = $(this).attr("title");
908 var tag = $("#newtag"+thisid).val();
909 if (!tag || (tag == "")) {
910 alert(MSG_NO_TAG_SPECIFIED);
913 KOHA.Tags.add_tag_button(thisid, tag);
918 [% IF loggedinusername && can_remove_biblios %]
919 $(".removefromlist").on("click", function(e){
920 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
923 $("#myform").submit(function(){
924 var checkedBoxes = $(".cb:checked");
925 var numchecked = $(checkedBoxes).size();
927 if( numchecked > 1 ){
928 return confirmDelete(MSG_REMOVE_FROM_LIST);
930 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
933 alert( __("No item was selected") );
937 $("#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>")
939 $("#myform").submit();
943 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
944 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
945 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
946 [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
947 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
952 window.onafterprint = function () {
955 setTimeout('window.close()', 1000); // Hack for Chrome < 63
960 Sticky = $("#floating");
962 stickTo: "#usershelves",
963 stickyClass: "floating"
967 sortMenu( $("#sorting-form") );
969 $("#sortfield").on("change", function(){
970 $('#sorting-form').submit();
974 $(".deleteshelf").on("click", function(e){
976 var shelf_name = $(this).data("shelfname");
977 var shelf_number = $(this).data("shelfnumber");
978 var is_shared = $(this).data("shared");
979 var count = $(this).data("count");
980 var message = "<p><em>" + shelf_name + "</em></p>";
982 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
985 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
987 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
989 $("#deleteshelf" + shelf_number ).submit();
995 $(".remove_share").on("click", function(e){
997 var shelf_name = $(this).data("shelfname");
998 var shelf_number = $(this).data("shelfnumber");
999 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 ){
1001 $("#unshare" + shelf_number ).submit();
1007 $(".download-list").on("click", function(e){
1009 var format = $(this).data("format");
1010 $("#download_format").val( format );
1011 $("#download_list").submit();
1014 }); // document.ready
1016 function sortMenu( sorting_form ){
1017 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1018 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1019 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\">";
1020 $("#sortfield").children().each(function(){
1021 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1022 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a>";
1023 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1024 menu += "<span class=\"dropdown-header\">" + $(this).attr("label") + "</span>";
1025 $(this).children().each(function(){
1026 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1027 menu += "<a class=\"dropdown-item\" href=\"" + sort_link + $(this).val() + "&direction=" + $(this).data('direction') + "\">" + $(this).text() + "</a>";
1033 $(".list-actions").append( menu );
1034 sorting_form.remove();
1037 function AdjustRemark() {
1039 if( $("#category").length > 0 ) {
1040 category = $("#category").val();
1042 category = "[% category | html %]";
1044 var perms = $("#allow_changes_from").val();
1047 $("#anyone_remark").hide();
1048 } else if( category==1 ) {
1049 // If we move to Private (without shares), show Anyone remark
1050 // Note: the number of shares is not tested real-time
1051 [% IF !shelf.is_shared %]
1052 $("#anyone_remark").show();
1054 $("#anyone_remark").hide();
1056 } else { // category==2
1057 $("#anyone_remark").hide();