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-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="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep">|</span>
166 <a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | uri %]" class="download" data-toggle="modal" data-target="#modalWin">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="send" onclick="open('/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelf.shelfnumber | html %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send list</a></span>
172 <a class="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">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 <input type="submit" class="editshelf" value="Edit list" />
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 <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
191 [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
192 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | uri %]" class="sharelist">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 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
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" onchange="$('#sorting-form').submit()">
211 <option value="">Default sorting</option>
213 [% IF sortfield == 'author' %]
214 <option value="author" selected="selected">Author</option>
216 <option value="author">Author</option>
219 [% IF sortfield == 'title' %]
220 <option value="title" selected="selected">Title</option>
222 <option value="title">Title</option>
225 [% IF sortfield == 'itemcallnumber' %]
226 <option value="itemcallnumber" selected="selected">Call number</option>
228 <option value="itemcallnumber">Call number</option>
231 [% IF sortfield == 'copyrightdate' %]
232 <option value="copyrightdate" selected="selected">Copyright date</option>
234 <option value="copyrightdate">Copyright date</option>
237 [% IF sortfield == "dateadded" %]
238 <option value="dateadded" selected="selected">Date added</option>
240 <option value="dateadded">Date added</option>
244 <select name="direction" class="resort" onchange="$('#sorting-form').submit()">
245 [% IF direction == 'asc' %]
246 <option value="asc" selected="selected">Ascending</option>
248 <option value="asc">Ascending</option>
251 [% IF direction == 'desc' %]
252 <option value="desc" selected="selected">Descending</option>
254 <option value="desc">Descending</option>
258 <input type="submit" class="btn btn-small" id="sort-submit" value="Resort list" />
261 </div> <!-- / #toolbar -->
263 <div id="selections-toolbar" class="toolbar noprint">
264 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
266 <span id="selections">Select titles to: </span>
267 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
268 <span id="placehold"></span>
270 [% IF ( TagsInputEnabled && loggedinusername ) %]
272 <a id="tagsel_tag" href="#" class="disabled">Tag</a>
274 <span id="tagsel_form" style="display:none">
275 <label for="tagsel_new">New tag(s), separated by a comma:</label>
276 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
277 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-small" title="tagsel_button" type="submit" value="Add" />
278 <a href="#" id="tagsel_cancel">Cancel</a>
281 [% IF loggedinusername && can_remove_biblios %]
282 <span id="removeitems"></span>
284 </span> <!-- / .links -->
285 </div> <!-- / #selections-toolbar -->
286 </div> <!-- /#floating -->
288 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed">
289 [% IF can_manage_shelf %]
290 <input type="hidden" name="op" value="remove_biblios" />
291 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
293 <div class="searchresults">
294 <table id="listcontents" class="table">
296 [% FOREACH itemsloo IN itemsloop %]
298 <td class="select selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber | html %]" /></td>
299 [% UNLESS ( item_level_itypes ) %]
301 [% UNLESS ( noItemTypeImages ) %]
302 <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
304 [% itemsloo.description | html %]
308 <div class="coverimages">
309 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]">
310 [% IF ( OPACLocalCoverImages ) %]
311 <span title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span>
313 [% IF ( AdlibrisEnabled && itemsloo.normalized_isbn ) %]
314 <img src="[% AdlibrisURL | html %]?isbn=[% itemsloo.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" />
316 [% IF ( OPACAmazonCoverImages ) %]
317 [% IF ( itemsloo.normalized_isbn ) %]
318 <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>
320 <span class="no-image">No cover image available</span>
324 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
325 <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>
328 [% IF ( GoogleJackets ) %]
329 [% IF ( itemsloo.normalized_isbn ) %]
330 <div title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
332 <span class="no-image">No cover image available</span>
336 [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
337 [% coce_id = itemsloo.normalized_ean || itemsloo.normalized_isbn %]
339 <span title="[% itemsloo.biblionumber |url %]" class="[% coce_id | html %]" id="coce-thumbnail[% loop.count | html %]"></span>
341 <span class="no-image">No cover image available</span>
346 [% IF OpenLibraryCovers %]
347 [% IF itemsloo.normalized_isbn %]
348 <span title="[% itemsloo.biblionumber | html %]" class="[% itemsloo.normalized_isbn | html %]" id="openlibrary-thumbnail[% loop.count | html %]"></span>
350 <span class="no-image">No cover image available</span>
355 [% IF ( BakerTaylorEnabled ) %]
356 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
358 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
360 <span class="no-image">No cover image available</span>
364 [% IF ( itemsloo.XSLTBloc ) %]
365 [% itemsloo.XSLTBloc | $raw %]
368 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
369 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
371 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
372 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
374 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
378 [% IF ( itemsloo.title ) %]
379 [% itemsloo.title | html %]
384 [% FOREACH subtitl IN itemsloo.subtitle %]
389 [% IF ( itemsloo.author ) %]
390 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>
395 <span class="results_summary">
396 <span class="label">Publication:</span>
397 [% IF ( itemsloo.place ) %]
398 [% itemsloo.place | html %]
400 [% IF ( itemsloo.publishercode ) %]
401 [% itemsloo.publishercode | html %]
403 [% IF ( itemsloo.publicationyear ) %]
404 [% itemsloo.publicationyear | html %]
406 [% IF ( itemsloo.copyrightdate ) %]
407 [% itemsloo.copyrightdate | html %]
410 [% IF ( itemsloo.pages ) %]. [% itemsloo.pages | html %][% END %]
411 [% IF ( itemsloo.notes ) %], [% itemsloo.notes | html %][% END %]
412 [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') | html %][% END %]
414 <span class="results_summary">
415 <span class="label">Holdings:</span>
416 [% IF ( itemsloo.ITEM_RESULTS ) %]
417 [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
418 [% ITEM_RESULT.homebranch | html %]
419 [% IF ( ITEM_RESULT.location_opac ) %]
420 <span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>
422 [% IF ( ITEM_RESULT.itemcallnumber ) %]
423 ([% ITEM_RESULT.itemcallnumber | html %])
424 [% IF ( loop.last ) %].[% ELSE %],[% END %]
428 This record has no items.
431 [% END # / IF itemsloo.XSLTBloc %]
433 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
434 <div class="results_summary tags">
435 <span class="label">Tags:</span>
437 [% FOREACH TagLoo IN itemsloo.TagLoop %]
438 <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>
444 <span class="results_summary">
446 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
447 [% UNLESS ( itemsloo.norequests ) %]
448 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
449 [% IF ( itemsloo.allow_onshelf_holds ) %]
450 <span class="actions"><a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% itemsloo.biblionumber | html %]">Place hold</a><!-- add back when available 0 holds in queue--></span>
452 [% IF ( itemsloo.itemsissued ) %]
453 <span class="actions"><a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% itemsloo.biblionumber | html %]">Place hold</a><!-- add back when available 0 holds in queue--></span>
456 [% END # / IF opacuserlogin %]
457 [% END # / UNLESS itemsloo.norequests %]
458 [% END # / RequestOnOpac %]
460 [% IF ( TagsInputEnabled ) %]
461 [% IF ( loggedinusername ) %]
462 <span class="actions"><a class="tag_add hidden" id="tag_add[% itemsloo.biblionumber | html %]" href="#">Add tag</a></span>
463 <div id="tagform[% itemsloo.biblionumber | html %]" class="tag_results_input" style="display:none;">
464 <label for="newtag[% itemsloo.biblionumber | html %]">New tag(s), separated by a comma:</label>
465 <input type="text" name="newtag[% itemsloo.biblionumber | html %]" id="newtag[% itemsloo.biblionumber | html %]" maxlength="100" />
466 <input name="tagbutton" class="tagbutton btn btn-small" title="[% itemsloo.biblionumber | html %]" type="submit" value="Add" />
467 <a class="cancel_tag_add" id="cancel[% itemsloo.biblionumber | html %]" href="#">(done)</a>
469 <div id="newtag[% itemsloo.biblionumber | html %]_status" class="tagstatus" style="display:none;">
472 [% ELSIF ( loop.first ) %]
473 <span class="tagstatus" id="login4tags">Log in to add tags.</span>
474 [% END # / IF loggedinusername %]
475 [% END # / IF TagsInputEnabled %]
477 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
478 <span class="actions"><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber | html %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber | html %]'); return false;">Save to another list</a></span>
481 [% IF can_remove_biblios %]
482 <span class="actions"><a class="removefromlist" href="/cgi-bin/koha/opac-shelves.pl?op=remove_biblios&shelfnumber=[% shelf.shelfnumber | html %]&biblionumber=[% itemsloo.biblionumber | html %]">Remove from this list</a></span>
485 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
486 [% IF ( itemsloo.incart ) %]
487 <span class="actions"><a data-biblionumber="[% itemsloo.biblionumber | html %]" class="addtocart cart[% itemsloo.biblionumber | html %] hidden" href="#">In your cart</a> <a data-biblionumber="[% itemsloo.biblionumber | html %]" class="cartRemove cartR[% itemsloo.biblionumber | html %] hidden" href="#">(remove)</a></span>
489 <span class="actions"><a data-biblionumber="[% itemsloo.biblionumber | html %]" class="addtocart cart[% itemsloo.biblionumber | html %] hidden" href="#">Add to cart</a> <a style="display:none;" data-biblionumber="[% itemsloo.biblionumber | html %]" class="cartRemove cartR[% itemsloo.biblionumber | html %] hidden" href="#">(remove)</a></span>
491 [% END # / IF opacbookbag %]
492 </span> <!-- / .results_summary .actions -->
494 <!-- COinS / Openurl -->
495 <span class="Z3988" title="[% itemsloo.coins | html %]"></span>
498 [% END # / FOREACH itemsloop %]
500 </table> <!-- / #listcontents -->
501 </div><!-- / .searchresults -->
503 [% IF ( pagination_bar ) %]
504 <div class="pages">[% pagination_bar | $raw %]</div>
508 <div id="toolbar" class="toolbar clearfix">
509 <div class="list-actions">
510 <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep"></span>
511 [% IF can_manage_shelf %]
512 <span class="sep">|</span>
513 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
514 <input type="hidden" name="op" value="edit_form" />
515 <input type="hidden" name="referer" value="view" />
516 <input type="hidden" name="category" value="category" />
517 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
518 <input type="submit" class="editshelf" value="Edit list" />
521 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
522 <input type="hidden" name="op" value="delete" />
523 <input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]"/>
524 <input type="hidden" name="category" value="category" />
525 <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
528 </div> <!-- / .list-actions -->
529 </div> <!-- / #toolbar -->
531 <div class="alert alert-info">
533 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
534 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
537 [% END # / IF itemsloop %]
539 [% IF itemsloop && can_remove_biblios %]
540 <input type="hidden" name="op" value="remove_biblios" />
541 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
542 <input type="hidden" name="modifyshelfcontents" value="1" />
543 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
545 [% ELSIF !itemsloop && can_manage_shelf %]
546 <form method="post" action="opac-shelves.pl">
547 <input type="hidden" name="op" value="delete" />
548 <input type="hidden" name="referer" value="list" />
549 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
550 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
554 [% IF op == 'add_form' OR op == 'edit_form' %]
555 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
556 <fieldset class="rows">
557 [% IF op == 'add_form' %]
559 <legend>Create a new list</legend>
560 <input type="hidden" name="op" value="add" />
562 <legend>Editing <em>[% shelf.shelfname | html %]</em></legend>
563 <input type="hidden" name="op" value="edit" />
564 <input type="hidden" name="referer" value="[% referer | html %]" />
565 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
567 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />
570 <label class="required" for="shelfname">List name: </label>
571 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname | html %]" required="required" class="required"/> <span class="required">Required</span></li>
573 <label for="sortfield" >Sort this list by: </label>
574 <select name="sortfield" id="sortfield">
575 [% IF shelf.sortfield == "title" %]
576 <option value="title" selected="selected">Title</option>
578 <option value="title">Title</option>
580 [% IF shelf.sortfield == "author" %]
581 <option value="author" selected="selected">Author</option>
583 <option value="author">Author</option>
585 [% IF shelf.sortfield == "copyrightdate" %]
586 <option value="copyrightdate" selected="selected">Year</option>
588 <option value="copyrightdate">Year</option>
590 [% IF shelf.sortfield == "itemcallnumber" %]
591 <option value="itemcallnumber" selected="selected">Call number</option>
593 <option value="itemcallnumber">Call number</option>
595 [% IF shelf.sortfield == "dateadded" %]
596 <option value="dateadded" selected="selected">Date added</option>
598 <option value="dateadded">Date added</option>
602 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
604 <label for="category">Category:</label>
605 <select name="category" id="category" onchange="AdjustRemark()">
606 [% IF shelf.is_private %]
607 <option value="1" selected="selected">Private</option>
609 <option value="1">Private</option>
611 [% IF shelf.is_public %]
612 <option value="2" selected="selected">Public</option>
614 <option value="2">Public</option>
617 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
618 <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>
622 [% INCLUDE list_permissions %]
624 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
625 <input type="hidden" name="category" value="[% PRIVATE | html %]" />
629 <fieldset class="action">
630 <input type="submit" value="Save" class="btn" />
631 [% IF referer == 'view' %]
632 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
634 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a>
640 [% ELSIF op == 'list' %]
642 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
643 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
644 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
645 [% IF category == PRIVATE %]
646 <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>
648 <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>
651 [% IF category == PUBLIC %]
652 <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>
654 <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>
658 [% IF category == PRIVATE %]
659 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
661 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
664 [% IF loggedinusername %]
665 <div id="toolbar" class="toolbar"><a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a></div>
667 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
668 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
672 [% IF shelves.count %]
673 <table class="table">
683 [% FOREACH s IN shelves %]
684 [% SET contents = s.get_contents %]
686 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a></td>
687 <td>[% IF contents.count %][% contents.count | html %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
689 [% IF s.is_private %]
690 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
696 [% IF s.can_be_managed( loggedinusernumber ) %]
697 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline">
698 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
699 <input type="hidden" name="category" value="[% s.category | html %]" />
700 <input type="hidden" name="op" value="edit_form" />
701 <input type="hidden" name="referer" value="list" />
702 <input type="submit" class="editshelf" value="Edit" />
705 [% IF s.can_be_deleted( loggedinusernumber ) %]
706 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
707 <input type="hidden" name="op" value="delete" />
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 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
714 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
715 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber | uri %]" class="sharelist">Share</a>
717 [% IF s.is_shared_with( loggedinusernumber ) %]
718 <form action="opac-shelves.pl" method="post" class="form-inline">
719 <input type="hidden" name="op" value="remove_share" />
720 <input type="hidden" name="referer" value="list" />
721 <input type='hidden' name='category' value='[% category | html %]' />
722 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
723 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
731 <div class="pages">[% pagination_bar | $raw %]</div>
733 [% IF category == PUBLIC %]
734 <p>No public lists.</p>
735 [% ELSIF loggedinusernumber %]
736 <p>No private lists.</p>
739 </div> [%# privateshelves or publicshelves %]
740 </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
741 [% ELSIF NOT loggedinusernumber %]
742 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
743 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
745 [% END # IF loggedinusername %]
746 </div> <!-- / #usershelves -->
747 </div> <!-- / .span10/12 -->
748 </div> <!-- / .row-fluid -->
749 </div> <!-- / .container-fluid -->
750 </div> <!-- / .main -->
752 <div class="modal hide" id="modalWin" role="dialog" aria-hidden="true" tabindex="-1">
753 <div class="modal-content">
754 <div class="modal-body">
755 <div style="margin:1em;padding:1em;font-size:150%;">
756 <img src="[% interface | html %]/[% theme | html %]/images/loading.gif" alt="" /> Loading
763 <div id="debug"></div>
766 [% INCLUDE 'opac-bottom.inc' %]
767 [% BLOCK jsinclude %]
768 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
769 [% Asset.js("lib/hc-sticky.js") | $raw %]
772 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
773 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
774 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
775 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
777 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
778 function holdSelections() {
779 var checkedBoxes = $("input:checkbox:checked");
780 if ($(checkedBoxes).size() == 0) {
781 alert(MSG_NO_RECORD_SELECTED);
784 $(checkedBoxes).each(function(){
785 bibs += $(this).val() + "/";
787 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
791 [% IF ( TagsInputEnabled && loggedinusername ) %]
792 function tagSelected() {
793 var checkedBoxes = $("input:checkbox:checked");
794 if ($(checkedBoxes).size()) {
795 $("#tagsel_tag").hide();
796 $(".tag_hides").hide();
797 $("#tagsel_form").show();
799 alert(MSG_NO_RECORD_SELECTED);
803 function tagCanceled() {
804 $("#tagsel_form").hide();
805 $("#tagsel_tag").show();
806 $(".tag_hides").show();
807 $("#tagsel_new").val("");
808 $(".tagstatus").empty().hide();
811 function tagAdded() {
812 var checkedBoxes = $("input:checkbox:checked");
813 if (!$(checkedBoxes).size()) {
814 alert(MSG_NO_RECORD_SELECTED);
818 var tag = $("#tagsel_new").val();
819 if (!tag || (tag == "")) {
820 alert(MSG_NO_TAG_SPECIFIED);
825 for (var i = 0; i < $(checkedBoxes).size(); i++) {
826 var box = $(checkedBoxes).get(i);
827 bibs[i] = $(box).val();
830 KOHA.Tags.add_multitags_button(bibs, tag);
835 function enableCheckboxActions(){
836 // Enable/disable controls if checkboxes are checked
837 var checkedBoxes = $(".checkboxed input:checkbox:checked");
838 if ($(checkedBoxes).size()) {
839 $("#selections").html(_("With selected titles: "));
840 $("#selections-toolbar .links a").removeClass("disabled");
842 $("#selections").html(_("Select titles to: "));
843 $("#selections-toolbar .links a").addClass("disabled");
848 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
849 $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
850 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
853 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
854 $("#placehold").html("<a href=\"#\" class=\"hold tag_hides disabled\">"+_("Place hold")+"<\/a>");
855 $("#selections-toolbar a.hold").click(function(){
861 // If JS is enabled add parameter to download link
862 var dialoglink = $(".download").attr("href");
863 dialoglink += "&context=modal";
864 $(".download").attr("href",dialoglink);
866 $("#CheckAll").click(function(){
867 $(".checkboxed").checkCheckboxes();
868 enableCheckboxActions();
871 $("#CheckNone").click(function(){
872 $(".checkboxed").unCheckCheckboxes();
873 enableCheckboxActions();
877 $(".cb").click(function(){
878 enableCheckboxActions();
880 enableCheckboxActions();
882 [% IF ( TagsInputEnabled && loggedinusername ) %]
883 var tagAdd = $(".tag_add");
884 tagAdd.removeClass("hidden");
885 $("#tagsel_tag").click(function(){
889 $("#tagsel_cancel").click(function(){
893 $("#tagsel_button").click(function(){
898 tagAdd.click(function(){
899 var thisid = $(this).attr("id");
900 thisid = thisid.replace("tag_add","");
902 $("#tagform"+thisid).show();
903 $("#newtag"+thisid).focus();
904 $("#newtag"+thisid+"_status").empty().hide();
907 $(".cancel_tag_add").click(function(){
908 var thisid = $(this).attr("id");
909 thisid = thisid.replace("cancel","");
910 $("#tagform"+thisid).hide();
911 $("#tag_add"+thisid).show();
912 $("#newtag"+thisid).val("");
913 $("#newtag"+thisid+"_status").empty().hide();
916 $(".tagbutton").click(function(){
917 var thisid = $(this).attr("title");
918 var tag = $("#newtag"+thisid).val();
919 if (!tag || (tag == "")) {
920 alert(MSG_NO_TAG_SPECIFIED);
923 KOHA.Tags.add_tag_button(thisid, tag);
928 [% IF loggedinusername && can_remove_biblios %]
929 $(".removefromlist").on("click", function(e){
930 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
933 $("#myform").submit(function(){
934 var checkedBoxes = $(".checkboxed input:checkbox:checked");
935 var numchecked = $(checkedBoxes).size();
937 if( numchecked > 1 ){
938 return confirmDelete(MSG_REMOVE_FROM_LIST);
940 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
943 alert(MSG_NO_RECORD_SELECTED);
947 $("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Remove from list")+"</a>")
949 $("#myform").submit();
953 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
954 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
955 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
956 [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %]
957 KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
960 $('#sort-submit').hide();
964 setTimeout('window.close()', 1);
969 Sticky = $("#floating");
971 stickTo: "#usershelves",
972 stickyClass: "floating"
975 }); // document.ready
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();