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 |html %][% 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_changes_from">Allow changes to contents from: </label>
16 <select name="allow_changes_from" id="allow_changes_from">
17 [% IF !shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
18 [% IF shelf.allow_change_from_owner && !shelf.allow_change_from_others %]<option value="1" selected="selected">Owner only</option>[% ELSE %]<option value="1">Owner only</option>[% END %]
19 [% IF shelf.allow_change_from_owner && 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 %]
24 [% INCLUDE 'masthead.inc' %]
26 <ul class="breadcrumb noprint">
27 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
28 [% IF ( loggedinusername ) %]
29 <li><a href="/cgi-bin/koha/opac-user.pl">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</a> <span class="divider">›</span></li>
33 <li><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a></li>
38 [% IF shelf and shelf.is_private %]
39 [% IF op == 'view' OR op == 'edit_form' %]
40 <li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE %]">Your lists</a></li>
42 <li><span class="divider">›</span> Your lists</li>
44 [% ELSIF shelf AND shelf.is_public %]
46 <li><span class="divider">›</span> <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PUBLIC %]">Public lists</a></li>
48 <li><span class="divider">›</span> Public lists</li>
53 <li><span class="divider">›</span> Contents of <i>[% shelf.shelfname | html %]</i></li>
56 [% IF op == 'add_form' %]
57 <li><span class="divider">›</span> Create new list</li>
60 [% IF op == 'edit_form' %]
61 <li><span class="divider">›</span> Edit list <i>[% shelf.shelfname | html %]</i></li>
64 </ul> <!-- / .breadcrumb -->
66 <div class="container-fluid">
67 <div class="row-fluid">
68 [% IF ( OpacNav||loggedinusername ) && !print %]
71 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
76 [% IF ( OpacNav||loggedinusername ) %]
81 <div id="usershelves" class="maincontent">
83 [% FOR m IN messages %]
86 <div class="alert alert-success" role="alert">
88 <div class="alert alert-danger" role="alert">
91 [% CASE 'error_on_update' %]
92 <span>An error occurred when updating this list.</span>
93 [% CASE 'error_on_insert' %]
94 <span>An error occurred when creating this list.</span>
95 [% CASE 'error_on_delete' %]
96 <span>An error occurred when deleting this list.</span>
97 [% CASE 'error_on_add_biblio' %]
98 <span>The item has not been added to the list. Please check it's not already in the list.</span>
99 [% CASE 'error_on_remove_share' %]
100 <span>The share has not been removed.</span>
101 [% CASE 'success_on_update' %]
102 <span>List updated.</span>
103 [% CASE 'success_on_insert' %]
104 <span>List created.</span>
105 [% CASE 'success_on_delete' %]
106 <span>List deleted.</span>
107 [% CASE 'success_on_add_biblio' %]
108 <span>The item has been added to the list.</span>
109 [% CASE 'success_on_remove_biblios' %]
110 <span>The item has been removed from the list.</span>
111 [% CASE 'success_on_remove_share' %]
112 <span>The share has been removed.</span>
113 [% CASE 'does_not_exist' %]
114 <span>This list does not exist.</span>
115 [% CASE 'item_does_not_exist' %]
116 <span>This item does not exist.</span>
117 [% CASE 'unauthorized_on_view' %]
118 <span>You do not have permission to view this list.</span>
119 [% CASE 'unauthorized_on_insert' %]
120 <span>You do not have permission to create a new list.</span>
121 [% CASE 'unauthorized_on_update' %]
122 <span>You do not have permission to update this list.</span>
123 [% CASE 'unauthorized_on_delete' %]
124 <span>You do not have permission to delete this list.</span>
125 [% CASE 'unauthorized_on_add_biblio' %]
126 <span>You do not have permission to add a record to this list.</span>
127 [% CASE 'no_biblio_removed' %]
128 <span>No record was removed.</span>
129 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
130 <span>An error occurred when creating the list. The name [% shelfname %] already exists.</span>
131 [% CASE 'DBIx::Class::Exception' %]
140 [% IF shelf AND op == 'view' %]
142 [% shelf.shelfname |html %]
143 <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-shelves.pl?rss=1&op=view&shelfnumber=[% shelf.shelfnumber %]" class="rss-list-link noprint">
144 <img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this list" title="Subscribe to this list" border="0" class="rsssearchicon"/>
148 [% IF ( itemsloop ) %]
149 <div id="toolbar" class="toolbar clearfix">
150 <div class="list-actions">
151 <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep">|</span>
152 <a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | html %]" class="download" data-toggle="modal" data-target="#modalWin">Download list</a>
154 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
155 <span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelf.shelfnumber | html %]" 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>
158 <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>
160 [% IF can_manage_shelf %]
161 <span class="sep">|</span>
162 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
163 <input type="hidden" name="op" value="edit_form" />
164 <input type="hidden" name="referer" value="view" />
165 <input type='hidden' name='category' value='[% category %]' />
166 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
167 <input type="submit" class="editshelf" value="Edit list" />
170 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
171 <input type="hidden" name="op" value="delete" />
172 <input type="hidden" name="referer" value="list" />
173 <input type='hidden' name='category' value='[% category %]' />
174 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
175 <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
177 [% IF category == PRIVATE && Koha.Preference('OpacAllowSharingPrivateLists') %]
178 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% shelf.shelfnumber | html %]" class="">Share list</a>
180 [% ELSIF category == PRIVATE # not manageshelf and private means shared %]
181 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
182 <input type="hidden" name="op" value="remove_share" />
183 <input type="hidden" name="referer" value="list" />
184 <input type='hidden' name='category' value='[% category %]' />
185 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
186 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
191 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="form-inline sort_by pull-right">
192 <input type="hidden" name="op" value="view" />
193 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
195 <label for="sortfield">Sort by: </label>
196 <select name="sortfield" id="sortfield" class="resort" onchange="$('#sorting-form').submit()">
197 <option value="">Default sorting</option>
199 [% IF sortfield == 'author' %]
200 <option value="author" selected="selected">Author</option>
202 <option value="author">Author</option>
205 [% IF sortfield == 'title' %]
206 <option value="title" selected="selected">Title</option>
208 <option value="title">Title</option>
211 [% IF sortfield == 'itemcallnumber' %]
212 <option value="itemcallnumber" selected="selected">Call number</option>
214 <option value="itemcallnumber">Call number</option>
217 [% IF sortfield == 'copyrightdate' %]
218 <option value="copyrightdate" selected="selected">Copyright date</option>
220 <option value="copyrightdate">Copyright date</option>
224 <select name="direction" class="resort" onchange="$('#sorting-form').submit()">
225 [% IF direction == 'asc' %]
226 <option value="asc" selected="selected">Ascending</option>
228 <option value="asc">Ascending</option>
231 [% IF direction == 'desc' %]
232 <option value="desc" selected="selected">Descending</option>
234 <option value="desc">Descending</option>
238 <input type="submit" class="btn btn-small" id="sort-submit" value="Resort list" />
241 </div> <!-- / #toolbar -->
243 <div id="selections-toolbar" class="toolbar noprint">
244 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
246 <span id="selections">Select titles to: </span>
247 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
248 <span id="placehold"></span>
250 [% IF ( TagsInputEnabled && loggedinusername ) %]
252 <a id="tagsel_tag" href="#" class="disabled">Tag</a>
254 <span id="tagsel_form" style="display:none">
255 <label for="tagsel_new">New tag(s), separated by a comma:</label>
256 <input name="tagsel_new" id="tagsel_new" maxlength="100" />
257 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-small" title="tagsel_button" type="submit" value="Add" />
258 <a href="#" id="tagsel_cancel">Cancel</a>
261 [% IF loggedinusername && can_remove_biblios %]
262 <span id="removeitems"></span>
264 </span> <!-- / .links -->
265 </div> <!-- / #selections-toolbar -->
267 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed">
268 [% IF can_manage_shelf %]
269 <input type="hidden" name="op" value="remove_biblios" />
270 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
272 <div class="searchresults">
273 <table id="listcontents" class="table">
275 [% FOREACH itemsloo IN itemsloop %]
277 <td class="select selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber %]" /></td>
278 [% UNLESS ( item_level_itypes ) %]
280 [% UNLESS ( noItemTypeImages ) %]
281 <img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />
283 [% itemsloo.description %]
287 <div class="coverimages">
288 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber %]">
289 [% IF ( OPACLocalCoverImages ) %]
290 <span title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>
293 [% IF ( OPACAmazonCoverImages ) %]
294 [% IF ( itemsloo.normalized_isbn ) %]
295 <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>
297 <span class="no-image">No cover image available</span>
301 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
302 [% IF ( using_https ) %]
303 <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>
305 <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>
309 [% IF ( GoogleJackets ) %]
310 [% IF ( itemsloo.normalized_isbn ) %]
311 <div title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
313 <span class="no-image">No cover image available</span>
317 [% IF OpenLibraryCovers %]
318 [% IF itemsloo.normalized_isbn %]
319 <span title="[% itemsloo.biblionumber %]" class="[% itemsloo.normalized_isbn %]" id="openlibrary-thumbnail[% loop.count %]"></span>
321 <span class="no-image">No cover image available</span>
326 [% IF ( BakerTaylorEnabled ) %]
327 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
329 <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a>
331 <span class="no-image">No cover image available</span>
335 [% IF ( itemsloo.XSLTBloc ) %]
336 [% itemsloo.XSLTBloc %]
339 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
340 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
342 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
343 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
345 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
349 [% IF ( itemsloo.title ) %]
350 [% itemsloo.title |html %]
355 [% FOREACH subtitl IN itemsloo.subtitle %]
356 [% subtitl.subfield|html %]
360 [% IF ( itemsloo.author ) %]
361 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>
366 <span class="results_summary">
367 <span class="label">Publication:</span>
368 [% IF ( itemsloo.place ) %]
371 [% IF ( itemsloo.publishercode ) %]
372 [% itemsloo.publishercode|html %]
374 [% IF ( itemsloo.publicationyear ) %]
375 [% itemsloo.publicationyear %]
377 [% IF ( itemsloo.copyrightdate ) %]
378 [% itemsloo.copyrightdate %]
381 [% IF ( itemsloo.pages ) %]. [% itemsloo.pages %][% END %]
382 [% IF ( itemsloo.notes ) %], [% itemsloo.notes|html %][% END %]
383 [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') %][% END %]
385 <span class="results_summary">
386 <span class="label">Holdings:</span>
387 [% IF ( itemsloo.ITEM_RESULTS ) %]
388 [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
389 [% ITEM_RESULT.homebranch %]
390 [% IF ( ITEM_RESULT.location_opac ) %]
391 , [% ITEM_RESULT.location_opac %]
393 [% IF ( ITEM_RESULT.itemcallnumber ) %]
394 ([% ITEM_RESULT.itemcallnumber %])
395 [% IF ( loop.last ) %].[% ELSE %],[% END %]
399 This record has no items.
402 [% END # / IF itemsloo.XSLTBloc %]
404 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
405 <div class="results_summary tags">
406 <span class="label">Tags:</span>
408 [% FOREACH TagLoo IN itemsloo.TagLoop %]
409 <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>
415 <span class="results_summary">
417 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
418 [% UNLESS ( itemsloo.norequests ) %]
419 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
420 [% IF ( itemsloo.allow_onshelf_holds ) %]
421 <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>
423 [% IF ( itemsloo.itemsissued ) %]
424 <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>
427 [% END # / IF opacuserlogin %]
428 [% END # / UNLESS itemsloo.norequests %]
429 [% END # / RequestOnOpac %]
431 [% IF ( TagsInputEnabled ) %]
432 [% IF ( loggedinusername ) %]
433 <span class="actions"><a class="tag_add hidden" id="tag_add[% itemsloo.biblionumber %]" href="#">Add tag</a></span>
434 <div id="tagform[% itemsloo.biblionumber %]" class="tag_results_input" style="display:none;">
435 <label for="newtag[% itemsloo.biblionumber %]">New tag(s), separated by a comma:</label>
436 <input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" />
437 <input name="tagbutton" class="tagbutton btn btn-small" title="[% itemsloo.biblionumber %]" type="submit" value="Add" />
438 <a class="cancel_tag_add" id="cancel[% itemsloo.biblionumber %]" href="#">(done)</a>
440 <div id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">
443 [% ELSIF ( loop.first ) %]
444 <span class="tagstatus" id="login4tags">Log in to add tags.</span>
445 [% END # / IF loggedinusername %]
446 [% END # / IF TagsInputEnabled %]
448 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
449 <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>
452 [% IF can_remove_biblios %]
453 <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>
456 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
457 [% IF ( itemsloo.incart ) %]
458 <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>
460 <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>
462 [% END # / IF opacbookbag %]
463 </span> <!-- / .results_summary .actions -->
465 <!-- COinS / Openurl -->
466 <span class="Z3988" title="[% itemsloo.coins %]"></span>
469 [% END # / FOREACH itemsloop %]
471 </table> <!-- / #listcontents -->
472 </div><!-- / .searchresults -->
474 [% IF ( pagination_bar ) %]
475 <div class="pages">[% pagination_bar %]</div>
479 <div id="toolbar" class="toolbar clearfix">
480 <div class="list-actions">
481 <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep"></span>
482 [% IF can_manage_shelf %]
483 <span class="sep">|</span>
484 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
485 <input type="hidden" name="op" value="edit_form" />
486 <input type="hidden" name="referer" value="view" />
487 <input type="hidden" name="category" value="category" />
488 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
489 <input type="submit" class="editshelf" value="Edit list" />
492 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
493 <input type="hidden" name="op" value="delete" />
494 <input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]"/>
495 <input type="hidden" name="category" value="category" />
496 <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
499 </div> <!-- / .list-actions -->
500 </div> <!-- / #toolbar -->
502 <div class="alert alert-info">
504 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
505 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
508 [% END # / IF itemsloop %]
511 [% IF itemsloop && can_remove_biblios %]
512 <input type="hidden" name="op" value="remove_biblios" />
513 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
514 <input type="hidden" name="modifyshelfcontents" value="1" />
515 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
517 [% ELSIF !itemsloop && can_manage_shelf %]
518 <form method="post" action="opac-shelves.pl">
519 <input type="hidden" name="op" value="delete" />
520 <input type="hidden" name="referer" value="list" />
521 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
522 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
526 [% IF op == 'add_form' OR op == 'edit_form' %]
527 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
528 <fieldset class="rows">
529 [% IF op == 'add_form' %]
531 <legend>Create a new list</legend>
532 <input type="hidden" name="op" value="add" />
534 <legend>Editing <em>[% shelf.shelfname |html %]</em></legend>
535 <input type="hidden" name="op" value="edit" />
536 <input type="hidden" name="referer" value="[% referer | html %]" />
537 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
539 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber %]" />
542 <label class="required" for="shelfname">List name: </label>
543 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname |html %]" /></li>
545 <label for="sortfield" >Sort this list by: </label>
546 <select name="sortfield" id="sortfield">
547 [% IF shelf.sortfield == "title" %]
548 <option value="title" selected="selected">Title</option>
550 <option value="title">Title</option>
552 [% IF shelf.sortfield == "author" %]
553 <option value="author" selected="selected">Author</option>
555 <option value="author">Author</option>
557 [% IF shelf.sortfield == "copyrightdate" %]
558 <option value="copyrightdate" selected="selected">Year</option>
560 <option value="copyrightdate">Year</option>
562 [% IF shelf.sortfield == "itemcallnumber" %]
563 <option value="itemcallnumber" selected="selected">Call number</option>
565 <option value="itemcallnumber">Call number</option>
569 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
571 <label for="category">Category:</label>
572 <select name="category" id="category">
573 [% IF shelf.is_private %]
574 <option value="1" selected="selected">Private</option>
576 <option value="1">Private</option>
578 [% IF shelf.is_public %]
579 <option value="2" selected="selected">Public</option>
581 <option value="2">Public</option>
584 [% IF shelf.is_public AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
585 <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>
589 [% INCLUDE list_permissions %]
591 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
592 <input type="hidden" name="category" value="[% PRIVATE %]" />
596 <fieldset class="action">
597 <input type="submit" onclick="Check(this.form); return false;" value="Save" class="btn" />
598 [% IF referer == 'view' %]
599 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]" class="cancel">Cancel</a>
601 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE %]" class="cancel">Cancel</a>
607 [% ELSIF op == 'list' %]
609 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
610 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
611 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
612 [% IF category == PRIVATE %]
613 <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>
615 <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>
618 [% IF category == PUBLIC %]
619 <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>
621 <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>
625 [% IF category == PRIVATE %]
626 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
628 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
631 [% IF loggedinusername %]
632 <div id="toolbar" class="toolbar"><a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a></div>
634 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
635 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
639 [% IF shelves.count %]
640 <table class="table">
650 [% FOREACH s IN shelves %]
651 [% SET contents = s.get_contents %]
653 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber %]">[% s.shelfname |html %]</a></td>
654 <td>[% IF contents.count %][% contents.count %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
656 [% IF s.is_private %]
657 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
663 [% IF s.can_be_managed( loggedinusernumber ) %]
664 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline">
665 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber |html %]" />
666 <input type="hidden" name="category" value="[% s.category %]" />
667 <input type="hidden" name="op" value="edit_form" />
668 <input type="hidden" name="referer" value="list" />
669 <input type="submit" class="editshelf" value="Edit" />
672 [% IF s.can_be_deleted( loggedinusernumber ) %]
673 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
674 <input type="hidden" name="op" value="delete" />
675 <input type="hidden" name="referer" value="list" />
676 <input type='hidden' name='category' value='[% category %]' />
677 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
678 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
681 [% IF s.is_private AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
682 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber |html %]" class="">Share</a>
684 [% IF s.is_shared_with( loggedinusernumber ) %]
685 <form action="opac-shelves.pl" method="post" class="form-inline">
686 <input type="hidden" name="op" value="remove_share" />
687 <input type="hidden" name="referer" value="list" />
688 <input type='hidden' name='category' value='[% category %]' />
689 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
690 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
698 <div class="pages">[% pagination_bar %]</div>
700 [% IF category == PUBLIC %]
701 <p>No public lists.</p>
702 [% ELSIF loggedinusernumber %]
703 <p>No private lists.</p>
706 <div> [%# privateshelves or publicshelves %]
707 </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
708 [% ELSIF NOT loggedinusernumber %]
709 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
710 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
712 [% END # IF loggedinusername %]
713 </div> <!-- / #usershelves -->
714 </div> <!-- / .span10/12 -->
715 </div> <!-- / .row-fluid -->
716 </div> <!-- / .container-fluid -->
717 </div> <!-- / .main -->
719 <div class="modal hide" id="modalWin" role="dialog" aria-hidden="true" tabindex="-1">
720 <div class="modal-content">
721 <div class="modal-body">
722 <div style="margin:1em;padding:1em;font-size:150%;">
723 <img src="[% interface %]/[% theme %]/images/loading.gif" /> Loading
730 <div id="debug"></div>
733 [% INCLUDE 'opac-bottom.inc' %]
734 [% BLOCK jsinclude %]
735 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
736 <script type="text/javascript">
738 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
739 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
740 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
741 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
743 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
744 function holdSelections() {
745 var checkedBoxes = $("input:checkbox:checked");
746 if ($(checkedBoxes).size() == 0) {
747 alert(MSG_NO_RECORD_SELECTED);
750 $(checkedBoxes).each(function(){
751 bibs += $(this).val() + "/";
753 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
757 [% IF ( TagsInputEnabled && loggedinusername ) %]
758 function tagSelected() {
759 var checkedBoxes = $("input:checkbox:checked");
760 if ($(checkedBoxes).size()) {
761 $("#tagsel_tag").hide();
762 $(".tag_hides").hide();
763 $("#tagsel_form").show();
765 alert(MSG_NO_RECORD_SELECTED);
769 function tagCanceled() {
770 $("#tagsel_form").hide();
771 $("#tagsel_tag").show();
772 $(".tag_hides").show();
773 $("#tagsel_new").val("");
774 $(".tagstatus").empty().hide();
777 function tagAdded() {
778 var checkedBoxes = $("input:checkbox:checked");
779 if (!$(checkedBoxes).size()) {
780 alert(MSG_NO_RECORD_SELECTED);
784 var tag = $("#tagsel_new").val();
785 if (!tag || (tag == "")) {
786 alert(MSG_NO_TAG_SPECIFIED);
791 for (var i = 0; i < $(checkedBoxes).size(); i++) {
792 var box = $(checkedBoxes).get(i);
793 bibs[i] = $(box).val();
796 KOHA.Tags.add_multitags_button(bibs, tag);
801 function enableCheckboxActions(){
802 // Enable/disable controls if checkboxes are checked
803 var checkedBoxes = $(".checkboxed input:checkbox:checked");
804 if ($(checkedBoxes).size()) {
805 $("#selections").html(_("With selected titles: "));
806 $("#selections-toolbar .links a").removeClass("disabled");
808 $("#selections").html(_("Select titles to: "));
809 $("#selections-toolbar .links a").addClass("disabled");
814 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
815 $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
816 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
819 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
820 $("#placehold").html("<a href=\"#\" class=\"hold tag_hides disabled\">"+_("Place hold")+"<\/a>");
821 $("#selections-toolbar a.hold").click(function(){
827 // If JS is enabled add parameter to download link
828 var dialoglink = $(".download").attr("href");
829 dialoglink += "&context=modal";
830 $(".download").attr("href",dialoglink);
832 $("#CheckAll").click(function(){
833 $(".checkboxed").checkCheckboxes();
834 enableCheckboxActions();
837 $("#CheckNone").click(function(){
838 $(".checkboxed").unCheckCheckboxes();
839 enableCheckboxActions();
843 $(".cb").click(function(){
844 enableCheckboxActions();
846 enableCheckboxActions();
848 [% IF ( TagsInputEnabled && loggedinusername ) %]
849 var tagAdd = $(".tag_add");
850 tagAdd.removeClass("hidden");
851 $("#tagsel_tag").click(function(){
855 $("#tagsel_cancel").click(function(){
859 $("#tagsel_button").click(function(){
864 tagAdd.click(function(){
865 var thisid = $(this).attr("id");
866 thisid = thisid.replace("tag_add","");
868 $("#tagform"+thisid).show();
869 $("#newtag"+thisid).focus();
870 $("#newtag"+thisid+"_status").empty().hide();
873 $(".cancel_tag_add").click(function(){
874 var thisid = $(this).attr("id");
875 thisid = thisid.replace("cancel","");
876 $("#tagform"+thisid).hide();
877 $("#tag_add"+thisid).show();
878 $("#newtag"+thisid).val("");
879 $("#newtag"+thisid+"_status").empty().hide();
882 $(".tagbutton").click(function(){
883 var thisid = $(this).attr("title");
884 var tag = $("#newtag"+thisid).val();
885 if (!tag || (tag == "")) {
886 alert(MSG_NO_TAG_SPECIFIED);
889 KOHA.Tags.add_tag_button(thisid, tag);
894 [% IF loggedinusername && can_remove_biblios %]
895 $(".removefromlist").on("click", function(e){
896 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
899 $("#myform").submit(function(){
900 var checkedBoxes = $(".checkboxed input:checkbox:checked");
901 var numchecked = $(checkedBoxes).size();
903 if( numchecked > 1 ){
904 return confirmDelete(MSG_REMOVE_FROM_LIST);
906 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
909 alert(MSG_NO_RECORD_SELECTED);
913 $("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Remove from list")+"</a>")
915 $("#myform").submit();
919 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
920 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
921 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
922 $('#sort-submit').hide();
926 setTimeout('window.close()', 1);
928 }); // document.ready
934 if(f.addshelf.value.length ==0){
935 _alertString += _("- You must enter a list name") + "\n";
938 if (_alertString.length==0) {
941 alertString2 = _("Form not submitted because of the following problem(s)");
942 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
943 alertString2 += _alertString;