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_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 his 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">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</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 | html %]</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 | html %]</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. Perhaps the value already exists.</span>
109 [% CASE 'error_on_insert' %]
110 <span>An error occurred when inserting this list. Perhaps the name already exists.</span>
111 [% CASE 'error_on_delete' %]
112 <span>An error occurred when deleting this list. Check the logs.</span>
113 [% CASE 'error_on_add_biblio' %]
114 <span>The item has not been added to the list. Please check it's not in this list yet.</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 with success.</span>
119 [% CASE 'success_on_insert' %]
120 <span>List inserted with success.</span>
121 [% CASE 'success_on_delete' %]
122 <span>List deleted with success.</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 insert 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 biblio to this list.</span>
143 [% CASE 'no_biblio_removed' %]
144 <span>No biblio has been removed.</span>
145 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
146 <span>An error occurred when inserting this list. The name [% shelfname %] already exists.</span>
147 [% CASE 'DBIx::Class::Exception' %]
156 [% IF op == 'view' %]
158 [% shelf.shelfname |html %]
159 <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-shelves.pl?rss=1&op=view&shelfnumber=[% shelf.shelfnumber %]" class="rss-list-link noprint">
160 <img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this list" title="Subscribe to this list" border="0" class="rsssearchicon"/>
164 [% IF ( itemsloop ) %]
165 <div id="toolbar" class="toolbar clearfix">
166 <div class="list-actions">
167 <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep">|</span>
168 <a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=[% shelf.shelfnumber | html %]" class="download" data-toggle="modal" data-target="#modalWin">Download list</a>
170 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
171 <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>
174 <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>
176 [% IF can_manage_shelf %]
177 <span class="sep">|</span>
178 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
179 <input type="hidden" name="op" value="edit_form" />
180 <input type='hidden' name='category' value='[% category %]' />
181 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
182 <input type="submit" class="editshelf" value="Edit list" />
185 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
186 <input type="hidden" name="op" value="delete" />
187 <input type='hidden' name='category' value='[% category %]' />
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 | html %]" class="">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='category' value='[% category %]' />
198 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
199 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
204 <form action="/cgi-bin/koha/opac-shelves.pl" id="sorting-form" class="form-inline sort_by pull-right">
205 <input type="hidden" name="op" value="view" />
206 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
208 <label for="sortfield">Sort by: </label>
209 <select name="sortfield" id="sortfield" class="resort" onchange="$('#sorting-form').submit()">
210 <option value="">Default sorting</option>
212 [% IF sortfield == 'author' %]
213 <option value="author" selected="selected">Author</option>
215 <option value="author">Author</option>
218 [% IF sortfield == 'title' %]
219 <option value="title" selected="selected">Title</option>
221 <option value="title">Title</option>
224 [% IF sortfield == 'itemcallnumber' %]
225 <option value="itemcallnumber" selected="selected">Call number</option>
227 <option value="itemcallnumber">Call number</option>
230 [% IF sortfield == 'copyrightdate' %]
231 <option value="copyrightdate" selected="selected">Copyright date</option>
233 <option value="copyrightdate">Copyright date</option>
237 <select name="direction" class="resort" onchange="$('#sorting-form').submit()">
238 [% IF direction == 'asc' %]
239 <option value="asc" selected="selected">Ascending</option>
241 <option value="asc">Ascending</option>
244 [% IF direction == 'desc' %]
245 <option value="desc" selected="selected">Descending</option>
247 <option value="desc">Descending</option>
251 <input type="submit" class="btn btn-small" id="sort-submit" value="Resort list" />
254 </div> <!-- / #toolbar -->
256 <div id="selections-toolbar" class="toolbar noprint">
257 <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
259 <span id="selections">Select titles to: </span>
260 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
261 <span id="placehold"></span>
263 [% IF ( TagsInputEnabled && loggedinusername ) %]
265 <a id="tagsel_tag" href="#" class="disabled">Tag</a>
267 <span id="tagsel_form" style="display:none">
268 <label for="tagsel_new">New tag(s), separated by a comma:</label>
269 <input name="tagsel_new" id="tagsel_new" maxlength="100" />
270 <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-small" title="tagsel_button" type="submit" value="Add" />
271 <a href="#" id="tagsel_cancel">Cancel</a>
274 [% IF loggedinusername && can_remove_biblios %]
275 <span id="removeitems"></span>
277 </span> <!-- / .links -->
278 </div> <!-- / #selections-toolbar -->
280 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed">
281 [% IF can_manage_shelf %]
282 <input type="hidden" name="op" value="remove_biblios" />
283 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
285 <div class="searchresults">
286 <table id="listcontents" class="table">
288 [% FOREACH itemsloo IN itemsloop %]
290 <td class="select selectcol"><input type="checkbox" class="cb" name="biblionumber" value="[% itemsloo.biblionumber %]" /></td>
291 [% UNLESS ( item_level_itypes ) %]
293 [% UNLESS ( noItemTypeImages ) %]
294 <img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />
296 [% itemsloo.description %]
300 <div class="coverimages">
301 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber %]">
302 [% IF ( OPACLocalCoverImages ) %]
303 <span title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>
306 [% IF ( OPACAmazonCoverImages ) %]
307 [% IF ( itemsloo.normalized_isbn ) %]
308 <span title="[% SEARCH_RESULT.biblionumber %]" id="amazon-thumbnail[% loop.count %]"><img src="http://images.amazon.com/images/P/[% itemsloo.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" /></span>
310 <span class="no-image">No cover image available</span>
314 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
315 [% IF ( using_https ) %]
316 <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>
318 <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>
322 [% IF ( GoogleJackets ) %]
323 [% IF ( itemsloo.normalized_isbn ) %]
324 <div title="[% itemsloo.biblionumber |url %]" class="[% itemsloo.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
326 <span class="no-image">No cover image available</span>
330 [% IF OpenLibraryCovers %]
331 [% IF itemsloo.normalized_isbn %]
332 <span title="[% itemsloo.biblionumber %]" class="[% itemsloo.normalized_isbn %]" id="openlibrary-thumbnail[% loop.count %]"></span>
334 <span class="no-image">No cover image available</span>
339 [% IF ( BakerTaylorEnabled ) %]
340 [% bt_id = ( itemsloo.normalized_upc || itemsloo.normalized_isbn ) %]
342 <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a>
344 <span class="no-image">No cover image available</span>
348 [% IF ( itemsloo.XSLTBloc ) %]
349 [% itemsloo.XSLTBloc %]
352 [% IF ( itemsloo.BiblioDefaultViewmarc ) %]
353 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
355 [% IF ( itemsloo.BiblioDefaultViewisbd ) %]
356 <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
358 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title">
362 [% IF ( itemsloo.title ) %]
363 [% itemsloo.title |html %]
368 [% FOREACH subtitl IN itemsloo.subtitle %]
369 [% subtitl.subfield|html %]
373 [% IF ( itemsloo.author ) %]
374 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>
379 <span class="results_summary">
380 <span class="label">Publication:</span>
381 [% IF ( itemsloo.place ) %]
384 [% IF ( itemsloo.publishercode ) %]
385 [% itemsloo.publishercode|html %]
387 [% IF ( itemsloo.publicationyear ) %]
388 [% itemsloo.publicationyear %]
390 [% IF ( itemsloo.copyrightdate ) %]
391 [% itemsloo.copyrightdate %]
394 [% IF ( itemsloo.pages ) %]. [% itemsloo.pages %][% END %]
395 [% IF ( itemsloo.notes ) %], [% itemsloo.notes|html %][% END %]
396 [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') %][% END %]
398 <span class="results_summary">
399 <span class="label">Holdings:</span>
400 [% IF ( itemsloo.ITEM_RESULTS ) %]
401 [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
402 [% ITEM_RESULT.homebranch %]
403 [% IF ( ITEM_RESULT.location_opac ) %]
404 , [% ITEM_RESULT.location_opac %]
406 [% IF ( ITEM_RESULT.itemcallnumber ) %]
407 ([% ITEM_RESULT.itemcallnumber %])
408 [% IF ( loop.last ) %].[% ELSE %],[% END %]
412 This record has no items.
415 [% END # / IF itemsloo.XSLTBloc %]
417 [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %]
418 <div class="results_summary tags">
419 <span class="label">Tags:</span>
421 [% FOREACH TagLoo IN itemsloo.TagLoop %]
422 <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>
428 <span class="results_summary">
430 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
431 [% UNLESS ( itemsloo.norequests ) %]
432 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
433 [% IF ( itemsloo.allow_onshelf_holds ) %]
434 <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 [% IF ( itemsloo.itemsissued ) %]
437 <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>
440 [% END # / IF opacuserlogin %]
441 [% END # / UNLESS itemsloo.norequests %]
442 [% END # / RequestOnOpac %]
444 [% IF ( TagsInputEnabled ) %]
445 [% IF ( loggedinusername ) %]
446 <span class="actions"><a class="tag_add hidden" id="tag_add[% itemsloo.biblionumber %]" href="#">Add tag</a></span>
447 <div id="tagform[% itemsloo.biblionumber %]" class="tag_results_input" style="display:none;">
448 <label for="newtag[% itemsloo.biblionumber %]">New tag(s), separated by a comma:</label>
449 <input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" />
450 <input name="tagbutton" class="tagbutton btn btn-small" title="[% itemsloo.biblionumber %]" type="submit" value="Add" />
451 <a class="cancel_tag_add" id="cancel[% itemsloo.biblionumber %]" href="#">(done)</a>
453 <div id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">
456 [% ELSIF ( loop.first ) %]
457 <span class="tagstatus" id="login4tags">Log in to add tags.</span>
458 [% END # / IF loggedinusername %]
459 [% END # / IF TagsInputEnabled %]
461 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername && ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
462 <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>
465 [% IF can_remove_biblios %]
466 <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>
469 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
470 [% IF ( itemsloo.incart ) %]
471 <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>
473 <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>
475 [% END # / IF opacbookbag %]
476 </span> <!-- / .results_summary .actions -->
478 <!-- COinS / Openurl -->
479 <span class="Z3988" title="[% itemsloo.coins %]"></span>
482 [% END # / FOREACH itemsloop %]
484 </table> <!-- / #listcontents -->
485 </div><!-- / .searchresults -->
487 [% IF ( pagination_bar ) %]
488 <div class="pages">[% pagination_bar %]</div>
492 <div id="toolbar" class="toolbar clearfix">
493 <div class="list-actions">
494 <a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a> <span class="sep"></span>
495 [% IF can_manage_shelf %]
496 <span class="sep">|</span>
497 <form method="get" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
498 <input type="hidden" name="op" value="edit_form" />
499 <input type="hidden" name="category" value="category" />
500 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
501 <input type="submit" class="editshelf" value="Edit list" />
504 <form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="form-inline">
505 <input type="hidden" name="op" value="delete" />
506 <input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]"/>
507 <input type="hidden" name="category" value="category" />
508 <input type="submit" class="deleteshelf" value="Delete list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/>
511 </div> <!-- / .list-actions -->
512 </div> <!-- / #toolbar -->
514 <div class="alert alert-info">
516 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
517 You can add to your lists from the results of any <a href="opac-main.pl">search</a>.
520 [% END # / IF itemsloop %]
523 [% IF itemsloop && can_remove_biblios %]
524 <input type="hidden" name="op" value="remove_biblios" />
525 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
526 <input type="hidden" name="modifyshelfcontents" value="1" />
527 <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
529 [% ELSIF !itemsloop && can_manage_shelf %]
530 <form method="post" action="opac-shelves.pl">
531 <input type="hidden" name="op" value="delete" />
532 <input type="hidden" name="referer" value="list" />
533 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
534 <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
538 [% IF op == 'add_form' OR op == 'edit_form' %]
539 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
540 <fieldset class="rows">
541 [% IF op == 'add_form' %]
543 <legend>Create a new list</legend>
544 <input type="hidden" name="op" value="add" />
546 <legend>Editing <em>[% shelf.shelfname |html %]</em></legend>
547 <input type="hidden" name="op" value="edit" />
548 <input type="hidden" name="referer" value="view" />
549 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
551 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber %]" />
554 <label class="required" for="shelfname">List name: </label>
555 <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname |html %]" /></li>
557 <label for="sortfield" >Sort this list by: </label>
558 <select name="sortfield" id="sortfield">
559 [% IF shelf.sortfield == "title" %]
560 <option value="title" selected="selected">Title</option>
562 <option value="title">Title</option>
564 [% IF shelf.sortfield == "author" %]
565 <option value="author" selected="selected">Author</option>
567 <option value="author">Author</option>
569 [% IF shelf.sortfield == "copyrightdate" %]
570 <option value="copyrightdate" selected="selected">Year</option>
572 <option value="copyrightdate">Year</option>
574 [% IF shelf.sortfield == "itemcallnumber" %]
575 <option value="itemcallnumber" selected="selected">Call number</option>
577 <option value="itemcallnumber">Call number</option>
581 [% IF Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
583 <label for="category">Category:</label>
584 <select name="category" id="category">
585 [% IF shelf.category == PRIVATE %]
586 <option value="1" selected="selected">Private</option>
588 <option value="1">Private</option>
590 [% IF shelf.category == PUBLIC %]
591 <option value="2" selected="selected">Public</option>
593 <option value="2">Public</option>
596 [% IF shelf.category == PUBLIC AND NOT Koha.Preference('OpacAllowPublicListCreation') %]
597 <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>
600 [% INCLUDE list_permissions %]
603 [% UNLESS Koha.Preference('OpacAllowPublicListCreation') OR category == PUBLIC %]
604 <input type="hidden" name="category" value="[% PRIVATE %]" />
608 <fieldset class="action">
609 <input type="submit" onclick="Check(this.form); return false;" value="Save" class="btn" />
610 [% IF referer == 'view' %]
611 <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]" class="cancel">Cancel</a>
613 <a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=[% PRIVATE %]" class="cancel">Cancel</a>
619 [% ELSIF op == 'list' %]
621 <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all">
622 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
623 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
624 [% IF category == PRIVATE %]
625 <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>
627 <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>
630 [% IF category == PUBLIC %]
631 <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>
633 <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>
637 [% IF category == PRIVATE %]
638 <div id="privateshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
640 <div id="publicshelves" class="ui-tabs-panel ui-widget-content ui-corner-bottom" style="display:block;">
643 [% IF loggedinusername %]
644 <div id="toolbar" class="toolbar"><a class="newshelf" href="/cgi-bin/koha/opac-shelves.pl?op=add_form">New list</a></div>
646 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
647 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
651 [% IF shelves.count %]
652 <table class="table">
662 [% FOREACH s IN shelves %]
663 [% SET contents = s.get_contents %]
665 <td><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber %]">[% s.shelfname |html %]</a></td>
666 <td>[% IF contents.count %][% contents.count %] [% IF contents.count == 1 %]item[% ELSE %]items[% END %][% ELSE %]Empty[% END %]</td>
668 [% IF s.category == PRIVATE %]
669 [% IF s.is_shared %]Shared[% ELSE %]Private[% END %]
675 [% IF s.can_be_managed( loggedinusernumber ) %]
676 <form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="form-inline">
677 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber |html %]" />
678 <input type="hidden" name="category" value="[% s.category %]" />
679 <input type="hidden" name="op" value="edit_form" />
680 <input type="hidden" name="referer" value="list" />
681 <input type="submit" class="editshelf" value="Edit" />
684 [% IF s.can_be_deleted( loggedinusernumber ) %]
685 <form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="form-inline">
686 <input type="hidden" name="op" value="delete" />
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_DELETE_LIST);" value="Delete" />
693 [% IF s.category == PRIVATE AND s.can_be_managed( loggedinusernumber ) AND Koha.Preference('OpacAllowSharingPrivateLists') %]
694 <a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber |html %]" class="">Share</a>
696 [% IF s.is_shared_with( loggedinusernumber ) %]
697 <form action="opac-shelves.pl" method="post" class="form-inline">
698 <input type="hidden" name="op" value="remove_share" />
699 <input type="hidden" name="referer" value="list" />
700 <input type='hidden' name='category' value='[% category %]' />
701 <input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
702 <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_REMOVE_SHARE);" value="Remove share" />
710 <div class="pages">[% pagination_bar %]</div>
712 [% IF category == PUBLIC %]
713 <p>No public lists.</p>
714 [% ELSIF loggedinusernumber %]
715 <p>No private lists.</p>
718 <div> [%# privateshelves or publicshelves %]
719 </div> [%# <div class="toptabs ui-tabs ui-widget ui-widget-content ui-corner-all"> %]
720 [% ELSIF NOT loggedinusernumber %]
721 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
722 <div class="alert alert-info"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to create new lists.</div>
724 [% END # IF loggedinusername %]
725 </div> <!-- / #usershelves -->
726 </div> <!-- / .span10/12 -->
727 </div> <!-- / .row-fluid -->
728 </div> <!-- / .container-fluid -->
729 </div> <!-- / .main -->
731 <div class="modal hide" id="modalWin" role="dialog" aria-hidden="true" tabindex="-1">
732 <div class="modal-content">
733 <div class="modal-body">
734 <div style="margin:1em;padding:1em;font-size:150%;">
735 <img src="[% interface %]/[% theme %]/images/loading.gif" /> Loading
742 <div id="debug"></div>
745 [% INCLUDE 'opac-bottom.inc' %]
746 [% BLOCK jsinclude %]
747 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
748 <script type="text/javascript">
750 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
751 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from the list?");
752 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
753 var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
755 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
756 function holdSelections() {
757 var checkedBoxes = $("input:checkbox:checked");
758 if ($(checkedBoxes).size() == 0) {
759 alert(MSG_NO_RECORD_SELECTED);
762 $(checkedBoxes).each(function(){
763 var name = $(this).attr("name");
764 bib = name.substr(4);
767 document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
771 [% IF ( TagsInputEnabled && loggedinusername ) %]
772 function tagSelected() {
773 var checkedBoxes = $("input:checkbox:checked");
774 if ($(checkedBoxes).size()) {
775 $("#tagsel_tag").hide();
776 $(".tag_hides").hide();
777 $("#tagsel_form").show();
779 alert(MSG_NO_RECORD_SELECTED);
783 function tagCanceled() {
784 $("#tagsel_form").hide();
785 $("#tagsel_tag").show();
786 $(".tag_hides").show();
787 $("#tagsel_new").val("");
788 $(".tagstatus").empty().hide();
791 function tagAdded() {
792 var checkedBoxes = $("input:checkbox:checked");
793 if (!$(checkedBoxes).size()) {
794 alert(MSG_NO_RECORD_SELECTED);
798 var tag = $("#tagsel_new").val();
799 if (!tag || (tag == "")) {
800 alert(MSG_NO_TAG_SPECIFIED);
805 for (var i = 0; i < $(checkedBoxes).size(); i++) {
806 var box = $(checkedBoxes).get(i);
807 bibs[i] = $(box).val();
810 KOHA.Tags.add_multitags_button(bibs, tag);
815 function enableCheckboxActions(){
816 // Enable/disable controls if checkboxes are checked
817 var checkedBoxes = $(".checkboxed input:checkbox:checked");
818 if ($(checkedBoxes).size()) {
819 $("#selections").html(_("With selected titles: "));
820 $("#selections-toolbar .links a").removeClass("disabled");
822 $("#selections").html(_("Select titles to: "));
823 $("#selections-toolbar .links a").addClass("disabled");
828 [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
829 $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
830 $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
833 [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
834 $("#placehold").html("<a href=\"#\" class=\"hold tag_hides disabled\">"+_("Place hold")+"<\/a>");
835 $("#selections-toolbar a.hold").click(function(){
841 // If JS is enabled add paramter to download link
842 var dialoglink = $(".download").attr("href");
843 dialoglink += "&context=modal";
844 $(".download").attr("href",dialoglink);
846 $("#CheckAll").click(function(){
847 $(".checkboxed").checkCheckboxes();
848 enableCheckboxActions();
851 $("#CheckNone").click(function(){
852 $(".checkboxed").unCheckCheckboxes();
853 enableCheckboxActions();
857 $(".cb").click(function(){
858 enableCheckboxActions();
860 enableCheckboxActions();
862 [% IF ( TagsInputEnabled && loggedinusername ) %]
863 var tagAdd = $(".tag_add");
864 tagAdd.removeClass("hidden");
865 $("#tagsel_tag").click(function(){
869 $("#tagsel_cancel").click(function(){
873 $("#tagsel_button").click(function(){
878 tagAdd.click(function(){
879 var thisid = $(this).attr("id");
880 thisid = thisid.replace("tag_add","");
882 $("#tagform"+thisid).show();
883 $("#newtag"+thisid).focus();
884 $("#newtag"+thisid+"_status").empty().hide();
887 $(".cancel_tag_add").click(function(){
888 var thisid = $(this).attr("id");
889 thisid = thisid.replace("cancel","");
890 $("#tagform"+thisid).hide();
891 $("#tag_add"+thisid).show();
892 $("#newtag"+thisid).val("");
893 $("#newtag"+thisid+"_status").empty().hide();
896 $(".tagbutton").click(function(){
897 var thisid = $(this).attr("title");
898 var tag = $("#newtag"+thisid).val();
899 if (!tag || (tag == "")) {
900 alert(MSG_NO_TAG_SPECIFIED);
903 KOHA.Tags.add_tag_button(thisid, tag);
908 [% IF loggedinusername && can_remove_biblios %]
909 $(".removefromlist").on("click", function(e){
910 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
913 $("#myform").submit(function(){
914 var checkedBoxes = $(".checkboxed input:checkbox:checked");
915 var numchecked = $(checkedBoxes).size();
917 if( numchecked > 1 ){
918 return confirmDelete(MSG_REMOVE_FROM_LIST);
920 return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
923 alert(MSG_NO_RECORD_SELECTED);
927 $("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Remove from list")+"</a>")
929 $("#myform").submit();
933 [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
934 [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
935 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
936 $('#sort-submit').hide();
940 setTimeout('window.close()', 1);
942 }); // document.ready
948 if(f.addshelf.value.length ==0){
949 _alertString += _("- You must enter a list name") + "\n";
952 if (_alertString.length==0) {
955 alertString2 = _("Form not submitted because of the following problem(s)");
956 alertString2 += "\n------------------------------------------------------------------------------------\n\n";
957 alertString2 += _alertString;