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='[% 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='[% 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 ( noItemTypeImages ) %]
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 ( BakerTaylorEnabled ) %]
372 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
374 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
376 <span class="no-image">No cover image available</span>
380 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
381 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
382 <a class="custom_cover_image" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
384 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
385 <a class="custom_cover_image" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
387 <a class="custom_cover_image" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]">
390 <img alt="Cover image" src="[% itemsloo.biblio_object.custom_cover_image_url | url %]" /></a>
394 [% IF ( itemsloo.XSLTBloc ) %]
395 [% itemsloo.XSLTBloc | $raw %]
398 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
399 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
401 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
402 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
404 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
408 [% INCLUDE 'biblio-title.inc' biblio=itemsloo %]
411 [% IF ( itemsloo.author ) %]
412 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>
417 <span class="results_summary">
418 <span class="label">Publication:</span>
419 [% IF ( itemsloo.place ) %]
420 [% itemsloo.place | html %]
422 [% IF ( itemsloo.publishercode ) %]
423 [% itemsloo.publishercode | html %]
425 [% IF ( itemsloo.publicationyear ) %]
426 [% itemsloo.publicationyear | html %]
428 [% IF ( itemsloo.copyrightdate ) %]
429 [% itemsloo.copyrightdate | html %]
432 [% IF ( itemsloo.pages ) %]. [% itemsloo.pages | html %][% END %]
433 [% IF ( itemsloo.notes ) %], [% itemsloo.notes | html %][% END %]
434 [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') | html %][% END %]
436 <span class="results_summary">
437 <span class="label">Holdings:</span>
438 [% IF ( itemsloo.ITEM_RESULTS ) %]
439 [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
440 [% ITEM_RESULT.homebranch | html %]
441 [% IF ( ITEM_RESULT.location_opac ) %]
442 <span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>
444 [% IF ( ITEM_RESULT.itemcallnumber ) %]
445 ([% ITEM_RESULT.itemcallnumber | html %])
446 [% IF ( loop.last ) %].[% ELSE %],[% END %]
450 This record has no items.
453 [% END # / IF itemsloo.XSLTBloc %]
455 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
456 <div class="results_summary tags">
457 <span class="label">Tags:</span>
459 [% FOREACH TagLoo IN itemsloo.TagLoop %]
460 <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>
466 [% INCLUDE 'title-actions-menu.inc' items=itemsloo %]
468 <!-- COinS / Openurl -->
469 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
472 [% END # / FOREACH itemsloop %]
474 </table> <!-- / #listcontents -->
475 </div><!-- / .searchresults -->
477 [% IF ( pagination_bar ) %]
478 <div class="pages">[% pagination_bar | $raw %]</div>
482 <div id="toolbar" class="toolbar clearfix">
483 <div class="list-actions">
484 <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep"></span>
485 [% IF can_manage_shelf %]
486 <span class="sep">|</span>
487 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
488 <input type="hidden" name="op" value="edit_form" />
489 <input type="hidden" name="referer" value="view" />
490 <input type="hidden" name="category" value="category" />
491 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
492 <input type="submit" class="editshelf" value="Edit list" />
495 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
496 <input type="hidden" name="op" value="delete" />
497 <input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]"/>
498 <input type="hidden" name="category" value="category" />
499 <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
502 </div> <!-- / .list-actions -->
503 </div> <!-- / #toolbar -->
505 <div class="alert alert-info">
507 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
508 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
511 [% END # / IF itemsloop %]
513 [% IF itemsloop && 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"/>
518 [% ELSIF !itemsloop && can_manage_shelf %]
519 <form method="post" action="opac-shelves.pl">
520 <input type="hidden" name="op" value="delete" />
521 <input type="hidden" name="referer" value="list" />
522 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
523 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
525 </form> <!-- / myform -->
527 [% IF op == 'add_form' OR op == 'edit_form' %]
528 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
529 <fieldset class="rows">
530 [% IF op == 'add_form' %]
532 <legend>Create a new list</legend>
533 <input type="hidden" name="op" value="add" />
535 <legend>Editing <em>[% shelf.shelfname | html %]</em></legend>
536 <input type="hidden" name="op" value="edit" />
537 <input type="hidden" name="referer" value="[% referer | html %]" />
538 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
540 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
543 <label class="required" for="shelfname">List name: </label>
544 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="required"/> <span class="required">Required</span></li>
546 <label for="sortfield" >Sort this list by: </label>
547 <select name="sortfield" id="sortfield">
548 [% IF shelf.sortfield == "title" %]
549 <option value="title" selected="selected">Title</option>
551 <option value="title">Title</option>
553 [% IF shelf.sortfield == "author" %]
554 <option value="author" selected="selected">Author</option>
556 <option value="author">Author</option>
558 [% IF shelf.sortfield == "copyrightdate" %]
559 <option value="copyrightdate" selected="selected">Year</option>
561 <option value="copyrightdate">Year</option>
563 [% IF shelf.sortfield == "itemcallnumber" %]
564 <option value="itemcallnumber" selected="selected">Call number</option>
566 <option value="itemcallnumber">Call number</option>
568 [% IF shelf.sortfield == "dateadded" %]
569 <option value="dateadded" selected="selected">Date added</option>
571 <option value="dateadded">Date added</option>
575 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
577 <label for="category">Category:</label>
578 <select name="category" id="category" onchange="AdjustRemark()">
579 [% IF shelf.is_private %]
580 <option value="1" selected="selected">Private</option>
582 <option value="1">Private</option>
584 [% IF shelf.is_public %]
585 <option value="2" selected="selected">Public</option>
587 <option value="2">Public</option>
590 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
591 <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>
595 [% INCLUDE list_permissions %]
597 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
598 <input type="hidden" name="category" value="[% PRIVATE | html %]" />
602 <fieldset class="action">
603 <input type="submit" value="Save" class="btn" />
604 [% IF referer == 'view' %]
605 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
607 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a>
613 [% ELSIF op == 'list' %]
615 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
616 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
617 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
618 [% IF category == PRIVATE %]
619 <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>
621 <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>
624 [% IF category == PUBLIC %]
625 <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>
627 <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>
631 [% IF category == PRIVATE %]
632 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
634 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
637 [% IF loggedinusername %]
638 <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>
640 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
641 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
645 [% IF shelves.count %]
646 <table class="table">
656 [% FOREACH s IN shelves %]
657 [% SET contents = s.get_contents %]
659 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
660 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
662 [% IF s.is_private %]
663 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
669 [% IF s.can_be_managed( loggedinusernumber ) %]
670 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline">
671 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
672 <input type="hidden" name="category" value="[% s.category | html %]" />
673 <input type="hidden" name="op" value="edit_form" />
674 <input type="hidden" name="referer" value="list" />
675 <button type="submit" class="btn btn-link editshelf"><i class="fa fa-pencil-square-o"></i> Edit</button>
678 [% IF s.can_be_deleted( loggedinusernumber ) %]
679 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
680 <input type="hidden" name="op" value="delete" />
681 <input type="hidden" name="referer" value="list" />
682 <input type='hidden' name='category' value='[% category | html %]' />
683 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
684 <button type="submit" class="btn btn-link remove deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"><i class="fa fa-remove"></i> Delete</button>
687 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
688 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber | uri %]" class="sharelist">Share</a>
690 [% IF s.is_shared_with( loggedinusernumber ) %]
691 <form action="opac-shelves.pl" method="post" class="form-inline">
692 <input type="hidden" name="op" value="remove_share" />
693 <input type="hidden" name="referer" value="list" />
694 <input type='hidden' name='category' value='[% category | html %]' />
695 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
696 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
704 <div class="pages">[% pagination_bar | $raw %]</div>
706 [% IF category == PUBLIC %]
707 <p>No public lists.</p>
708 [% ELSIF loggedinusernumber %]
709 <p>No private lists.</p>
712 </div> [%# privateshelves or publicshelves %]
713 </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
714 [% ELSIF NOT loggedinusernumber %]
715 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
716 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
718 [% END # IF loggedinusername %]
719 </div> <!-- / #usershelves -->
720 </div> <!-- / .span10/12 -->
721 </div> <!-- / .row-fluid -->
722 </div> <!-- / .container-fluid -->
723 </div> <!-- / .main -->
725 <div class="modal hide" id="modalWin" role="dialog" aria-hidden="true" tabindex="-1">
726 <div class="modal-content">
727 <div class="modal-body">
728 <div style="margin:1em;padding:1em;font-size:150%;">
729 <img src="[% interface | html %]/[% theme | html %]/images/loading.gif" alt="" /> Loading
736 <div id="debug"></div>
739 [% INCLUDE 'opac-bottom.inc' %]
740 [% BLOCK jsinclude %]
741 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
742 [% Asset.js("lib/hc-sticky.js") | $raw %]
744 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
745 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
746 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
747 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
749 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
750 function holdSelections() {
751 var checkedBoxes = $("input:checkbox:checked");
752 if ($(checkedBoxes).size() == 0) {
753 alert(MSG_NO_RECORD_SELECTED);
756 $(checkedBoxes).each(function(){
757 bibs += $(this).val() + "/";
759 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
763 [% IF ( TagsInputEnabled && loggedinusername ) %]
764 function tagSelected() {
765 var checkedBoxes = $("input:checkbox:checked");
766 if ($(checkedBoxes).size()) {
767 $("#tagsel_tag").hide();
768 $(".tag_hides").hide();
769 $("#tagsel_form").show();
771 alert(MSG_NO_RECORD_SELECTED);
775 function tagCanceled() {
776 $("#tagsel_form").hide();
777 $("#tagsel_tag").show();
778 $(".tag_hides").show();
779 $("#tagsel_new").val("");
780 $(".tagstatus").empty().hide();
783 function tagAdded() {
784 var checkedBoxes = $("input:checkbox:checked");
785 if (!$(checkedBoxes).size()) {
786 alert(MSG_NO_RECORD_SELECTED);
790 var tag = $("#tagsel_new").val();
791 if (!tag || (tag == "")) {
792 alert(MSG_NO_TAG_SPECIFIED);
797 for (var i = 0; i < $(checkedBoxes).size(); i++) {
798 var box = $(checkedBoxes).get(i);
799 bibs[i] = $(box).val();
802 KOHA.Tags.add_multitags_button(bibs, tag);
807 function enableCheckboxActions(){
808 // Enable/disable controls if checkboxes are checked
809 var checkedBoxes = $(".checkboxed input:checkbox:checked");
810 if ($(checkedBoxes).size()) {
811 $("#selections").html(_("With selected titles: "));
812 $("#selections-toolbar .links a").removeClass("disabled");
814 $("#selections").html(_("Select titles to: "));
815 $("#selections-toolbar .links a").addClass("disabled");
820 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
821 $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
822 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
825 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
826 $("#placehold").html("<a href=\"#\" class=\"btn btn-link hold tag_hides btn-disabled\"><i class=\"fa fa-fw fa-bookmark\"></i> "+_("Place hold")+"<\/a>");
827 $("#selections-toolbar a.hold").click(function(){
833 // If JS is enabled add parameter to download link
834 var dialoglink = $(".download").attr("href");
835 dialoglink += "&context=modal";
836 $(".download").attr("href",dialoglink);
838 $("#CheckAll").click(function(){
839 $(".checkboxed").checkCheckboxes();
840 enableCheckboxActions();
843 $("#CheckNone").click(function(){
844 $(".checkboxed").unCheckCheckboxes();
845 enableCheckboxActions();
849 $(".cb").click(function(){
850 enableCheckboxActions();
852 enableCheckboxActions();
854 [% IF ( TagsInputEnabled && loggedinusername ) %]
855 var tagAdd = $(".tag_add");
856 tagAdd.removeClass("hidden");
857 $("#tagsel_tag").click(function(){
861 $("#tagsel_cancel").click(function(){
865 $("#tagsel_button").click(function(){
870 tagAdd.click(function(){
871 var thisid = $(this).attr("id");
872 thisid = thisid.replace("tag_add","");
874 $("#tagform"+thisid).show();
875 $("#newtag"+thisid).focus();
876 $("#newtag"+thisid+"_status").empty().hide();
879 $(".cancel_tag_add").click(function(){
880 var thisid = $(this).attr("id");
881 thisid = thisid.replace("cancel","");
882 $("#tagform"+thisid).hide();
883 $("#tag_add"+thisid).show();
884 $("#newtag"+thisid).val("");
885 $("#newtag"+thisid+"_status").empty().hide();
888 $(".tagbutton").click(function(){
889 var thisid = $(this).attr("title");
890 var tag = $("#newtag"+thisid).val();
891 if (!tag || (tag == "")) {
892 alert(MSG_NO_TAG_SPECIFIED);
895 KOHA.Tags.add_tag_button(thisid, tag);
900 [% IF loggedinusername && can_remove_biblios %]
901 $(".removefromlist").on("click", function(e){
902 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
905 $("#myform").submit(function(){
906 var checkedBoxes = $(".checkboxed input:checkbox:checked");
907 var numchecked = $(checkedBoxes).size();
909 if( numchecked > 1 ){
910 return confirmDelete(MSG_REMOVE_FROM_LIST);
912 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
915 alert(MSG_NO_RECORD_SELECTED);
919 $("#removeitems").html("<a href=\"#\" class=\"btn btn-link disabled removeitems tag_hides\"><i class=\"fa fa-fw fa-remove\"></i> "+_("Remove from list")+"</a>")
921 $("#myform").submit();
925 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
926 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
927 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
928 [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
929 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
934 window.onafterprint = function () {
937 setTimeout('window.close()', 1000); // Hack for Chrome < 63
942 Sticky = $("#floating");
944 stickTo: "#usershelves",
945 stickyClass: "floating"
948 sortMenu( $("#sorting-form") );
950 $("#sortfield").on("change", function(){
951 $('#sorting-form').submit();
954 }); // document.ready
956 function sortMenu( sorting_form ){
957 var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
958 var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield=";
959 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\">";
960 $("#sortfield").children().each(function(){
961 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
962 menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>";
963 } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
964 menu += "<li class=\"dropdown-header\">" + $(this).attr("label") + "</li>";
965 $(this).children().each(function(){
966 if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
967 menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>";
972 menu += "</ul></div>";
973 $(".list-actions").append( menu );
974 sorting_form.remove();
977 function AdjustRemark() {
979 if( $("#category").length > 0 ) {
980 category = $("#category").val();
982 category = [% category | html %];
984 var perms = $("#allow_changes_from").val();
987 $("#anyone_remark").hide();
988 } else if( category==1 ) {
989 // If we move to Private (without shares), show Anyone remark
990 // Note: the number of shares is not tested real-time
991 [% IF !shelf.is_shared %]
992 $("#anyone_remark").show();
994 $("#anyone_remark").hide();
996 } else { // category==2
997 $("#anyone_remark").hide();