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 [% INCLUDE 'doc-head-open.inc' %]
12 <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' %]
13 [% BLOCK cssinclude %][% END %]
15 [% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %][% END %]
17 [% BLOCK list_permissions %]
19 <label for="allow_changes_from">Allow changes to contents from: </label>
20 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
22 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
24 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
25 <option value="1" selected="selected">Owner only</option>
27 <option value="1">Owner only</option>
30 [% 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 %]
33   <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
37 [% INCLUDE 'masthead.inc' %]
39 <ul class="breadcrumb noprint">
40 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
41 [% IF ( loggedinusername ) %]
42 <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">›</span></li>
46 <li><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a></li>
51 [% IF shelf and shelf.is_private %]
52 [% IF op == 'view' OR op == 'edit_form' %]
53 <li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]">Your lists</a></li>
55 <li><span class="divider">›</span> Your lists</li>
57 [% ELSIF shelf AND shelf.is_public %]
59 <li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC | uri %]">Public lists</a></li>
61 <li><span class="divider">›</span> Public lists</li>
66 <li><span class="divider">›</span> Contents of <i>[% shelf.shelfname | html %]</i></li>
69 [% IF op == 'add_form' %]
70 <li><span class="divider">›</span> Create new list</li>
73 [% IF op == 'edit_form' %]
74 <li><span class="divider">›</span> Edit list <i>[% shelf.shelfname | html %]</i></li>
77 </ul> <!-- / .breadcrumb -->
79 <div class="container-fluid">
80 <div class="row-fluid">
81 [% IF ( OpacNav||loggedinusername ) && !print %]
84 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
89 [% IF ( OpacNav||loggedinusername ) %]
94 <div id="usershelves" class="maincontent">
96 [% FOR m IN messages %]
99 <div class="alert alert-success" role="alert">
101 <div class="alert alert-danger" role="alert">
104 [% CASE 'error_on_update' %]
105 <span>An error occurred when updating this list.</span>
106 [% CASE 'error_on_insert' %]
107 <span>An error occurred when creating this list.</span>
108 [% CASE 'error_on_delete' %]
109 <span>An error occurred when deleting this list.</span>
110 [% CASE 'error_on_add_biblio' %]
111 <span>The item has not been added to the list. Please check it's not already in the list.</span>
112 [% CASE 'error_on_remove_share' %]
113 <span>The share has not been removed.</span>
114 [% CASE 'success_on_update' %]
115 <span>List updated.</span>
116 [% CASE 'success_on_insert' %]
117 <span>List created.</span>
118 [% CASE 'success_on_delete' %]
119 <span>List deleted.</span>
120 [% CASE 'success_on_add_biblio' %]
121 <span>The item has been added to the list.</span>
122 [% CASE 'success_on_remove_biblios' %]
123 <span>The item has been removed from the list.</span>
124 [% CASE 'success_on_remove_share' %]
125 <span>The share has been removed.</span>
126 [% CASE 'does_not_exist' %]
127 <span>This list does not exist.</span>
128 [% CASE 'item_does_not_exist' %]
129 <span>This item does not exist.</span>
130 [% CASE 'unauthorized_on_view' %]
131 <span>You do not have permission to view this list.</span>
132 [% CASE 'unauthorized_on_insert' %]
133 <span>You do not have permission to create a new list.</span>
134 [% CASE 'unauthorized_on_update' %]
135 <span>You do not have permission to update this list.</span>
136 [% CASE 'unauthorized_on_delete' %]
137 <span>You do not have permission to delete this list.</span>
138 [% CASE 'unauthorized_on_add_biblio' %]
139 <span>You do not have permission to add a record to this list.</span>
140 [% CASE 'no_biblio_removed' %]
141 <span>No record was removed.</span>
142 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
143 <span>An error occurred when creating the list. The name [% shelfname | html %] already exists.</span>
144 [% CASE 'DBIx::Class::Exception' %]
153 [% IF shelf AND op == 'view' %]
155 [% shelf.shelfname | html %]
156 <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-shelves.pl?rss=1&op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="rss-list-link noprint">
157 <i class="fa fa-fw fa-rss rsssearchicon" title="Subscribe to this list"></i>
161 [% IF ( itemsloop ) %]
163 <div id="toolbar" class="toolbar clearfix">
164 <div class="list-actions">
165 <a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-fw fa-plus"></i> New list</a> <span class="sep">|</span>
166 <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"></i> Download list</a>
168 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
169 <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"></i> Send list</a></span>
172 <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"></i> Print list</a>
174 [% IF can_manage_shelf %]
175 <span class="sep">|</span>
176 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
177 <input type="hidden" name="op" value="edit_form" />
178 <input type="hidden" name="referer" value="view" />
179 <input type='hidden' name='category' value='[% shelf.category | html %]' />
180 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
181 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o"></i> Edit list</button>
184 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
185 <input type="hidden" name="op" value="delete" />
186 <input type="hidden" name="referer" value="list" />
187 <input type='hidden' name='category' value='[% shelf.category | html %]' />
188 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
189 <button type="submit" class="btn btn-link remove deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"><i class="fa fa-fw fa-remove"></i> Delete list</button>
191 [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
192 <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"></i> Share list</a>
194 [% ELSIF category == PRIVATE # not manageshelf and private means shared %]
195 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
196 <input type="hidden" name="op" value="remove_share" />
197 <input type="hidden" name="referer" value="list" />
198 <input type='hidden' name='category' value='[% category | html %]' />
199 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
200 <button type="submit" class="btn btn-link deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);"><i class="fa fa-fw fa-remove"></i> Remove share</button>
205 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="form-inline sort_by pull-right">
206 <input type="hidden" name="op" value="view" />
207 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
209 <label for="sortfield">Sort by: </label>
210 <select name="sortfield" id="sortfield" class="resort">
211 <option value="">Default sorting</option>
212 <optgroup label="Author">
213 [% IF sortfield == 'author' && direction == 'asc' %]
214 <option value="author:asc" selected="selected">Author (A-Z)</option>
216 <option value="author:asc">Author (A-Z)</option>
218 [% IF sortfield == 'author' && direction == 'desc' %]
219 <option value="author:desc" selected="selected">Author (Z-A)</option>
221 <option value="author:desc">Author (Z-A)</option>
224 <optgroup label="Title">
225 [% IF sortfield == 'title' && direction == 'asc' %]
226 <option value="title:asc" selected="selected">Title (A-Z)</option>
228 <option value="title:asc">Title (A-Z)</option>
230 [% IF sortfield == 'title' && direction == 'desc' %]
231 <option value="title:desc" selected="selected">Title (Z-A)</option>
233 <option value="title:desc">Title (Z-A)</option>
236 <optgroup label="Call number">
237 [% IF sortfield == 'itemcallnumber' && direction == 'asc' %]
238 <option value="itemcallnumber:asc" selected="selected">Call number (A-Z)</option>
240 <option value="itemcallnumber:asc">Call number (A-Z)</option>
242 [% IF sortfield == 'itemcallnumber' && direction == 'desc' %]
243 <option value="itemcallnumber:desc" selected="selected">Call number (Z-A)</option>
245 <option value="itemcallnumber:desc">Call number (Z-A)</option>
248 <optgroup label="Copyright date">
249 [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
250 <option value="copyrightdate:desc" selected="selected">Copyright date (newest to oldest)</option>
252 <option value="copyrightdate:desc">Copyright date (newest to oldest)</option>
254 [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
255 <option value="copyrightdate:asc" selected="selected">Copyright date (oldest to newest)</option>
257 <option value="copyrightdate:asc">Copyright date (oldest to newest)</option>
260 <optgroup label="Date added">
261 [% IF sortfield == "dateadded" && direction == 'asc' %]
262 <option value="dateadded:desc" selected="selected">Date added (newest to oldest)</option>
264 <option value="dateadded:desc">Date added (newest to oldest)</option>
266 [% IF sortfield == "dateadded" && direction == 'desc' %]
267 <option value="dateadded:asc" selected="selected">Date added (oldest to newest)</option>
269 <option value="dateadded:asc">Date added (oldest to newest)</option>
274 <input type="submit" class="btn btn-small" id="sort-submit" value="Resort list" />
277 </div> <!-- / #toolbar -->
279 <div id="selections-toolbar" class="toolbar noprint">
280 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
282 <span id="selections">Select titles to: </span>
283 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
284 <span id="placehold"></span>
286 [% IF ( TagsInputEnabled && loggedinusername ) %]
288 <a id="tagsel_tag" href="#" class="btn btn-link btn-disabled"><i class="fa fa-fw fa-tag"></i> Tag</a>
290 <span id="tagsel_form" style="display:none">
291 <label for="tagsel_new">New tag(s), separated by a comma:</label>
292 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
293 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-small" title="tagsel_button" type="submit" value="Add" />
294 <a href="#" id="tagsel_cancel">Cancel</a>
297 [% IF loggedinusername && can_remove_biblios %]
298 <span id="removeitems"></span>
300 </span> <!-- / .links -->
301 </div> <!-- / #selections-toolbar -->
302 </div> <!-- /#floating -->
304 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed">
305 [% IF can_manage_shelf %]
306 <input type="hidden" name="op" value="remove_biblios" />
307 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
309 <div class="searchresults">
310 <table id="listcontents" class="table">
312 [% FOREACH itemsloo IN itemsloop %]
314 <td class="select selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" /></td>
315 [% UNLESS ( item_level_itypes ) %]
317 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
318 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
320 [% itemsloo.description | html %]
324 <div class="coverimages">
325 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
326 [% IF ( OPACLocalCoverImages ) %]
327 <span title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
329 [% IF ( AdlibrisEnabled && itemsloo.normalized_isbn ) %]
330 <img src="[% AdlibrisURL | html %]?isbn=[% itemsloo.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" />
332 [% IF ( OPACAmazonCoverImages ) %]
333 [% IF ( itemsloo.normalized_isbn ) %]
334 <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>
336 <span class="no-image">No cover image available</span>
340 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
341 <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>
344 [% IF ( GoogleJackets ) %]
345 [% IF ( itemsloo.normalized_isbn ) %]
346 <div title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
348 <span class="no-image">No cover image available</span>
352 [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
353 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
355 <span title="[% itemsloo.biblionumber |url %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
357 <span class="no-image">No cover image available</span>
362 [% IF OpenLibraryCovers %]
363 [% IF itemsloo.normalized_isbn %]
364 <span title="[% itemsloo.biblionumber | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
366 <span class="no-image">No cover image available</span>
371 [% IF ( Koha.Preference('BakerTaylorEnabled') && !Koha.Preference('BakerTaylorBookstoreURL') ) %]
372 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
374 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
376 <span class="no-image">No cover image available</span>
380 [% IF ( Koha.Preference('BakerTaylorEnabled') && Koha.Preference('BakerTaylorBookstoreURL') ) %]
381 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
383 <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') | uri %][% bt_id | uri %]">
384 <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
387 <span class="no-image">No cover image available</span>
391 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
392 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
393 <a class="custom_cover_image" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
395 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
396 <a class="custom_cover_image" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
398 <a class="custom_cover_image" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
401 <img alt="Cover image" src="[% itemsloo.biblio_object.custom_cover_image_url | url %]" /></a>
405 [% IF ( itemsloo.XSLTBloc ) %]
406 [% itemsloo.XSLTBloc | $raw %]
409 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
410 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
412 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
413 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
415 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
419 [% INCLUDE 'biblio-title.inc' biblio=itemsloo %]
422 [% IF ( itemsloo.author ) %]
423 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>
428 <span class="results_summary">
429 <span class="label">Publication:</span>
430 [% IF ( itemsloo.place ) %]
431 [% itemsloo.place | html %]
433 [% IF ( itemsloo.publishercode ) %]
434 [% itemsloo.publishercode | html %]
436 [% IF ( itemsloo.publicationyear ) %]
437 [% itemsloo.publicationyear | html %]
439 [% IF ( itemsloo.copyrightdate ) %]
440 [% itemsloo.copyrightdate | html %]
443 [% IF ( itemsloo.pages ) %]. [% itemsloo.pages | html %][% END %]
444 [% IF ( itemsloo.notes ) %], [% itemsloo.notes | html %][% END %]
445 [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') | html %][% END %]
447 <span class="results_summary">
448 <span class="label">Holdings:</span>
449 [% IF ( itemsloo.ITEM_RESULTS ) %]
450 [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
451 [% ITEM_RESULT.homebranch | html %]
452 [% IF ( ITEM_RESULT.location_opac ) %]
453 <span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>
455 [% IF ( ITEM_RESULT.itemcallnumber ) %]
456 ([% ITEM_RESULT.itemcallnumber | html %])
457 [% IF ( loop.last ) %].[% ELSE %],[% END %]
461 This record has no items.
464 [% END # / IF itemsloo.XSLTBloc %]
466 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
467 <div class="results_summary tags">
468 <span class="label">Tags:</span>
470 [% FOREACH TagLoo IN itemsloo.TagLoop %]
471 <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>
477 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
479 <!-- COinS / Openurl -->
480 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
483 [% END # / FOREACH itemsloop %]
485 </table> <!-- / #listcontents -->
486 </div><!-- / .searchresults -->
488 [% IF ( pagination_bar ) %]
489 <div class="pages">[% pagination_bar | $raw %]</div>
493 <div id="toolbar" class="toolbar clearfix">
494 <div class="list-actions">
495 <a class="btn btn-link newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form"><i class="fa fa-fw fa-plus"></i> New list</a>
496 [% IF can_manage_shelf %]
497 <span class="sep">|</span>
498 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
499 <input type="hidden" name="op" value="edit_form" />
500 <input type="hidden" name="referer" value="view" />
501 <input type="hidden" name="category" value="[% shelf.category | html %]" />
502 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
503 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-fw fa-pencil-square-o"></i> Edit list</button>
506 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
507 <input type="hidden" name="op" value="delete" />
508 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
509 <input type="hidden" name="category" value="[% shelf.category | html %]" />
510 <button type="submit" class="btn btn-link remove deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"><i class="fa fa-fw fa-remove"></i> Delete list</button>
513 </div> <!-- / .list-actions -->
514 </div> <!-- / #toolbar -->
516 <div class="alert alert-info">
518 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
519 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
522 [% END # / IF itemsloop %]
524 [% IF itemsloop && can_remove_biblios %]
525 <input type="hidden" name="op" value="remove_biblios" />
526 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
527 <input type="hidden" name="modifyshelfcontents" value="1" />
528 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
529 [% ELSIF !itemsloop && can_manage_shelf %]
530 <form method="post" action="opac-shelves.pl">
531 <input type="hidden" name="op" value="delete" />
532 <input type="hidden" name="referer" value="list" />
533 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
534 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
536 </form> <!-- / myform -->
538 [% IF op == 'add_form' OR op == 'edit_form' %]
539 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
540 <fieldset class="rows">
541 [% IF op == 'add_form' %]
543 <legend>Create a new list</legend>
544 <input type="hidden" name="op" value="add" />
546 <legend>Editing <em>[% shelf.shelfname | html %]</em></legend>
547 <input type="hidden" name="op" value="edit" />
548 <input type="hidden" name="referer" value="[% referer | html %]" />
549 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
551 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
554 <label class="required" for="shelfname">List name: </label>
555 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="required"/> <span class="required">Required</span></li>
557 <label for="sortfield" >Sort this list by: </label>
558 <select name="sortfield" id="sortfield">
559 [% IF shelf.sortfield == "title" %]
560 <option value="title" selected="selected">Title</option>
562 <option value="title">Title</option>
564 [% IF shelf.sortfield == "author" %]
565 <option value="author" selected="selected">Author</option>
567 <option value="author">Author</option>
569 [% IF shelf.sortfield == "copyrightdate" %]
570 <option value="copyrightdate" selected="selected">Year</option>
572 <option value="copyrightdate">Year</option>
574 [% IF shelf.sortfield == "itemcallnumber" %]
575 <option value="itemcallnumber" selected="selected">Call number</option>
577 <option value="itemcallnumber">Call number</option>
579 [% IF shelf.sortfield == "dateadded" %]
580 <option value="dateadded" selected="selected">Date added</option>
582 <option value="dateadded">Date added</option>
586 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
588 <label for="category">Category:</label>
589 <select name="category" id="category" onchange="AdjustRemark()">
590 [% IF shelf.is_private %]
591 <option value="1" selected="selected">Private</option>
593 <option value="1">Private</option>
595 [% IF shelf.is_public %]
596 <option value="2" selected="selected">Public</option>
598 <option value="2">Public</option>
601 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
602 <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>
606 [% INCLUDE list_permissions %]
608 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
609 <input type="hidden" name="category" value="[% PRIVATE | html %]" />
613 <fieldset class="action">
614 <input type="submit" value="Save" class="btn" />
615 [% IF referer == 'view' %]
616 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
618 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a>
624 [% ELSIF op == 'list' %]
626 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
627 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
628 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
629 [% IF category == PRIVATE %]
630 <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>
632 <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>
635 [% IF category == PUBLIC %]
636 <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>
638 <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>
642 [% IF category == PRIVATE %]
643 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
645 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
648 [% IF loggedinusername %]
649 <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"></i> New list</a></div>
651 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
652 <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>
656 [% IF shelves.count %]
657 <table class="table">
667 [% FOREACH s IN shelves %]
668 [% SET contents = s.get_contents %]
670 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
671 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
673 [% IF s.is_private %]
674 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
680 [% IF s.can_be_managed( loggedinusernumber ) %]
681 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline">
682 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
683 <input type="hidden" name="category" value="[% s.category | html %]" />
684 <input type="hidden" name="op" value="edit_form" />
685 <input type="hidden" name="referer" value="list" />
686 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o"></i> Edit</button>
689 [% IF s.can_be_deleted( loggedinusernumber ) %]
690 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
691 <input type="hidden" name="op" value="delete" />
692 <input type="hidden" name="referer" value="list" />
693 <input type='hidden' name='category' value='[% category | html %]' />
694 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
695 <button type="submit" class="btn btn-link remove deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"><i class="fa fa-remove"></i> Delete</button>
698 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
699 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber | uri %]" class="sharelist">Share</a>
701 [% IF s.is_shared_with( loggedinusernumber ) %]
702 <form action="opac-shelves.pl" method="post" class="form-inline">
703 <input type="hidden" name="op" value="remove_share" />
704 <input type="hidden" name="referer" value="list" />
705 <input type='hidden' name='category' value='[% category | html %]' />
706 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
707 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
715 <div class="pages">[% pagination_bar | $raw %]</div>
717 [% IF category == PUBLIC %]
718 <p>No public lists.</p>
719 [% ELSIF loggedinusernumber %]
720 <p>No private lists.</p>
723 </div> [%# privateshelves or publicshelves %]
724 </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
725 [% ELSIF NOT loggedinusernumber %]
726 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
727 <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>
729 [% END # IF loggedinusername %]
730 </div> <!-- / #usershelves -->
731 </div> <!-- / .span10/12 -->
732 </div> <!-- / .row-fluid -->
733 </div> <!-- / .container-fluid -->
734 </div> <!-- / .main -->
736 <div class="modal hide" id="modalWin" role="dialog" aria-hidden="true" tabindex="-1">
737 <div class="modal-content">
738 <div class="modal-body">
739 <div style="margin:1em;padding:1em;font-size:150%;">
740 <img src="[% interface | html %]/[% theme | html %]/images/loading.gif" alt="" /> Loading
747 <div id="debug"></div>
750 [% INCLUDE 'opac-bottom.inc' %]
751 [% BLOCK jsinclude %]
752 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
753 [% Asset.js("lib/hc-sticky.js") | $raw %]
755 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
756 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
757 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
758 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
760 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
761 function holdSelections() {
762 var checkedBoxes = $("input:checkbox:checked");
763 if ($(checkedBoxes).size() == 0) {
764 alert(MSG_NO_RECORD_SELECTED);
767 $(checkedBoxes).each(function(){
768 bibs += $(this).val() + "/";
770 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
774 [% IF ( TagsInputEnabled && loggedinusername ) %]
775 function tagSelected() {
776 var checkedBoxes = $("input:checkbox:checked");
777 if ($(checkedBoxes).size()) {
778 $("#tagsel_tag").hide();
779 $(".tag_hides").hide();
780 $("#tagsel_form").show();
782 alert(MSG_NO_RECORD_SELECTED);
786 function tagCanceled() {
787 $("#tagsel_form").hide();
788 $("#tagsel_tag").show();
789 $(".tag_hides").show();
790 $("#tagsel_new").val("");
791 $(".tagstatus").empty().hide();
794 function tagAdded() {
795 var checkedBoxes = $("input:checkbox:checked");
796 if (!$(checkedBoxes).size()) {
797 alert(MSG_NO_RECORD_SELECTED);
801 var tag = $("#tagsel_new").val();
802 if (!tag || (tag == "")) {
803 alert(MSG_NO_TAG_SPECIFIED);
808 for (var i = 0; i < $(checkedBoxes).size(); i++) {
809 var box = $(checkedBoxes).get(i);
810 bibs[i] = $(box).val();
813 KOHA.Tags.add_multitags_button(bibs, tag);
818 function enableCheckboxActions(){
819 // Enable/disable controls if checkboxes are checked
820 var checkedBoxes = $(".checkboxed input:checkbox:checked");
821 if ($(checkedBoxes).size()) {
822 $("#selections").html(_("With selected titles: "));
823 $("#selections-toolbar .links a").removeClass("disabled");
825 $("#selections").html(_("Select titles to: "));
826 $("#selections-toolbar .links a").addClass("disabled");
831 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
832 $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
833 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
836 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
837 $("#placehold").html("<a href=\"#\" class=\"btn btn-link hold tag_hides btn-disabled\"><i class=\"fa fa-fw fa-bookmark\"></i> "+_("Place hold")+"<\/a>");
838 $("#selections-toolbar a.hold").click(function(){
844 // If JS is enabled add parameter to download link
845 var dialoglink = $(".download").attr("href");
846 dialoglink += "&context=modal";
847 $(".download").attr("href",dialoglink);
849 $("#CheckAll").click(function(){
850 $(".checkboxed").checkCheckboxes();
851 enableCheckboxActions();
854 $("#CheckNone").click(function(){
855 $(".checkboxed").unCheckCheckboxes();
856 enableCheckboxActions();
860 $(".cb").click(function(){
861 enableCheckboxActions();
863 enableCheckboxActions();
865 [% IF ( TagsInputEnabled && loggedinusername ) %]
866 var tagAdd = $(".tag_add");
867 tagAdd.removeClass("hidden");
868 $("#tagsel_tag").click(function(){
872 $("#tagsel_cancel").click(function(){
876 $("#tagsel_button").click(function(){
881 tagAdd.click(function(){
882 var thisid = $(this).attr("id");
883 thisid = thisid.replace("tag_add","");
885 $("#tagform"+thisid).show();
886 $("#newtag"+thisid).focus();
887 $("#newtag"+thisid+"_status").empty().hide();
890 $(".cancel_tag_add").click(function(){
891 var thisid = $(this).attr("id");
892 thisid = thisid.replace("cancel","");
893 $("#tagform"+thisid).hide();
894 $("#tag_add"+thisid).show();
895 $("#newtag"+thisid).val("");
896 $("#newtag"+thisid+"_status").empty().hide();
899 $(".tagbutton").click(function(){
900 var thisid = $(this).attr("title");
901 var tag = $("#newtag"+thisid).val();
902 if (!tag || (tag == "")) {
903 alert(MSG_NO_TAG_SPECIFIED);
906 KOHA.Tags.add_tag_button(thisid, tag);
911 [% IF loggedinusername && can_remove_biblios %]
912 $(".removefromlist").on("click", function(e){
913 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
916 $("#myform").submit(function(){
917 var checkedBoxes = $(".checkboxed input:checkbox:checked");
918 var numchecked = $(checkedBoxes).size();
920 if( numchecked > 1 ){
921 return confirmDelete(MSG_REMOVE_FROM_LIST);
923 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
926 alert(MSG_NO_RECORD_SELECTED);
930 $("#removeitems").html("<a href=\"#\" class=\"btn btn-link disabled removeitems tag_hides\"><i class=\"fa fa-fw fa-remove\"></i> "+_("Remove from list")+"</a>")
932 $("#myform").submit();
936 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
937 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
938 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
939 [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
940 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
945 window.onafterprint = function () {
948 setTimeout('window.close()', 1000); // Hack for Chrome < 63
953 Sticky = $("#floating");
955 stickTo: "#usershelves",
956 stickyClass: "floating"
960 sortMenu( $("#sorting-form") );
962 $("#sortfield").on("change", function(){
963 $('#sorting-form').submit();
967 }); // document.ready
969 function sortMenu( sorting_form ){
970 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
971 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
972 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\"></i> " + _("Sort") + "</span></button><ul class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"sortmenu\">";
973 $("#sortfield").children().each(function(){
974 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
975 menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>";
976 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
977 menu += "<li class=\"dropdown-header\">" + $(this).attr("label") + "</li>";
978 $(this).children().each(function(){
979 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
980 menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>";
985 menu += "</ul></div>";
986 $(".list-actions").append( menu );
987 sorting_form.remove();
990 function AdjustRemark() {
992 if( $("#category").length > 0 ) {
993 category = $("#category").val();
995 category = [% category | html %];
997 var perms = $("#allow_changes_from").val();
1000 $("#anyone_remark").hide();
1001 } else if( category==1 ) {
1002 // If we move to Private (without shares), show Anyone remark
1003 // Note: the number of shares is not tested real-time
1004 [% IF !shelf.is_shared %]
1005 $("#anyone_remark").show();
1007 $("#anyone_remark").hide();
1009 } else { // category==2
1010 $("#anyone_remark").hide();