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 %]
240 <th scope="row">Location(s) (Status)</th>
242 [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
244 [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
246 <strong>[% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]</strong>
247 <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span>
248 [% IF ( ITEM_RESULT.itemcallnumber ) %]
249 ([% ITEM_RESULT.itemcallnumber | html %])
251 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT.item_object %])
256 This record has no items.
261 [% END # / FOREACH BIBLIO_RESULT %]
266 <form action="/cgi-bin/koha/opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form">
267 <table id="itemst" class="table table-bordered table-striped">
268 <caption class="sr-only">Items in your cart</caption>
271 <th class="noprint"> </th>
275 <th>Location (Status)</th>
279 [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
281 <td class="noprint selectcol">
282 [% IF BIBLIO_RESULT.title %]
283 [% check_title = BIBLIO_RESULT.title %]
285 [% check_title = BIBLIO_RESULT.biblionumber %]
287 <label for="bib[% BIBLIO_RESULT.biblionumber | html %]" class="sr-only">[% check_title | html %]</label>
288 <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
291 <a href="#" onclick="openBiblio('[% PROCESS biblio_a_href biblionumber => BIBLIO_RESULT.biblionumber %]',[% BIBLIO_RESULT.biblionumber | html %])">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]</a>
292 <!-- COinS / Openurl -->
293 <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>
294 [% IF ( TagsInputEnabled && loggedinusername ) %]
295 <span id="newtag[% BIBLIO_RESULT.biblionumber | html %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</span>
298 <td>[% BIBLIO_RESULT.author | html %]</td>
300 [% IF ( BIBLIO_RESULT.publicationyear ) %]
301 [% BIBLIO_RESULT.publicationyear | html %]
303 [% BIBLIO_RESULT.copyrightdate | html %]
306 <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]<ul>[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
308 [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]
309 <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span>
310 [% IF ( ITEM_RESULT.itemcallnumber ) %]
311 ([% ITEM_RESULT.itemcallnumber | html %])
313 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
315 [% END %]</ul>[% ELSE %]This record has no items.[% END %]
318 [% END # / FOREACH BIBLIO_RESULT %]
322 [% END # / verbose %]
324 <form name="myform" action="opac-basket.pl" method="get">
325 <input type="hidden" name="records" id="records" />
327 <form method="post" id="download_cart" action="/cgi-bin/koha/opac-downloadcart.pl">
328 <input type="hidden" name="format" id="download_format" value="" />
329 <input type="hidden" name="bib_list" value="[% bib_list | html %]" />
332 </div> <!-- / #userbasket -->
333 </div> <!-- / .col -->
334 </div> <!-- / .row -->
335 </div> <!-- / .container-fluid -->
336 </div> <!-- / .main -->
338 [% INCLUDE 'opac-bottom.inc' %]
340 [% BLOCK jsinclude %]
341 [% Asset.js("lib/hc-sticky.js") | $raw %]
342 [% INCLUDE 'datatables.inc' %]
344 [% IF ( TagsInputEnabled && loggedinusername ) %]
345 function tagSelected() {
346 var bibs = document.getElementById('records').value;
348 $("#tagsel_tag").hide();
349 $("#tag_hides").hide();
350 $("#tagsel_form").show();
352 alert( __("No item was selected") );
356 function tagCanceled() {
357 $("#tagsel_form").hide();
358 $("#tagsel_tag").show();
359 $("#tag_hides").show();
360 $("#tagsel_new").val("");
361 $(".tagstatus").empty().hide();
364 function tagAdded() {
365 var checkedBoxes = $("input:checkbox:checked");
366 if (!$(checkedBoxes).size()) {
367 alert( __("No item was selected") );
371 var tag = $("#tagsel_new").val();
372 if (!tag || (tag == "")) {
373 alert(MSG_NO_TAG_SPECIFIED);
378 for (var i = 0; i < $(checkedBoxes).size(); i++) {
379 var box = $(checkedBoxes).get(i);
380 bibs[i] = $(box).val();
383 KOHA.Tags.add_multitags_button(bibs, tag);
386 [% END # / TagsInputEnabled && loggedinusername %]
388 $(document).ready(function(){
389 $(".brief").click(function(e){
394 $(".detail").click(function(e){
399 $(".send").click(function(e){
404 $(".download-cart").on("click", function(e){
406 var format = $(this).data("format");
407 $("#download_format").val( format );
408 $("#download_cart").submit();
411 $(".empty").click(function(e){
416 $(".deleteshelf").click(function(e){
421 $(".newshelf").click(function(e){
426 $(".hold").click(function(e){
431 $("#tagsel_tag").click(function(e){
436 $("#tagsel_button").click(function(e){
441 $("#tagsel_cancel").click(function(e){
446 $("#CheckAll").click(function(e){
448 $(".cb").each(function(){
449 $(this).prop("checked", true);
450 selRecord(this.value, true);
452 enableCheckboxActions();
455 $("#CheckNone").click(function(e){
457 $(".cb").each(function(){
458 $(this).prop("checked", false);
459 selRecord(this.value, false);
461 enableCheckboxActions();
464 if( $("#itemst").length > 0 ){
465 var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
466 "order": [[ 1, "asc" ]],
468 { "targets": [ 0,-1 ], "sortable": false, "searchable": false }
472 { "type": "anti-the" },
479 var buttons = new $.fn.dataTable.Buttons(itemst, {
483 }).container().appendTo($('#toolbar'));
486 $(".cb").change(function(){
487 selRecord( $(this).val(), $(this).prop("checked") );
488 enableCheckboxActions();
491 enableCheckboxActions();
493 Sticky = $("#floating");
495 stickTo: "#userbasket",
496 stickyClass: "floating"
500 function enableCheckboxActions(){
501 // Enable/disable controls if checkboxes are checked
502 var checkedBoxes = $(".cb:checked");
503 if ( checkedBoxes.length ) {
504 $(".selections").html(_("With selected titles: "));
505 $(".selections-toolbar .links a").removeClass("disabled").attr("aria-disabled", "false");
507 $(".selections").html(_("Select titles to: "));
508 $(".selections-toolbar .links a").addClass("disabled").attr("aria-disabled", "true");
512 [% END # / BLOCK jsinclude %]