3 [% USE AuthorisedValues %]
8 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && TagsEnabled && TagsInputOnList ) %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Your cart › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% BLOCK cssinclude %]<style>.item-status, .dt-buttons { display: inline; } @media print { body { height: 99%; } }</style>[% END %]
15 [% INCLUDE 'bodytag.inc' bodyid='basket' %]
17 <div class="container-fluid">
20 <div id="userbasket" class="maincontent">
23 <div id="toolbar" class="toolbar noprint">
25 <a href="opac-basket.pl" class="btn btn-link btn-sm brief"><i class="fa fa-fw fa-search-minus" aria-hidden="true"></i> Brief display</a>
27 <a href="opac-basket.pl" class="btn btn-link btn-sm detail"><i class="fa fa-fw fa-search-plus" aria-hidden="true"></i> More details</a>
29 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
30 <a class="btn btn-link btn-sm send" href="opac-basket.pl"><i class="fa fa-fw fa-envelope" aria-hidden="true"></i> Send</a>
33 <div id="download-cart" class="btn-group dropdown">
34 <a id="format" class="btn btn-link dropdown-toggle" data-toggle="dropdown" role="button" href="#"><i class="fa fa-fw fa-download" aria-hidden="true"></i> Download <b class="caret"></b></a>
35 <div class="dropdown-menu" role="menu" aria-labelledby="format">
36 <a role="menuitem" class="dropdown-item download-cart" data-format="bibtex" href="#">BibTeX</a>
37 <a role="menuitem" class="dropdown-item download-cart" data-format="isbd" href="#">ISBD</a>
38 <a role="menuitem" class="dropdown-item download-cart" data-format="iso2709" href="#">MARC</a>
39 <a role="menuitem" class="dropdown-item download-cart" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
40 [% FOREACH csv_profile IN csv_profiles %]
41 <a role="menuitem" class="dropdown-item 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 btn-sm print-large" href="#"><i class="fa fa-fw fa-print" aria-hidden="true"></i> Print</a>
53 <div class="selections-toolbar toolbar noprint">
54 <div class="check_control">
55 <a id="CheckAll" class="btn btn-link btn-sm btn-sm" href="#">Select all</a>
56 <a id="CheckNone" class="btn btn-link btn-sm btn-sm" href="#">Clear all</a>
58 <span class="links" id="tag_hides">
59 <span class="selections">Select titles to: </span>
60 <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled" aria-disabled="true"><i class="fa fa-remove" aria-hidden="true"></i> Remove</a>
61 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
62 [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
63 <a href="#" class="btn btn-link btn-sm newshelf disabled" aria-disabled="true"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Add to a list</a>
65 [% IF ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
66 <a href="#" class="btn btn-link btn-sm hold disabled" aria-disabled="true"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
68 [% IF ( TagsInputEnabled && loggedinusername ) %]
69 <a href="#" id="tagsel_tag" class="btn btn-link btn-sm disabled" aria-disabled="true"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
71 [% END # / IF opacuserlogin %]
73 [% IF ( TagsInputEnabled && loggedinusername ) %]
74 <span id="tagsel_form" style="display:none">
75 <label for="tagsel_new">New tag:</label>
76 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
77 <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="Add" type="submit" value="Add">
78 <a href="#" id="tagsel_cancel">Cancel</a>
82 </div> <!-- /#floating -->
85 <form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form">
86 [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
87 [% IF BIBLIO_RESULT.title %]
88 [% check_title = BIBLIO_RESULT.title %]
90 [% check_title = BIBLIO_RESULT.biblionumber %]
92 <label for="bib[% BIBLIO_RESULT.biblionumber | html %]" class="sr-only">[% check_title | html %]</label>
94 <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
95 [% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]
96 [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author | html %][% END %]
98 <!-- COinS / Openurl -->
99 <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>
101 <table class="table">
102 [% IF ( BIBLIO_RESULT.isbn ) %]
104 <th scope="row">ISBN</th>
105 <td>[% BIBLIO_RESULT.isbn | html %]</td>
109 [% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
111 <th scope="row">Author(s)</th>
113 [% IF ( BIBLIO_RESULT.author ) %]
114 <p>[% BIBLIO_RESULT.author | html %]</p>
116 [% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
117 [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %]
118 <p> [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
119 [% MARCAUTHOR_SUBFIELDS_LOO.separator | html %]
120 [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]
129 [% IF ( BIBLIO_RESULT.publishercode ) %]
131 <th scope="row">Publisher</th>
132 <td>[% BIBLIO_RESULT.place | html %] [% BIBLIO_RESULT.publishercode | html %] [% BIBLIO_RESULT.publicationyear | html %]
137 [% IF ( BIBLIO_RESULT.pages ) %]
139 <th scope="row">Details</th>
140 <td>[% BIBLIO_RESULT.pages | html %] [% BIBLIO_RESULT.illus | html %] [% BIBLIO_RESULT.item('size') | html %]</td>
144 [% IF ( BIBLIO_RESULT.seriestitle ) %]
146 <th scope="row">Collection</th>
147 <td> [% BIBLIO_RESULT.seriestitle | html %]</td>
151 [% IF ( BIBLIO_RESULT.MARCSUBJCTS ) %]
153 <th scope="row">Subject(s)</th>
154 <td>[% FOREACH MARCSUBJCT IN BIBLIO_RESULT.MARCSUBJCTS %]
155 <p> [% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
156 [% MARCSUBJECT_SUBFIELDS_LOO.separator | html %][% MARCSUBJECT_SUBFIELDS_LOO.value | html %][% END %]
162 [% IF ( BIBLIO_RESULT.copyrightdate ) %]
163 <tr><th scope="row">Copyright</th>
164 <td> [% BIBLIO_RESULT.copyrightdate | html %]</td>
168 [% IF ( BIBLIO_RESULT.MARCNOTES ) %]
170 <th scope="row">Notes</th>
172 [% FOREACH MARCNOTE IN BIBLIO_RESULT.MARCNOTES %]
174 [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
175 - <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
177 - [% MARCNOTE.marcnote | html %]
185 [% IF ( BIBLIO_RESULT.unititle ) %]
187 <th scope="row">Unified title</th>
188 <td> [% BIBLIO_RESULT.unititle | html %]</td>
192 [% IF ( BIBLIO_RESULT.serial ) %]
194 <th scope="row">Serial</th>
195 <td>[% BIBLIO_RESULT.serial | html %]</td>
199 [% IF ( BIBLIO_RESULT.dewey ) %]
201 <th scope="row">Dewey</th>
202 <td>[% BIBLIO_RESULT.dewey | html %]</td>
206 [% IF ( BIBLIO_RESULT.classification ) %]
208 <th scope="row">Classification</th>
209 <td> [% BIBLIO_RESULT.classification | html %]</td>
213 [% IF ( BIBLIO_RESULT.lccn ) %]
215 <th scope="row">LCCN</th>
216 <td> [% BIBLIO_RESULT.lccn | html %]</td>
220 [% IF BIBLIO_RESULT.MARCURLS.size %]
222 <th scope="row">URL(s)</th>
224 [% FOREACH MARCurl IN BIBLIO_RESULT.MARCURLS %]
225 [% IF MARCurl.part %]<p>[% MARCurl.part | html %]</p>[% END %]
227 [% IF OPACURLOpenInNewWindow %]
228 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">[% MARCurl.linktext | html %]</a>
230 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]">[% MARCurl.linktext | html %]</a>
233 [% IF MARCurl.notes %][% FOREACH note IN MARCurl.notes %]<p>[% note.note | html %]</p>[% END %][% END %]
239 [% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
241 <th scope="row">In</th>
244 [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %]
245 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT.HOSTITEMENTRIES %]</a> [% BIBLIO_RESULT.RELATEDPARTS | html %]
247 [% BIBLIO_RESULT.HOSTITEMENTRIES | html %]
255 <th scope="row">Location(s) (Status)</th>
257 [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
259 [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
261 <strong>[% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]</strong>
262 <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span>
263 [% IF ( ITEM_RESULT.itemcallnumber ) %]
264 ([% ITEM_RESULT.itemcallnumber | html %])
266 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT.item_object %])
271 This record has no items.
276 [% END # / FOREACH BIBLIO_RESULT %]
281 <form action="/cgi-bin/koha/opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form">
282 <table id="itemst" class="table table-bordered table-striped">
283 <caption class="sr-only">Items in your cart</caption>
286 <th class="noprint"> </th>
290 <th>Location (Status)</th>
294 [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
296 <td class="noprint selectcol">
297 [% IF BIBLIO_RESULT.title %]
298 [% check_title = BIBLIO_RESULT.title %]
300 [% check_title = BIBLIO_RESULT.biblionumber %]
302 <label for="bib[% BIBLIO_RESULT.biblionumber | html %]" class="sr-only">[% check_title | html %]</label>
303 <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
306 <a href="#" onclick="openBiblio('[% PROCESS biblio_a_href biblionumber => BIBLIO_RESULT.biblionumber %]',[% BIBLIO_RESULT.biblionumber | html %])">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]</a>
307 <!-- COinS / Openurl -->
308 <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>
309 [% IF ( TagsInputEnabled && loggedinusername ) %]
310 <span id="newtag[% BIBLIO_RESULT.biblionumber | html %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</span>
313 [% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
315 [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %]
316 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=entry %]</a> [% BIBLIO_RESULT.RELATEDPARTS | html %]
318 [% BIBLIO_RESULT.HOSTITEMENTRIES | html %]
323 <td>[% BIBLIO_RESULT.author | html %]</td>
325 [% IF ( BIBLIO_RESULT.publicationyear ) %]
326 [% BIBLIO_RESULT.publicationyear | html %]
328 [% BIBLIO_RESULT.copyrightdate | html %]
331 <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]<ul>[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
333 [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]
334 <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span>
335 [% IF ( ITEM_RESULT.itemcallnumber ) %]
336 ([% ITEM_RESULT.itemcallnumber | html %])
338 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
340 [% END %]</ul>[% ELSE %]This record has no items.[% END %]
343 [% END # / FOREACH BIBLIO_RESULT %]
347 [% END # / verbose %]
349 <form name="myform" action="opac-basket.pl" method="get">
350 <input type="hidden" name="records" id="records" />
352 <form method="post" id="download_cart" action="/cgi-bin/koha/opac-downloadcart.pl">
353 <input type="hidden" name="format" id="download_format" value="" />
354 <input type="hidden" name="bib_list" value="[% bib_list | html %]" />
357 </div> <!-- / #userbasket -->
358 </div> <!-- / .col -->
359 </div> <!-- / .row -->
360 </div> <!-- / .container-fluid -->
361 </div> <!-- / .main -->
363 [% INCLUDE 'opac-bottom.inc' %]
365 [% BLOCK jsinclude %]
366 [% Asset.js("lib/hc-sticky.js") | $raw %]
367 [% INCLUDE 'datatables.inc' %]
369 [% IF ( TagsInputEnabled && loggedinusername ) %]
370 function tagSelected() {
371 var bibs = document.getElementById('records').value;
373 $("#tagsel_tag").hide();
374 $("#tag_hides").hide();
375 $("#tagsel_form").show();
377 alert( __("No item was selected") );
381 function tagCanceled() {
382 $("#tagsel_form").hide();
383 $("#tagsel_tag").show();
384 $("#tag_hides").show();
385 $("#tagsel_new").val("");
386 $(".tagstatus").empty().hide();
389 function tagAdded() {
390 var checkedBoxes = $("input:checkbox:checked");
391 if (!$(checkedBoxes).size()) {
392 alert( __("No item was selected") );
396 var tag = $("#tagsel_new").val();
397 if (!tag || (tag == "")) {
398 alert(MSG_NO_TAG_SPECIFIED);
403 for (var i = 0; i < $(checkedBoxes).size(); i++) {
404 var box = $(checkedBoxes).get(i);
405 bibs[i] = $(box).val();
408 KOHA.Tags.add_multitags_button(bibs, tag);
411 [% END # / TagsInputEnabled && loggedinusername %]
413 $(document).ready(function(){
414 $(".brief").click(function(e){
419 $(".detail").click(function(e){
424 $(".send").click(function(e){
429 $(".download-cart").on("click", function(e){
431 var format = $(this).data("format");
432 $("#download_format").val( format );
433 $("#download_cart").submit();
436 $(".empty").click(function(e){
441 $(".deleteshelf").click(function(e){
446 $(".newshelf").click(function(e){
451 $(".hold").click(function(e){
456 $("#tagsel_tag").click(function(e){
461 $("#tagsel_button").click(function(e){
466 $("#tagsel_cancel").click(function(e){
471 $("#CheckAll").click(function(e){
473 $(".cb").each(function(){
474 $(this).prop("checked", true);
475 selRecord(this.value, true);
477 enableCheckboxActions();
480 $("#CheckNone").click(function(e){
482 $(".cb").each(function(){
483 $(this).prop("checked", false);
484 selRecord(this.value, false);
486 enableCheckboxActions();
489 if( $("#itemst").length > 0 ){
490 var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
491 "order": [[ 1, "asc" ]],
493 { "targets": [ 0,-1 ], "sortable": false, "searchable": false }
497 { "type": "anti-the" },
504 var buttons = new $.fn.dataTable.Buttons(itemst, {
508 }).container().appendTo($('#toolbar'));
511 $(".cb").change(function(){
512 selRecord( $(this).val(), $(this).prop("checked") );
513 enableCheckboxActions();
516 enableCheckboxActions();
518 Sticky = $("#floating");
520 stickTo: "#userbasket",
521 stickyClass: "floating"
525 function enableCheckboxActions(){
526 // Enable/disable controls if checkboxes are checked
527 var checkedBoxes = $(".cb:checked");
528 if ( checkedBoxes.length ) {
529 $(".selections").html(_("With selected titles: "));
530 $(".selections-toolbar .links a").removeClass("disabled").attr("aria-disabled", "false");
532 $(".selections").html(_("Select titles to: "));
533 $(".selections-toolbar .links a").addClass("disabled").attr("aria-disabled", "true");
537 [% END # / BLOCK jsinclude %]