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="form-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 %]"><i class="fa fa-remove" aria-hidden="true"></i>
18 [% IF ( context == "list" ) %]
27 [% INCLUDE 'doc-head-open.inc' %]
28 <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' %]
29 [% BLOCK cssinclude %][% END %]
31 [% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %][% END %]
33 [% BLOCK list_permissions %]
35 <label for="allow_changes_from">Allow changes to contents from: </label>
36 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
38 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
40 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
41 <option value="1" selected="selected">Owner only</option>
43 <option value="1">Owner only</option>
46 [% 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 %]
49   <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
53 [% INCLUDE 'masthead.inc' %]
55 <ul class="breadcrumb noprint">
56 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
57 [% IF ( loggedinusername ) %]
58 <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">›</span></li>
62 <li><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a></li>
67 [% IF shelf and shelf.is_private %]
68 [% IF op == 'view' OR op == 'edit_form' %]
69 <li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]">Your lists</a></li>
71 <li><span class="divider">›</span> Your lists</li>
73 [% ELSIF shelf AND shelf.is_public %]
75 <li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | uri %]">Public lists</a></li>
77 <li><span class="divider">›</span> Public lists</li>
82 <li><span class="divider">›</span> Contents of <i>[% shelf.shelfname | html %]</i></li>
85 [% IF op == 'add_form' %]
86 <li><span class="divider">›</span> Create new list</li>
89 [% IF op == 'edit_form' %]
90 <li><span class="divider">›</span> Edit list <i>[% shelf.shelfname | html %]</i></li>
93 </ul> <!-- / .breadcrumb -->
95 <div class="container-fluid">
96 <div class="row-fluid">
97 [% IF ( OpacNav||loggedinusername ) && !print %]
100 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
105 [% IF ( OpacNav||loggedinusername ) %]
110 <div id="usershelves" class="maincontent">
112 [% FOR m IN messages %]
115 <div class="alert alert-success" role="alert">
117 <div class="alert alert-danger" role="alert">
120 [% CASE 'error_on_update' %]
121 <span>An error occurred when updating this list.</span>
122 [% CASE 'error_on_insert' %]
123 <span>An error occurred when creating this list.</span>
124 [% CASE 'error_on_delete' %]
125 <span>An error occurred when deleting this list.</span>
126 [% CASE 'error_on_add_biblio' %]
127 <span>The item has not been added to the list. Please check it's not already in the list.</span>
128 [% CASE 'error_on_remove_share' %]
129 <span>The share has not been removed.</span>
130 [% CASE 'success_on_update' %]
131 <span>List updated.</span>
132 [% CASE 'success_on_insert' %]
133 <span>List created.</span>
134 [% CASE 'success_on_delete' %]
135 <span>List deleted.</span>
136 [% CASE 'success_on_add_biblio' %]
137 <span>The item has been added to the list.</span>
138 [% CASE 'success_on_remove_biblios' %]
139 <span>The item has been removed from the list.</span>
140 [% CASE 'success_on_remove_share' %]
141 <span>The share has been removed.</span>
142 [% CASE 'does_not_exist' %]
143 <span>This list does not exist.</span>
144 [% CASE 'item_does_not_exist' %]
145 <span>This item does not exist.</span>
146 [% CASE 'unauthorized_on_view' %]
147 <span>You do not have permission to view this list.</span>
148 [% CASE 'unauthorized_on_insert' %]
149 <span>You do not have permission to create a new list.</span>
150 [% CASE 'unauthorized_on_update' %]
151 <span>You do not have permission to update this list.</span>
152 [% CASE 'unauthorized_on_delete' %]
153 <span>You do not have permission to delete this list.</span>
154 [% CASE 'unauthorized_on_add_biblio' %]
155 <span>You do not have permission to add a record to this list.</span>
156 [% CASE 'no_biblio_removed' %]
157 <span>No record was removed.</span>
158 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
159 <span>An error occurred when creating the list. The name [% shelfname | html %] already exists.</span>
160 [% CASE 'DBIx::Class::Exception' %]
169 [% IF shelf AND op == 'view' %]
171 [% shelf.shelfname | html %]
172 <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">
173 <i class="fa fa-fw fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this list"></i>
177 [% IF ( itemsloop ) %]
178 [% SET contents = shelf.get_contents %]
179 [% IF ( contents.count ) %]<p>This list contains [% contents.count | html %] titles</p>[% END %]
181 <div id="toolbar" class="toolbar clearfix">
182 <div class="list-actions">
183 <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>
184 <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>
186 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
187 <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>
190 <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>
192 [% IF can_manage_shelf %]
193 <span class="sep">|</span>
194 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
195 <input type="hidden" name="op" value="edit_form" />
196 <input type="hidden" name="referer" value="view" />
197 <input type='hidden' name='category' value='[% shelf.category | html %]' />
198 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
199 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
202 [% PROCESS delete_shelf context = "details" %]
204 [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
205 <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>
207 [% ELSIF category == PRIVATE # not manageshelf and private means shared %]
208 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="unshare[% shelf.shelfnumber | html %]" class="form-inline">
209 <input type="hidden" name="op" value="remove_share" />
210 <input type="hidden" name="referer" value="list" />
211 <input type='hidden' name='category' value='[% category | html %]' />
212 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
213 <button type="submit" class="btn btn-link remove remove_share"
214 data-shelfname="[% shelf.shelfname | html %]" data-shelfnumber="[% shelf.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
219 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="form-inline sort_by pull-right">
220 <input type="hidden" name="op" value="view" />
221 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
223 <label for="sortfield">Sort by: </label>
224 <select name="sortfield" id="sortfield" class="resort">
225 <option value="">Default sorting</option>
226 <optgroup label="Author">
227 [% IF sortfield == 'author' && direction == 'asc' %]
228 <option value="author:asc" selected="selected">Author (A-Z)</option>
230 <option value="author:asc">Author (A-Z)</option>
232 [% IF sortfield == 'author' && direction == 'desc' %]
233 <option value="author:desc" selected="selected">Author (Z-A)</option>
235 <option value="author:desc">Author (Z-A)</option>
238 <optgroup label="Title">
239 [% IF sortfield == 'title' && direction == 'asc' %]
240 <option value="title:asc" selected="selected">Title (A-Z)</option>
242 <option value="title:asc">Title (A-Z)</option>
244 [% IF sortfield == 'title' && direction == 'desc' %]
245 <option value="title:desc" selected="selected">Title (Z-A)</option>
247 <option value="title:desc">Title (Z-A)</option>
250 <optgroup label="Call number">
251 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
252 <option value="itemcallnumber:asc" selected="selected">Call number (A-Z)</option>
254 <option value="itemcallnumber:asc">Call number (A-Z)</option>
256 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
257 <option value="itemcallnumber:desc" selected="selected">Call number (Z-A)</option>
259 <option value="itemcallnumber:desc">Call number (Z-A)</option>
262 <optgroup label="Copyright date">
263 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
264 <option value="copyrightdate:desc" selected="selected">Copyright date (newest to oldest)</option>
266 <option value="copyrightdate:desc">Copyright date (newest to oldest)</option>
268 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
269 <option value="copyrightdate:asc" selected="selected">Copyright date (oldest to newest)</option>
271 <option value="copyrightdate:asc">Copyright date (oldest to newest)</option>
274 <optgroup label="Date added">
275 [% IF sortfield == "dateadded" && direction == 'asc' %]
276 <option value="dateadded:desc" selected="selected">Date added (newest to oldest)</option>
278 <option value="dateadded:desc">Date added (newest to oldest)</option>
280 [% IF sortfield == "dateadded" && direction == 'desc' %]
281 <option value="dateadded:asc" selected="selected">Date added (oldest to newest)</option>
283 <option value="dateadded:asc">Date added (oldest to newest)</option>
288 <input type="submit" class="btn btn-small" id="sort-submit" value="Resort list" />
291 </div> <!-- / #toolbar -->
293 <div id="selections-toolbar" class="toolbar noprint">
294 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
296 <span id="selections">Select titles to: </span>
297 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
298 <span id="placehold"></span>
300 [% IF ( TagsInputEnabled && loggedinusername ) %]
302 <a id="tagsel_tag" href="#" class="btn btn-link btn-disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
304 <span id="tagsel_form" style="display:none">
305 <label for="tagsel_new">New tag(s), separated by a comma:</label>
306 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
307 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-small" title="tagsel_button" type="submit" value="Add" />
308 <a href="#" id="tagsel_cancel">Cancel</a>
311 [% IF loggedinusername && can_remove_biblios %]
312 <span id="removeitems"></span>
314 </span> <!-- / .links -->
315 </div> <!-- / #selections-toolbar -->
316 </div> <!-- /#floating -->
318 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed">
319 [% IF can_manage_shelf %]
320 <input type="hidden" name="op" value="remove_biblios" />
321 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
323 <div class="searchresults">
324 <table id="listcontents" class="table">
326 [% FOREACH itemsloo IN itemsloop %]
328 <td class="select selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" /></td>
329 [% UNLESS ( item_level_itypes ) %]
331 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
332 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
334 [% itemsloo.description | html %]
338 <div class="coverimages">
339 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
340 [% IF ( OPACLocalCoverImages ) %]
341 <span title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
343 [% IF ( AdlibrisEnabled && itemsloo.normalized_isbn ) %]
344 <img src="[% AdlibrisURL | html %]?isbn=[% itemsloo.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" />
346 [% IF ( OPACAmazonCoverImages ) %]
347 [% IF ( itemsloo.normalized_isbn ) %]
348 <span title="[% itemsloo.biblionumber | 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>
350 <span class="no-image">No cover image available</span>
354 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
355 <span title="[% itemsloo.biblionumber | 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>
358 [% IF ( GoogleJackets ) %]
359 [% IF ( itemsloo.normalized_isbn ) %]
360 <div title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
362 <span class="no-image">No cover image available</span>
366 [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
367 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
369 <span title="[% itemsloo.biblionumber |url %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
371 <span class="no-image">No cover image available</span>
376 [% IF OpenLibraryCovers %]
377 [% IF itemsloo.normalized_isbn %]
378 <span title="[% itemsloo.biblionumber | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
380 <span class="no-image">No cover image available</span>
385 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
386 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
388 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
390 <span class="no-image">No cover image available</span>
394 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
395 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
397 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
398 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
401 <span class="no-image">No cover image available</span>
405 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
406 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
407 <a class="custom_cover_image" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
409 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
410 <a class="custom_cover_image" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
412 <a class="custom_cover_image" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
415 <img alt="Cover image" src="[% itemsloo.biblio_object.custom_cover_image_url | url %]" /></a>
419 [% IF ( itemsloo.XSLTBloc ) %]
420 [% itemsloo.XSLTBloc | $raw %]
423 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
424 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
426 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
427 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
429 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
433 [% INCLUDE 'biblio-title.inc' biblio=itemsloo %]
436 [% IF ( itemsloo.author ) %]
437 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>
442 <span class="results_summary">
443 <span class="label">Publication:</span>
444 [% IF ( itemsloo.place ) %]
445 [% itemsloo.place | html %]
447 [% IF ( itemsloo.publishercode ) %]
448 [% itemsloo.publishercode | html %]
450 [% IF ( itemsloo.publicationyear ) %]
451 [% itemsloo.publicationyear | html %]
453 [% IF ( itemsloo.copyrightdate ) %]
454 [% itemsloo.copyrightdate | html %]
457 [% IF ( itemsloo.pages ) %]. [% itemsloo.pages | html %][% END %]
458 [% IF ( itemsloo.notes ) %], [% itemsloo.notes | html %][% END %]
459 [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') | html %][% END %]
461 <span class="results_summary">
462 <span class="label">Holdings:</span>
463 [% IF ( itemsloo.ITEM_RESULTS ) %]
464 [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
465 [% ITEM_RESULT.homebranch | html %]
466 [% IF ( ITEM_RESULT.location_opac ) %]
467 <span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>
469 [% IF ( ITEM_RESULT.itemcallnumber ) %]
470 ([% ITEM_RESULT.itemcallnumber | html %])
471 [% IF ( loop.last ) %].[% ELSE %],[% END %]
475 This record has no items.
478 [% END # / IF itemsloo.XSLTBloc %]
480 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
481 <div class="results_summary tags">
482 <span class="label">Tags:</span>
484 [% FOREACH TagLoo IN itemsloo.TagLoop %]
485 <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>
491 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
493 <!-- COinS / Openurl -->
494 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
497 [% END # / FOREACH itemsloop %]
499 </table> <!-- / #listcontents -->
500 </div><!-- / .searchresults -->
502 [% IF ( pagination_bar ) %]
503 <div class="pages">[% pagination_bar | $raw %]</div>
507 <div id="toolbar" class="toolbar clearfix">
508 <div class="list-actions">
509 <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>
510 [% IF can_manage_shelf %]
511 <span class="sep">|</span>
512 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
513 <input type="hidden" name="op" value="edit_form" />
514 <input type="hidden" name="referer" value="view" />
515 <input type="hidden" name="category" value="[% shelf.category | html %]" />
516 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
517 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o" aria-hidden="true"></i> Edit list</button>
520 [% PROCESS delete_shelf context = "details" %]
523 </div> <!-- / .list-actions -->
524 </div> <!-- / #toolbar -->
526 <div class="alert alert-info">
528 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
529 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
532 [% END # / IF itemsloop %]
534 [% IF itemsloop && can_remove_biblios %]
535 <input type="hidden" name="op" value="remove_biblios" />
536 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
537 <input type="hidden" name="modifyshelfcontents" value="1" />
538 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
539 [% ELSIF !itemsloop && can_manage_shelf %]
540 <form method="post" action="opac-shelves.pl">
541 <input type="hidden" name="op" value="delete" />
542 <input type="hidden" name="referer" value="list" />
543 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
544 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
546 </form> <!-- / myform -->
548 [% IF op == 'add_form' OR op == 'edit_form' %]
549 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
550 <fieldset class="rows">
551 [% IF op == 'add_form' %]
553 <legend>Create a new list</legend>
554 <input type="hidden" name="op" value="add" />
556 <legend>Editing <em>[% shelf.shelfname | html %]</em></legend>
557 <input type="hidden" name="op" value="edit" />
558 <input type="hidden" name="referer" value="[% referer | html %]" />
559 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
561 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
564 <label class="required" for="shelfname">List name: </label>
565 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="required"/> <span class="required">Required</span></li>
567 <label for="sortfield" >Sort this list by: </label>
568 <select name="sortfield" id="sortfield">
569 [% IF shelf.sortfield == "title" %]
570 <option value="title" selected="selected">Title</option>
572 <option value="title">Title</option>
574 [% IF shelf.sortfield == "author" %]
575 <option value="author" selected="selected">Author</option>
577 <option value="author">Author</option>
579 [% IF shelf.sortfield == "copyrightdate" %]
580 <option value="copyrightdate" selected="selected">Year</option>
582 <option value="copyrightdate">Year</option>
584 [% IF shelf.sortfield == "itemcallnumber" %]
585 <option value="itemcallnumber" selected="selected">Call number</option>
587 <option value="itemcallnumber">Call number</option>
589 [% IF shelf.sortfield == "dateadded" %]
590 <option value="dateadded" selected="selected">Date added</option>
592 <option value="dateadded">Date added</option>
596 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
598 <label for="category">Category:</label>
599 <select name="category" id="category" onchange="AdjustRemark()">
600 [% IF shelf.is_private %]
601 <option value="1" selected="selected">Private</option>
603 <option value="1">Private</option>
605 [% IF shelf.is_public %]
606 <option value="2" selected="selected">Public</option>
608 <option value="2">Public</option>
611 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
612 <span class="hint alert alert-info">The library has disabled the ability for patrons to create new public lists. If you make your list private, you will not be able to make it public again.</span>
616 [% INCLUDE list_permissions %]
618 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
619 <input type="hidden" name="category" value="[% PRIVATE | html %]" />
623 <fieldset class="action">
624 <input type="submit" value="Save" class="btn" />
625 [% IF referer == 'view' %]
626 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
628 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a>
634 [% ELSIF op == 'list' %]
636 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
637 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
638 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
639 [% IF category == PRIVATE %]
640 <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>
642 <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>
645 [% IF category == PUBLIC %]
646 <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>
648 <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>
652 [% IF category == PRIVATE %]
653 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
655 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
658 [% IF loggedinusername %]
659 <div id="toolbar" class="toolbar"><a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-plus" aria-hidden="true"></i> New list</a></div>
661 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
662 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-shelves.pl?op=add_form">Log in to create a new list</a></div>
666 [% IF shelves.count %]
667 <table class="table">
677 [% FOREACH s IN shelves %]
678 [% SET contents = s.get_contents %]
680 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
681 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
683 [% IF s.is_private %]
684 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
690 [% IF s.can_be_managed( loggedinusernumber ) %]
691 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline">
692 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
693 <input type="hidden" name="category" value="[% s.category | html %]" />
694 <input type="hidden" name="op" value="edit_form" />
695 <input type="hidden" name="referer" value="list" />
696 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</button>
699 [% IF s.can_be_deleted( loggedinusernumber ) %]
700 [% PROCESS delete_shelf shelf = s context = "list" %]
702 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
703 <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>
705 [% IF s.is_shared_with( loggedinusernumber ) %]
706 <form action="opac-shelves.pl" method="post" id="unshare[% s.shelfnumber | html %]" class="form-inline">
707 <input type="hidden" name="op" value="remove_share" />
708 <input type="hidden" name="referer" value="list" />
709 <input type='hidden' name='category' value='[% category | html %]' />
710 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
711 <button type="submit" class="btn btn-link remove remove_share"
712 data-shelfname="[% s.shelfname | html %]" data-shelfnumber="[% s.shelfnumber | html %]"><i class="fa fa-remove" aria-hidden="true"></i> Remove share</button>
720 <div class="pages">[% pagination_bar | $raw %]</div>
722 [% IF category == PUBLIC %]
723 <p>No public lists.</p>
724 [% ELSIF loggedinusernumber %]
725 <p>No private lists.</p>
728 </div> [%# privateshelves or publicshelves %]
729 </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
730 [% ELSIF NOT loggedinusernumber %]
731 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
732 <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>
734 [% END # IF loggedinusername %]
735 </div> <!-- / #usershelves -->
736 </div> <!-- / .span10/12 -->
737 </div> <!-- / .row-fluid -->
738 </div> <!-- / .container-fluid -->
739 </div> <!-- / .main -->
741 <div class="modal hide" id="modalWin" role="dialog" aria-hidden="true" tabindex="-1">
742 <div class="modal-content">
743 <div class="modal-body">
744 <div style="margin:1em;padding:1em;font-size:150%;">
745 <img src="[% interface | html %]/[% theme | html %]/images/loading.gif" alt="" /> Loading
752 <div id="debug"></div>
755 [% INCLUDE 'opac-bottom.inc' %]
756 [% BLOCK jsinclude %]
757 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
758 [% Asset.js("lib/hc-sticky.js") | $raw %]
760 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
761 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
762 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
763 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
765 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
766 function holdSelections() {
767 var checkedBoxes = $("input:checkbox:checked");
768 if ($(checkedBoxes).size() == 0) {
769 alert(MSG_NO_RECORD_SELECTED);
772 $(checkedBoxes).each(function(){
773 bibs += $(this).val() + "/";
775 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
779 [% IF ( TagsInputEnabled && loggedinusername ) %]
780 function tagSelected() {
781 var checkedBoxes = $("input:checkbox:checked");
782 if ($(checkedBoxes).size()) {
783 $("#tagsel_tag").hide();
784 $(".tag_hides").hide();
785 $("#tagsel_form").show();
787 alert(MSG_NO_RECORD_SELECTED);
791 function tagCanceled() {
792 $("#tagsel_form").hide();
793 $("#tagsel_tag").show();
794 $(".tag_hides").show();
795 $("#tagsel_new").val("");
796 $(".tagstatus").empty().hide();
799 function tagAdded() {
800 var checkedBoxes = $("input:checkbox:checked");
801 if (!$(checkedBoxes).size()) {
802 alert(MSG_NO_RECORD_SELECTED);
806 var tag = $("#tagsel_new").val();
807 if (!tag || (tag == "")) {
808 alert(MSG_NO_TAG_SPECIFIED);
813 for (var i = 0; i < $(checkedBoxes).size(); i++) {
814 var box = $(checkedBoxes).get(i);
815 bibs[i] = $(box).val();
818 KOHA.Tags.add_multitags_button(bibs, tag);
823 function enableCheckboxActions(){
824 // Enable/disable controls if checkboxes are checked
825 var checkedBoxes = $(".checkboxed input:checkbox:checked");
826 if ($(checkedBoxes).size()) {
827 $("#selections").html(_("With selected titles: "));
828 $("#selections-toolbar .links a").removeClass("disabled");
830 $("#selections").html(_("Select titles to: "));
831 $("#selections-toolbar .links a").addClass("disabled");
836 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
837 $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
838 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
841 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
842 $("#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>");
843 $("#selections-toolbar a.hold").click(function(){
849 // If JS is enabled add parameter to download link
850 var dialoglink = $(".download").attr("href");
851 dialoglink += "&context=modal";
852 $(".download").attr("href",dialoglink);
854 $("#CheckAll").click(function(){
855 $(".checkboxed").checkCheckboxes();
856 enableCheckboxActions();
859 $("#CheckNone").click(function(){
860 $(".checkboxed").unCheckCheckboxes();
861 enableCheckboxActions();
865 $(".cb").click(function(){
866 enableCheckboxActions();
868 enableCheckboxActions();
870 [% IF ( TagsInputEnabled && loggedinusername ) %]
871 var tagAdd = $(".tag_add");
872 tagAdd.removeClass("hidden");
873 $("#tagsel_tag").click(function(){
877 $("#tagsel_cancel").click(function(){
881 $("#tagsel_button").click(function(){
886 tagAdd.click(function(){
887 var thisid = $(this).attr("id");
888 thisid = thisid.replace("tag_add","");
890 $("#tagform"+thisid).show();
891 $("#newtag"+thisid).focus();
892 $("#newtag"+thisid+"_status").empty().hide();
895 $(".cancel_tag_add").click(function(){
896 var thisid = $(this).attr("id");
897 thisid = thisid.replace("cancel","");
898 $("#tagform"+thisid).hide();
899 $("#tag_add"+thisid).show();
900 $("#newtag"+thisid).val("");
901 $("#newtag"+thisid+"_status").empty().hide();
904 $(".tagbutton").click(function(){
905 var thisid = $(this).attr("title");
906 var tag = $("#newtag"+thisid).val();
907 if (!tag || (tag == "")) {
908 alert(MSG_NO_TAG_SPECIFIED);
911 KOHA.Tags.add_tag_button(thisid, tag);
916 [% IF loggedinusername && can_remove_biblios %]
917 $(".removefromlist").on("click", function(e){
918 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
921 $("#myform").submit(function(){
922 var checkedBoxes = $(".checkboxed input:checkbox:checked");
923 var numchecked = $(checkedBoxes).size();
925 if( numchecked > 1 ){
926 return confirmDelete(MSG_REMOVE_FROM_LIST);
928 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
931 alert(MSG_NO_RECORD_SELECTED);
935 $("#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>")
937 $("#myform").submit();
941 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
942 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
943 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
944 [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
945 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
950 window.onafterprint = function () {
953 setTimeout('window.close()', 1000); // Hack for Chrome < 63
958 Sticky = $("#floating");
960 stickTo: "#usershelves",
961 stickyClass: "floating"
965 sortMenu( $("#sorting-form") );
967 $("#sortfield").on("change", function(){
968 $('#sorting-form').submit();
972 $(".deleteshelf").on("click", function(e){
974 var shelf_name = $(this).data("shelfname");
975 var shelf_number = $(this).data("shelfnumber");
976 var is_shared = $(this).data("shared");
977 var count = $(this).data("count");
978 var message = "<p><i>" + shelf_name + "</i></p>";
980 message += "<p>" + _("Items on this list:") + " <strong>" + count + "</strong></p>";
983 message += "<p>" + _("This list is shared. Other users will lose access to it.") + "</p>";
985 confirmModal( message, _("Are you sure you want to delete this list?"), _("Yes, delete"), _("No, do not delete"), function( result ){
987 $("#deleteshelf" + shelf_number ).submit();
993 $(".remove_share").on("click", function(e){
995 var shelf_name = $(this).data("shelfname");
996 var shelf_number = $(this).data("shelfnumber");
997 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 ){
999 $("#unshare" + shelf_number ).submit();
1005 }); // document.ready
1007 function sortMenu( sorting_form ){
1008 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
1009 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
1010 var menu = "<div class=\"btn-group\"><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><ul class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"sortmenu\">";
1011 $("#sortfield").children().each(function(){
1012 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1013 menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>";
1014 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
1015 menu += "<li class=\"dropdown-header\">" + $(this).attr("label") + "</li>";
1016 $(this).children().each(function(){
1017 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
1018 menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>";
1023 menu += "</ul></div>";
1024 $(".list-actions").append( menu );
1025 sorting_form.remove();
1028 function AdjustRemark() {
1030 if( $("#category").length > 0 ) {
1031 category = $("#category").val();
1033 category = [% category | html %];
1035 var perms = $("#allow_changes_from").val();
1038 $("#anyone_remark").hide();
1039 } else if( category==1 ) {
1040 // If we move to Private (without shares), show Anyone remark
1041 // Note: the number of shares is not tested real-time
1042 [% IF !shelf.is_shared %]
1043 $("#anyone_remark").show();
1045 $("#anyone_remark").hide();
1047 } else { // category==2
1048 $("#anyone_remark").hide();