6 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && TagsEnabled && TagsInputOnList ) %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your cart</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% BLOCK cssinclude %]<style>.item-status, .dt-buttons { display: inline; } @media print { body { height: 99%; } }</style>[% END %]
13 [% INCLUDE 'bodytag.inc' bodyid='basket' %]
15 <div class="container-fluid">
16 <div class="row-fluid">
21 <div id="toolbar" class="toolbar noprint">
23 <a href="opac-basket.pl" class="btn btn-link brief"><i class="fa fa-fw fa-search-minus" aria-hidden="true"></i> Brief display</a>
25 <a href="opac-basket.pl" class="btn btn-link detail"><i class="fa fa-fw fa-search-plus" aria-hidden="true"></i> More details</a>
27 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
28 <a class="btn btn-link send" href="opac-basket.pl"><i class="fa fa-fw fa-envelope" aria-hidden="true"></i> Send</a>
31 <div id="download-cart" class="btn-group dropdown">
32 <a id="format" class="btn btn-link dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-fw fa-download" aria-hidden="true"></i> Download <b class="caret"></b></a>
33 <ul class="dropdown-menu pull-left" role="menu" aria-labelledby="format">
34 <li><a role="menuitem" class="download-cart" data-format="bibtex" href="#">BibTeX</a></li>
35 <li><a role="menuitem" class="download-cart" data-format="isbd" href="#">ISBD</a></li>
36 <li><a role="menuitem" class="download-cart" data-format="iso2709" href="#">MARC</a></li>
37 <li><a role="menuitem" class="download-cart" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a></li>
38 [% FOREACH csv_profile IN csv_profiles %]
40 <a role="menuitem" class="download-cart" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
46 <a class="btn btn-link remove empty" href="opac-basket.pl"><i class="fa fa-fw fa-trash" aria-hidden="true"></i> Empty and close</a>
47 <a class="btn btn-link close" href="opac-basket.pl"><i class="fa fa-fw fa-times-circle" aria-hidden="true"></i> Hide window</a>
49 <a class="btn btn-link print-large" href="#"><i class="fa fa-fw fa-print" aria-hidden="true"></i> Print</a>
53 <div id="selections-toolbar" class="toolbar noprint">
54 <a id="CheckAll" href="#">Select all</a>
55 <a id="CheckNone" href="#">Clear all</a>
56 <span class="sep">|</span>
57 <span class="links" id="tag_hides">
58 <span id="selections">Select titles to: </span>
59 <a href="#" class="btn btn-link remove deleteshelf disabled"><i class="fa fa-remove" aria-hidden="true"></i> Remove</a>
60 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
61 [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
62 <a href="#" class="btn btn-link newshelf disabled"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Add to a list</a>
64 [% IF ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
65 <a href="#" class="btn btn-link hold disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
67 [% IF ( TagsInputEnabled && loggedinusername ) %]
68 <a href="#" id="tagsel_tag" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
70 [% END # / IF opacuserlogin %]
72 [% IF ( TagsInputEnabled && loggedinusername ) %]
73 <span id="tagsel_form" style="display:none">
74 <label for="tagsel_new">New tag:</label>
75 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
76 <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="Add" type="submit" value="Add">
77 <a href="#" id="tagsel_cancel">Cancel</a>
81 </div> <!-- /#floating -->
84 <form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
85 [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
87 <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
88 [% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]
89 [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author | html %][% END %]
91 <!-- COinS / Openurl -->
92 <span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=[% BIBLIO_RESULT.author | html %]&rft.btitle=[% BIBLIO_RESULT.title |url %]&rft.date=[% BIBLIO_RESULT.publicationyear | html %]&rft.tpages=[% BIBLIO_RESULT.item('size') | html %]&rft.isbn=[% BIBLIO_RESULT.isbn |url %]&rft.aucorp=&rft.place=[% BIBLIO_RESULT.place | html %]&rft.pub=[% BIBLIO_RESULT.publisher |url %]&rft.edition=[% BIBLIO_RESULT.edition | html %]&rft.series=[% BIBLIO_RESULT.series | html %]&rft.genre="></span>
95 [% IF ( BIBLIO_RESULT.isbn ) %]
97 <th scope="row">ISBN</th>
98 <td>[% BIBLIO_RESULT.isbn | html %]</td>
102 [% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
104 <th scope="row">Author(s)</th>
106 [% IF ( BIBLIO_RESULT.author ) %]
107 <p>[% BIBLIO_RESULT.author | html %]</p>
109 [% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
110 [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %]
111 <p> [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
112 [% MARCAUTHOR_SUBFIELDS_LOO.separator | html %]
113 [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]
122 [% IF ( BIBLIO_RESULT.publishercode ) %]
124 <th scope="row">Publisher</th>
125 <td>[% BIBLIO_RESULT.place | html %] [% BIBLIO_RESULT.publishercode | html %] [% BIBLIO_RESULT.publicationyear | html %]
130 [% IF ( BIBLIO_RESULT.pages ) %]
132 <th scope="row">Details</th>
133 <td>[% BIBLIO_RESULT.pages | html %] [% BIBLIO_RESULT.illus | html %] [% BIBLIO_RESULT.item('size') | html %]</td>
137 [% IF ( BIBLIO_RESULT.seriestitle ) %]
139 <th scope="row">Collection</th>
140 <td> [% BIBLIO_RESULT.seriestitle | html %]</td>
144 [% IF ( BIBLIO_RESULT.MARCSUBJCTS ) %]
146 <th scope="row">Subject(s)</th>
147 <td>[% FOREACH MARCSUBJCT IN BIBLIO_RESULT.MARCSUBJCTS %]
148 <p> [% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
149 [% MARCSUBJECT_SUBFIELDS_LOO.separator | html %][% MARCSUBJECT_SUBFIELDS_LOO.value | html %][% END %]
155 [% IF ( BIBLIO_RESULT.copyrightdate ) %]
156 <tr><th scope="row">Copyright</th>
157 <td> [% BIBLIO_RESULT.copyrightdate | html %]</td>
161 [% IF ( BIBLIO_RESULT.MARCNOTES ) %]
163 <th scope="row">Notes</th>
165 [% FOREACH MARCNOTE IN BIBLIO_RESULT.MARCNOTES %]
167 [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
168 - <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
170 - [% MARCNOTE.marcnote | html %]
178 [% IF ( BIBLIO_RESULT.unititle ) %]
180 <th scope="row">Unified title</th>
181 <td> [% BIBLIO_RESULT.unititle | html %]</td>
185 [% IF ( BIBLIO_RESULT.serial ) %]
187 <th scope="row">Serial</th>
188 <td>[% BIBLIO_RESULT.serial | html %]</td>
192 [% IF ( BIBLIO_RESULT.dewey ) %]
194 <th scope="row">Dewey</th>
195 <td>[% BIBLIO_RESULT.dewey | html %]</td>
199 [% IF ( BIBLIO_RESULT.classification ) %]
201 <th scope="row">Classification</th>
202 <td> [% BIBLIO_RESULT.classification | html %]</td>
206 [% IF ( BIBLIO_RESULT.lccn ) %]
208 <th scope="row">LCCN</th>
209 <td> [% BIBLIO_RESULT.lccn | html %]</td>
213 [% IF BIBLIO_RESULT.MARCURLS.size %]
215 <th scope="row">URL(s)</th>
217 [% FOREACH MARCurl IN BIBLIO_RESULT.MARCURLS %]
218 [% IF MARCurl.part %]<p>[% MARCurl.part | html %]</p>[% END %]
220 [% IF OPACURLOpenInNewWindow %]
221 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">[% MARCurl.linktext | html %]</a>
223 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]">[% MARCurl.linktext | html %]</a>
226 [% IF MARCurl.notes %][% FOREACH note IN MARCurl.notes %]<p>[% note.note | html %]</p>[% END %][% END %]
233 <th scope="row">Location(s) (Status)</th>
235 [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
237 [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
239 <strong>[% ITEM_RESULT.branchname | html %]</strong>
240 [% IF ( ITEM_RESULT.location_opac ) %]<span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>[% END %]
241 [% IF ( ITEM_RESULT.itemcallnumber ) %]
242 ([% ITEM_RESULT.itemcallnumber | html %])
244 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
249 This record has no items.
254 [% END # / FOREACH BIBLIO_RESULT %]
259 <form action="/cgi-bin/koha/opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
260 <table id="itemst" class="table table-bordered table-striped">
263 <th class="noprint"> </th>
267 <th>Location (Status)</th>
271 [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
274 <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
277 <a href="#" onclick="openBiblio('[% BIBLIO_RESULT.dest | html %]',[% BIBLIO_RESULT.biblionumber | html %])">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]</a>
278 <!-- COinS / Openurl -->
279 <span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=[% BIBLIO_RESULT.author | html %]&rft.btitle=[% BIBLIO_RESULT.title |url %]&rft.date=[% BIBLIO_RESULT.publicationyear | html %]&rft.tpages=[% BIBLIO_RESULT.item('size') | html %]&rft.isbn=[% BIBLIO_RESULT.isbn |url %]&rft.aucorp=&rft.place=[% BIBLIO_RESULT.place | html %]&rft.pub=[% BIBLIO_RESULT.publisher |url %]&rft.edition=[% BIBLIO_RESULT.edition | html %]&rft.series=[% BIBLIO_RESULT.series | html %]&rft.genre="></span>
280 [% IF ( TagsInputEnabled && loggedinusername ) %]
281 <span id="newtag[% BIBLIO_RESULT.biblionumber | html %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</span>
284 <td>[% BIBLIO_RESULT.author | html %]</td>
286 [% IF ( BIBLIO_RESULT.publicationyear ) %]
287 [% BIBLIO_RESULT.publicationyear | html %]
289 [% BIBLIO_RESULT.copyrightdate | html %]
292 <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]<ul>[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
294 [% ITEM_RESULT.branchname | html %]
295 [% IF ( ITEM_RESULT.location_opac ) %]<span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>[% END %]
296 [% IF ( ITEM_RESULT.itemcallnumber ) %]
297 ([% ITEM_RESULT.itemcallnumber | html %])
299 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
301 [% END %]</ul>[% ELSE %]This record has no items.[% END %]
304 [% END # / FOREACH BIBLIO_RESULT %]
308 [% END # / verbose %]
310 <form name="myform" action="opac-basket.pl" method="get">
311 <input type="hidden" name="records" id="records" />
313 <form method="post" id="download_cart" action="/cgi-bin/koha/opac-downloadcart.pl">
314 <input type="hidden" name="format" id="download_format" value="" />
315 <input type="hidden" name="bib_list" value="[% bib_list | html %]" />
318 </div> <!-- / #userbasket -->
319 </div> <!-- / .span10 -->
320 </div> <!-- / .row-fluid -->
321 </div> <!-- / .container-fluid -->
322 </div> <!-- / .main -->
324 [% INCLUDE 'opac-bottom.inc' %]
326 [% BLOCK jsinclude %]
327 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
328 [% Asset.js("lib/hc-sticky.js") | $raw %]
329 [% INCLUDE 'datatables.inc' %]
331 [% IF ( TagsInputEnabled && loggedinusername ) %]
332 function tagSelected() {
333 var bibs = document.getElementById('records').value;
335 $("#tagsel_tag").hide();
336 $("#tag_hides").hide();
337 $("#tagsel_form").show();
339 alert(MSG_NO_RECORD_SELECTED);
343 function tagCanceled() {
344 $("#tagsel_form").hide();
345 $("#tagsel_tag").show();
346 $("#tag_hides").show();
347 $("#tagsel_new").val("");
348 $(".tagstatus").empty().hide();
351 function tagAdded() {
352 var checkedBoxes = $("input:checkbox:checked");
353 if (!$(checkedBoxes).size()) {
354 alert(MSG_NO_RECORD_SELECTED);
358 var tag = $("#tagsel_new").val();
359 if (!tag || (tag == "")) {
360 alert(MSG_NO_TAG_SPECIFIED);
365 for (var i = 0; i < $(checkedBoxes).size(); i++) {
366 var box = $(checkedBoxes).get(i);
367 bibs[i] = $(box).val();
370 KOHA.Tags.add_multitags_button(bibs, tag);
373 [% END # / TagsInputEnabled && loggedinusername %]
375 $(document).ready(function(){
376 $(".brief").click(function(e){
381 $(".detail").click(function(e){
386 $(".send").click(function(e){
391 $(".download-cart").on("click", function(e){
393 var format = $(this).data("format");
394 $("#download_format").val( format );
395 $("#download_cart").submit();
398 $(".empty").click(function(e){
403 $(".deleteshelf").click(function(e){
408 $(".newshelf").click(function(e){
413 $(".hold").click(function(e){
418 $("#tagsel_tag").click(function(e){
423 $("#tagsel_button").click(function(e){
428 $("#tagsel_cancel").click(function(e){
433 $("#CheckAll").click(function(){
435 $(".checkboxed").checkCheckboxes("*", true).each(
437 selRecord(this.value,true);
440 enableCheckboxActions();
444 $("#CheckNone").click(function(){
446 $(".checkboxed").unCheckCheckboxes("*",true).each(
448 selRecord(this.value,false);
451 enableCheckboxActions();
455 if( $("#itemst").length > 0 ){
456 var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
457 "order": [[ 1, "asc" ]],
459 { "targets": [ 0,-1 ], "sortable": false, "searchable": false }
463 { "type": "anti-the" },
470 var buttons = new $.fn.dataTable.Buttons(itemst, {
474 }).container().appendTo($('#toolbar'));
477 $(".cb").change(function(){
478 selRecord( $(this).val(), $(this).prop("checked") );
479 enableCheckboxActions();
482 enableCheckboxActions();
484 Sticky = $("#floating");
486 stickTo: "#userbasket",
487 stickyClass: "floating"
491 function enableCheckboxActions(){
492 // Enable/disable controls if checkboxes are checked
493 var checkedBoxes = $(".checkboxed input:checkbox:checked");
494 if ($(checkedBoxes).size()) {
495 $("#selections").html(_("With selected titles: "));
496 $("#selections-toolbar .links a").removeClass("disabled");
498 $("#selections").html(_("Select titles to: "));
499 $("#selections-toolbar .links a").addClass("disabled");
503 [% END # / BLOCK jsinclude %]