4 [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsShowOnList') ) %]
5 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && Koha.Preference('TagsInputOnList') ) %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF op == 'view' %]Contents of [% shelf.shelfname %][% ELSE %]Your lists[% END %]</title>[% INCLUDE 'doc-head-close.inc' %]
9 [% BLOCK cssinclude %][% END %]
11 [% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-userlists' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-lists' bodyclass='scrollto' %][% END %]
13 [% BLOCK list_permissions %]
15 <label for="allow_add">Permissions: </label>
16 <select name="allow_add" id="allow_add">
17 [% IF shelf.allow_add %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
18 [% IF shelf.allow_add %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
20 <span>anyone else to add entries.</span>
24 <select name="allow_delete_own" id="allow_delete_own">
25 [% IF shelf and not shelf.allow_delete_own %]<option value="0" selected="selected">Do not allow</option>[% ELSE %]<option value="0">Do not allow</option>[% END %]
26 [% IF not shelf or shelf.allow_delete_own %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
28 <span>anyone to remove their own contributed entries.</span>
32 <select name="allow_delete_other" id="allow_delete_other">
33 [% IF shelf.allow_delete_other %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
34 [% IF shelf.allow_delete_other %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
36 <span>anyone to remove other contributed entries.</span>
40 [% INCLUDE 'masthead.inc' %]
42 <ul class="breadcrumb noprint">
43 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
44 [% IF ( loggedinusername ) %]
45 <li><a href="/cgi-bin/koha/opac-user.pl">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</a> <span class="divider">›</span></li>
49 <li><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a></li>
54 [% IF shelf and shelf.category == PRIVATE %]
55 [% IF op == 'view' OR op == 'edit_form' %]
56 <li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE %]">Your lists</a></li>
58 <li><span class="divider">›</span> Your lists</li>
60 [% ELSIF shelf AND shelf.category == PUBLIC %]
62 <li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC %]">Public lists</a></li>
64 <li><span class="divider">›</span> Public lists</li>
69 <li><span class="divider">›</span> Contents of <i>[% shelf.shelfname %]</i></li>
72 [% IF op == 'add_form' %]
73 <li><span class="divider">›</span> Create new list</li>
76 [% IF op == 'edit_form' %]
77 <li><span class="divider">›</span> Edit list <i>[% shelf.shelfname %]</i></li>
80 </ul> <!-- / .breadcrumb -->
82 <div class="container-fluid">
83 <div class="row-fluid">
84 [% IF ( OpacNav||loggedinusername ) && !print %]
87 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
92 [% IF ( OpacNav||loggedinusername ) %]
97 <div id="usershelves" class="maincontent">
99 [% FOR m IN messages %]
102 <div class="alert alert-success" role="alert">
104 <div class="alert alert-danger" role="alert">
107 [% CASE 'error_on_update' %]
108 <span>An error occurred when updating this list.</span>
109 [% CASE 'error_on_insert' %]
110 <span>An error occurred when creating this list.</span>
111 [% CASE 'error_on_delete' %]
112 <span>An error occurred when deleting this list.</span>
113 [% CASE 'error_on_add_biblio' %]
114 <span>The item has not been added to the list. Please check it's not already in the list.</span>
115 [% CASE 'error_on_remove_share' %]
116 <span>The share has not been removed.</span>
117 [% CASE 'success_on_update' %]
118 <span>List updated.</span>
119 [% CASE 'success_on_insert' %]
120 <span>List created.</span>
121 [% CASE 'success_on_delete' %]
122 <span>List deleted.</span>
123 [% CASE 'success_on_add_biblio' %]
124 <span>The item has been added to the list.</span>
125 [% CASE 'success_on_remove_biblios' %]
126 <span>The item has been removed from the list.</span>
127 [% CASE 'success_on_remove_share' %]
128 <span>The share has been removed.</span>
129 [% CASE 'does_not_exist' %]
130 <span>This list does not exist.</span>
131 [% CASE 'item_does_not_exist' %]
132 <span>This item does not exist.</span>
133 [% CASE 'unauthorized_on_view' %]
134 <span>You do not have permission to view this list.</span>
135 [% CASE 'unauthorized_on_insert' %]
136 <span>You do not have permission to create a new list.</span>
137 [% CASE 'unauthorized_on_update' %]
138 <span>You do not have permission to update this list.</span>
139 [% CASE 'unauthorized_on_delete' %]
140 <span>You do not have permission to delete this list.</span>
141 [% CASE 'unauthorized_on_add_biblio' %]
142 <span>You do not have permission to add a record to this list.</span>
143 [% CASE 'no_biblio_removed' %]
144 <span>No record was removed.</span>
145 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
146 <span>An error occurred when creating the list. The name [% shelfname %] already exists.</span>
147 [% CASE 'DBIx::Class::Exception' %]
156 [% IF op == 'view' %]
158 [% shelf.shelfname %]
159 <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-shelves.pl?rss=1&op=view&shelfnumber=[% shelf.shelfnumber %]" class="rss-list-link noprint">
160 <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep">|</span>
161 <a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber %]" class="download" data-toggle="modal" data-target="#modalWin">Download list</a>
163 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
164 <span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelf.shelfnumber %]" class="send" onclick="open('/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelf.shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send list</a></span>
167 <a class="print-small" target="_blank" href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]&sortfield=[% sortfield %]&direction=[% direction |uri %]&print=1">Print list</a>
169 [% IF can_manage_shelf %]
170 <span class="sep">|</span>
171 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
172 <input type="hidden" name="op" value="edit_form" />
173 <input type="hidden" name="referer" value="view" />
174 <input type='hidden' name='category' value='[% category %]' />
175 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
176 <input type="submit" class="editshelf" value="Edit list" />
179 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
180 <input type="hidden" name="op" value="delete" />
181 <input type="hidden" name="referer" value="list" />
182 <input type='hidden' name='category' value='[% category %]' />
183 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
184 <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
186 [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
187 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber %]" class="">Share list</a>
189 [% ELSIF category == PRIVATE # not manageshelf and private means shared %]
190 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
191 <input type="hidden" name="op" value="remove_share" />
192 <input type="hidden" name="referer" value="list" />
193 <input type='hidden' name='category' value='[% category %]' />
194 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
195 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
200 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="form-inline sort_by pull-right">
201 <input type="hidden" name="op" value="view" />
202 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
204 <label for="sortfield">Sort by: </label>
205 <select name="sortfield" id="sortfield" class="resort" onchange="$('#sorting-form').submit()">
206 <option value="">Default sorting</option>
208 [% IF sortfield == 'author' %]
209 <option value="author" selected="selected">Author</option>
211 <option value="author">Author</option>
214 [% IF sortfield == 'title' %]
215 <option value="title" selected="selected">Title</option>
217 <option value="title">Title</option>
220 [% IF sortfield == 'itemcallnumber' %]
221 <option value="itemcallnumber" selected="selected">Call number</option>
223 <option value="itemcallnumber">Call number</option>
226 [% IF sortfield == 'copyrightdate' %]
227 <option value="copyrightdate" selected="selected">Copyright date</option>
229 <option value="copyrightdate">Copyright date</option>
233 <select name="direction" class="resort" onchange="$('#sorting-form').submit()">
234 [% IF direction == 'asc' %]
235 <option value="asc" selected="selected">Ascending</option>
237 <option value="asc">Ascending</option>
240 [% IF direction == 'desc' %]
241 <option value="desc" selected="selected">Descending</option>
243 <option value="desc">Descending</option>
247 <input type="submit" class="btn btn-small" id="sort-submit" value="Resort list" />
250 </div> <!-- / #toolbar -->
252 <div id="selections-toolbar" class="toolbar noprint">
253 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
255 <span id="selections">Select titles to: </span>
256 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
257 <span id="placehold"></span>
259 [% IF ( TagsInputEnabled && loggedinusername ) %]
261 <a id="tagsel_tag" href="#" class="disabled">Tag</a>
263 <span id="tagsel_form" style="display:none">
264 <label for="tagsel_new">New tag(s), separated by a comma:</label>
265 <input name="tagsel_new" id="tagsel_new" maxlength="100" />
266 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-small" title="tagsel_button" type="submit" value="Add" />
267 <a href="#" id="tagsel_cancel">Cancel</a>
270 [% IF loggedinusername && can_remove_biblios %]
271 <span id="removeitems"></span>
273 </span> <!-- / .links -->
274 </div> <!-- / #selections-toolbar -->
276 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed">
277 [% IF can_manage_shelf %]
278 <input type="hidden" name="op" value="remove_biblios" />
279 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
281 <div class="searchresults">
282 <table id="listcontents" class="table">
284 [% FOREACH itemsloo IN itemsloop %]
286 <td class="select selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber %]" /></td>
287 [% UNLESS ( item_level_itypes ) %]
289 [% UNLESS ( noItemTypeImages ) %]
290 <img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />
292 [% itemsloo.description %]
296 <div class="coverimages">
297 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber %]">
298 [% IF ( OPACLocalCoverImages ) %]
299 <span title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>
302 [% IF ( OPACAmazonCoverImages ) %]
303 [% IF ( itemsloo.normalized_isbn ) %]
304 <span title="[% SEARCH_RESULT.biblionumber %]" id="amazon-thumbnail[% loop.count %]"><img src="https://images-na.ssl-images-amazon.com/images/P/[% itemsloo.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" /></span>
306 <span class="no-image">No cover image available</span>
310 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
311 [% IF ( using_https ) %]
312 <span title="[% SEARCH_RESULT.biblionumber %]" id="syndetics-thumbnail[% loop.count %]"><img src="https://secure.syndetics.com/index.aspx?isbn=[% itemsloo.normalized_isbn %]/SC.GIF&client=[% SyndeticsClientCode %]&type=xw10&upc=[% itemsloo.normalized_upc %]&oclc=[% itemsloo.normalized_oclc %]" alt="" /></span>
314 <span title="[% SEARCH_RESULT.biblionumber %]" id="syndetics-thumbnail[% loop.count %]"><img src="http://www.syndetics.com/index.aspx?isbn=[% itemsloo.normalized_isbn %]/SC.GIF&client=[% SyndeticsClientCode %]&type=xw10&upc=[% itemsloo.normalized_upc %]&oclc=[% itemsloo.normalized_oclc %]" alt="" /></span>
318 [% IF ( GoogleJackets ) %]
319 [% IF ( itemsloo.normalized_isbn ) %]
320 <div title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
322 <span class="no-image">No cover image available</span>
326 [% IF OpenLibraryCovers %]
327 [% IF itemsloo.normalized_isbn %]
328 <span title="[% itemsloo.biblionumber %]" class="[% itemsloo.normalized_isbn %]" id="openlibrary-thumbnail[% loop.count %]"></span>
330 <span class="no-image">No cover image available</span>
335 [% IF ( BakerTaylorEnabled ) %]
336 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
338 <a href="https://[% BakerTaylorBookstoreURL %][% bt_id %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL %][% bt_id %]" /></a>
340 <span class="no-image">No cover image available</span>
344 [% IF ( itemsloo.XSLTBloc ) %]
345 [% itemsloo.XSLTBloc %]
348 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
349 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
351 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
352 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
354 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
358 [% IF ( itemsloo.title ) %]
364 [% FOREACH subtitl IN itemsloo.subtitle %]
365 [% subtitl.subfield %]
369 [% IF ( itemsloo.author ) %]
370 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 %]</a>
375 <span class="results_summary">
376 <span class="label">Publication:</span>
377 [% IF ( itemsloo.place ) %]
380 [% IF ( itemsloo.publishercode ) %]
381 [% itemsloo.publishercode %]
383 [% IF ( itemsloo.publicationyear ) %]
384 [% itemsloo.publicationyear %]
386 [% IF ( itemsloo.copyrightdate ) %]
387 [% itemsloo.copyrightdate %]
390 [% IF ( itemsloo.pages ) %]. [% itemsloo.pages %][% END %]
391 [% IF ( itemsloo.notes ) %], [% itemsloo.notes %][% END %]
392 [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') %][% END %]
394 <span class="results_summary">
395 <span class="label">Holdings:</span>
396 [% IF ( itemsloo.ITEM_RESULTS ) %]
397 [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
398 [% ITEM_RESULT.homebranch %]
399 [% IF ( ITEM_RESULT.location_opac ) %]
400 , [% ITEM_RESULT.location_opac %]
402 [% IF ( ITEM_RESULT.itemcallnumber ) %]
403 ([% ITEM_RESULT.itemcallnumber %])
404 [% IF ( loop.last ) %].[% ELSE %],[% END %]
408 This record has no items.
411 [% END # / IF itemsloo.XSLTBloc %]
413 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
414 <div class="results_summary tags">
415 <span class="label">Tags:</span>
417 [% FOREACH TagLoo IN itemsloo.TagLoop %]
418 <li><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
424 <span class="results_summary">
426 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
427 [% UNLESS ( itemsloo.norequests ) %]
428 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
429 [% IF ( itemsloo.allow_onshelf_holds ) %]
430 <span class="actions"><a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% itemsloo.biblionumber %]">Place hold</a><!-- add back when available 0 holds in queue--></span>
432 [% IF ( itemsloo.itemsissued ) %]
433 <span class="actions"><a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% itemsloo.biblionumber %]">Place hold</a><!-- add back when available 0 holds in queue--></span>
436 [% END # / IF opacuserlogin %]
437 [% END # / UNLESS itemsloo.norequests %]
438 [% END # / RequestOnOpac %]
440 [% IF ( TagsInputEnabled ) %]
441 [% IF ( loggedinusername ) %]
442 <span class="actions"><a class="tag_add hidden" id="tag_add[% itemsloo.biblionumber %]" href="#">Add tag</a></span>
443 <div id="tagform[% itemsloo.biblionumber %]" class="tag_results_input" style="display:none;">
444 <label for="newtag[% itemsloo.biblionumber %]">New tag(s), separated by a comma:</label>
445 <input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" />
446 <input name="tagbutton" class="tagbutton btn btn-small" title="[% itemsloo.biblionumber %]" type="submit" value="Add" />
447 <a class="cancel_tag_add" id="cancel[% itemsloo.biblionumber %]" href="#">(done)</a>
449 <div id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">
452 [% ELSIF ( loop.first ) %]
453 <span class="tagstatus" id="login4tags">Log in to add tags.</span>
454 [% END # / IF loggedinusername %]
455 [% END # / IF TagsInputEnabled %]
457 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
458 <span class="actions"><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]'); return false;">Save to another list</a></span>
461 [% IF can_remove_biblios %]
462 <span class="actions"><a class="removefromlist" href="/cgi-bin/koha/opac-shelves.pl?op=remove_biblios&shelfnumber=[% shelf.shelfnumber %]&biblionumber=[% itemsloo.biblionumber %]">Remove from this list</a></span>
465 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
466 [% IF ( itemsloo.incart ) %]
467 <span class="actions"><a class="addtocart cart[% itemsloo.biblionumber %] hidden" href="#" onclick="addRecord('[% itemsloo.biblionumber %]'); return false;">In your cart</a> <a class="cartRemove cartR[% itemsloo.biblionumber %] hidden" href="#" onclick="delSingleRecord('[% itemsloo.biblionumber %]'); return false;">(remove)</a></span>
469 <span class="actions"><a class="addtocart cart[% itemsloo.biblionumber %] hidden" href="#" onclick="addRecord('[% itemsloo.biblionumber %]'); return false;">Add to cart</a> <a style="display:none;" class="cartRemove cartR[% itemsloo.biblionumber %] hidden" href="#" onclick="delSingleRecord('[% itemsloo.biblionumber %]'); return false;">(remove)</a></span>
471 [% END # / IF opacbookbag %]
472 </span> <!-- / .results_summary .actions -->
474 <!-- COinS / Openurl -->
475 <span class="Z3988" title="[% itemsloo.coins %]"></span>
478 [% END # / FOREACH itemsloop %]
480 </table> <!-- / #listcontents -->
481 </div><!-- / .searchresults -->
483 [% IF ( pagination_bar ) %]
484 <div class="pages">[% pagination_bar %]</div>
488 <div id="toolbar" class="toolbar clearfix">
489 <div class="list-actions">
490 <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep"></span>
491 [% IF can_manage_shelf %]
492 <span class="sep">|</span>
493 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
494 <input type="hidden" name="op" value="edit_form" />
495 <input type="hidden" name="category" value="category" />
496 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
497 <input type="submit" class="editshelf" value="Edit list" />
500 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
501 <input type="hidden" name="op" value="delete" />
502 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]"/>
503 <input type="hidden" name="category" value="category" />
504 <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
507 </div> <!-- / .list-actions -->
508 </div> <!-- / #toolbar -->
510 <div class="alert alert-info">
512 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
513 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
516 [% END # / IF itemsloop %]
519 [% IF itemsloop && can_remove_biblios %]
520 <input type="hidden" name="op" value="remove_biblios" />
521 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
522 <input type="hidden" name="modifyshelfcontents" value="1" />
523 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
525 [% ELSIF !itemsloop && can_manage_shelf %]
526 <form method="post" action="opac-shelves.pl">
527 <input type="hidden" name="op" value="delete" />
528 <input type="hidden" name="referer" value="list" />
529 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]"/>
530 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
534 [% IF op == 'add_form' OR op == 'edit_form' %]
535 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
536 <fieldset class="rows">
537 [% IF op == 'add_form' %]
539 <legend>Create a new list</legend>
540 <input type="hidden" name="op" value="add" />
542 <legend>Editing <em>[% shelf.shelfname %]</em></legend>
543 <input type="hidden" name="op" value="edit" />
544 <input type="hidden" name="referer" value="[% referer %]" />
545 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" />
547 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber %]" />
550 <label class="required" for="shelfname">List name: </label>
551 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname %]" /></li>
553 <label for="sortfield" >Sort this list by: </label>
554 <select name="sortfield" id="sortfield">
555 [% IF shelf.sortfield == "title" %]
556 <option value="title" selected="selected">Title</option>
558 <option value="title">Title</option>
560 [% IF shelf.sortfield == "author" %]
561 <option value="author" selected="selected">Author</option>
563 <option value="author">Author</option>
565 [% IF shelf.sortfield == "copyrightdate" %]
566 <option value="copyrightdate" selected="selected">Year</option>
568 <option value="copyrightdate">Year</option>
570 [% IF shelf.sortfield == "itemcallnumber" %]
571 <option value="itemcallnumber" selected="selected">Call number</option>
573 <option value="itemcallnumber">Call number</option>
577 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
579 <label for="category">Category:</label>
580 <select name="category" id="category">
581 [% IF shelf.category == PRIVATE %]
582 <option value="1" selected="selected">Private</option>
584 <option value="1">Private</option>
586 [% IF shelf.category == PUBLIC %]
587 <option value="2" selected="selected">Public</option>
589 <option value="2">Public</option>
592 [% IF shelf.category == PUBLIC AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
593 <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>
596 [% INCLUDE list_permissions %]
599 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
600 <input type="hidden" name="category" value="[% PRIVATE %]" />
604 <fieldset class="action">
605 <input type="submit" onclick="Check(this.form); return false;" value="Save" class="btn" />
606 [% IF referer == 'view' %]
607 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]" class="cancel">Cancel</a>
609 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE %]" class="cancel">Cancel</a>
615 [% ELSIF op == 'list' %]
617 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
618 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
619 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
620 [% IF category == PRIVATE %]
621 <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 %]">Your lists</a></li>
623 <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 %]">Your lists</a></li>
626 [% IF category == PUBLIC %]
627 <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 %]">Public lists</a></li>
629 <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 %]">Public lists</a></li>
633 [% IF category == PRIVATE %]
634 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
636 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
639 [% IF loggedinusername %]
640 <div id="toolbar" class="toolbar"><a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a></div>
642 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
643 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
647 [% IF shelves.count %]
648 <table class="table">
658 [% FOREACH s IN shelves %]
659 [% SET contents = s.get_contents %]
661 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber %]">[% s.shelfname %]</a></td>
662 <td>[% IF contents.count %][% contents.count %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
664 [% IF s.category == PRIVATE %]
665 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
671 [% IF s.can_be_managed( loggedinusernumber ) %]
672 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline">
673 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber %]" />
674 <input type="hidden" name="category" value="[% s.category %]" />
675 <input type="hidden" name="op" value="edit_form" />
676 <input type="hidden" name="referer" value="list" />
677 <input type="submit" class="editshelf" value="Edit" />
680 [% IF s.can_be_deleted( loggedinusernumber ) %]
681 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
682 <input type="hidden" name="op" value="delete" />
683 <input type="hidden" name="referer" value="list" />
684 <input type='hidden' name='category' value='[% category %]' />
685 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber %]" />
686 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
689 [% IF s.category == PRIVATE AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
690 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber %]" class="">Share</a>
692 [% IF s.is_shared_with( loggedinusernumber ) %]
693 <form action="opac-shelves.pl" method="post" class="form-inline">
694 <input type="hidden" name="op" value="remove_share" />
695 <input type="hidden" name="referer" value="list" />
696 <input type='hidden' name='category' value='[% category %]' />
697 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber %]" />
698 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
706 <div class="pages">[% pagination_bar %]</div>
708 [% IF category == PUBLIC %]
709 <p>No public lists.</p>
710 [% ELSIF loggedinusernumber %]
711 <p>No private lists.</p>
714 <div> [%# privateshelves or publicshelves %]
715 </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
716 [% ELSIF NOT loggedinusernumber %]
717 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
718 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
720 [% END # IF loggedinusername %]
721 </div> <!-- / #usershelves -->
722 </div> <!-- / .span10/12 -->
723 </div> <!-- / .row-fluid -->
724 </div> <!-- / .container-fluid -->
725 </div> <!-- / .main -->
727 <div class="modal hide" id="modalWin" role="dialog" aria-hidden="true" tabindex="-1">
728 <div class="modal-content">
729 <div class="modal-body">
730 <div style="margin:1em;padding:1em;font-size:150%;">
731 <img src="[% interface %]/[% theme %]/images/loading.gif" /> Loading
738 <div id="debug"></div>
741 [% INCLUDE 'opac-bottom.inc' %]
742 [% BLOCK jsinclude %]
743 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
744 <script type="text/javascript">
746 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
747 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
748 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
749 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
751 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
752 function holdSelections() {
753 var checkedBoxes = $("input:checkbox:checked");
754 if ($(checkedBoxes).size() == 0) {
755 alert(MSG_NO_RECORD_SELECTED);
758 $(checkedBoxes).each(function(){
759 var name = $(this).attr("name");
760 bib = name.substr(4);
763 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
767 [% IF ( TagsInputEnabled && loggedinusername ) %]
768 function tagSelected() {
769 var checkedBoxes = $("input:checkbox:checked");
770 if ($(checkedBoxes).size()) {
771 $("#tagsel_tag").hide();
772 $(".tag_hides").hide();
773 $("#tagsel_form").show();
775 alert(MSG_NO_RECORD_SELECTED);
779 function tagCanceled() {
780 $("#tagsel_form").hide();
781 $("#tagsel_tag").show();
782 $(".tag_hides").show();
783 $("#tagsel_new").val("");
784 $(".tagstatus").empty().hide();
787 function tagAdded() {
788 var checkedBoxes = $("input:checkbox:checked");
789 if (!$(checkedBoxes).size()) {
790 alert(MSG_NO_RECORD_SELECTED);
794 var tag = $("#tagsel_new").val();
795 if (!tag || (tag == "")) {
796 alert(MSG_NO_TAG_SPECIFIED);
801 for (var i = 0; i < $(checkedBoxes).size(); i++) {
802 var box = $(checkedBoxes).get(i);
803 bibs[i] = $(box).val();
806 KOHA.Tags.add_multitags_button(bibs, tag);
811 function enableCheckboxActions(){
812 // Enable/disable controls if checkboxes are checked
813 var checkedBoxes = $(".checkboxed input:checkbox:checked");
814 if ($(checkedBoxes).size()) {
815 $("#selections").html(_("With selected titles: "));
816 $("#selections-toolbar .links a").removeClass("disabled");
818 $("#selections").html(_("Select titles to: "));
819 $("#selections-toolbar .links a").addClass("disabled");
824 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
825 $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
826 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
829 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
830 $("#placehold").html("<a href=\"#\" class=\"hold tag_hides disabled\">"+_("Place hold")+"<\/a>");
831 $("#selections-toolbar a.hold").click(function(){
837 // If JS is enabled add parameter to download link
838 var dialoglink = $(".download").attr("href");
839 dialoglink += "&context=modal";
840 $(".download").attr("href",dialoglink);
842 $("#CheckAll").click(function(){
843 $(".checkboxed").checkCheckboxes();
844 enableCheckboxActions();
847 $("#CheckNone").click(function(){
848 $(".checkboxed").unCheckCheckboxes();
849 enableCheckboxActions();
853 $(".cb").click(function(){
854 enableCheckboxActions();
856 enableCheckboxActions();
858 [% IF ( TagsInputEnabled && loggedinusername ) %]
859 var tagAdd = $(".tag_add");
860 tagAdd.removeClass("hidden");
861 $("#tagsel_tag").click(function(){
865 $("#tagsel_cancel").click(function(){
869 $("#tagsel_button").click(function(){
874 tagAdd.click(function(){
875 var thisid = $(this).attr("id");
876 thisid = thisid.replace("tag_add","");
878 $("#tagform"+thisid).show();
879 $("#newtag"+thisid).focus();
880 $("#newtag"+thisid+"_status").empty().hide();
883 $(".cancel_tag_add").click(function(){
884 var thisid = $(this).attr("id");
885 thisid = thisid.replace("cancel","");
886 $("#tagform"+thisid).hide();
887 $("#tag_add"+thisid).show();
888 $("#newtag"+thisid).val("");
889 $("#newtag"+thisid+"_status").empty().hide();
892 $(".tagbutton").click(function(){
893 var thisid = $(this).attr("title");
894 var tag = $("#newtag"+thisid).val();
895 if (!tag || (tag == "")) {
896 alert(MSG_NO_TAG_SPECIFIED);
899 KOHA.Tags.add_tag_button(thisid, tag);
904 [% IF loggedinusername && can_remove_biblios %]
905 $(".removefromlist").on("click", function(e){
906 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
909 $("#myform").submit(function(){
910 var checkedBoxes = $(".checkboxed input:checkbox:checked");
911 var numchecked = $(checkedBoxes).size();
913 if( numchecked > 1 ){
914 return confirmDelete(MSG_REMOVE_FROM_LIST);
916 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
919 alert(MSG_NO_RECORD_SELECTED);
923 $("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Remove from list")+"</a>")
925 $("#myform").submit();
929 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
930 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
931 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
932 $('#sort-submit').hide();
936 setTimeout('window.close()', 1);
938 }); // document.ready
944 if(f.addshelf.value.length ==0){
945 _alertString += _("- You must enter a list name") + "\n";
948 if (_alertString.length==0) {
951 alertString2 = _("Form not submitted because of the following problem(s)");
952 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
953 alertString2 += _alertString;