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">Host item entries</th>
243 [% FOREACH entry IN BIBLIO_RESULT.HOSTITEMENTRIES %]
245 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% entry.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=entry %]</a>
253 <th scope="row">Location(s) (Status)</th>
255 [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
257 [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
259 <strong>[% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]</strong>
260 <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span>
261 [% IF ( ITEM_RESULT.itemcallnumber ) %]
262 ([% ITEM_RESULT.itemcallnumber | html %])
264 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT.item_object %])
269 This record has no items.
274 [% END # / FOREACH BIBLIO_RESULT %]
279 <form action="/cgi-bin/koha/opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form">
280 <table id="itemst" class="table table-bordered table-striped">
281 <caption class="sr-only">Items in your cart</caption>
284 <th class="noprint"> </th>
288 <th>Location (Status)</th>
292 [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
294 <td class="noprint selectcol">
295 [% IF BIBLIO_RESULT.title %]
296 [% check_title = BIBLIO_RESULT.title %]
298 [% check_title = BIBLIO_RESULT.biblionumber %]
300 <label for="bib[% BIBLIO_RESULT.biblionumber | html %]" class="sr-only">[% check_title | html %]</label>
301 <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
304 <a href="#" onclick="openBiblio('[% PROCESS biblio_a_href biblionumber => BIBLIO_RESULT.biblionumber %]',[% BIBLIO_RESULT.biblionumber | html %])">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]</a>
305 <!-- COinS / Openurl -->
306 <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>
307 [% IF ( TagsInputEnabled && loggedinusername ) %]
308 <span id="newtag[% BIBLIO_RESULT.biblionumber | html %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</span>
311 [% IF BIBLIO_RESULT.HOSTITEMENTRIES %]
312 [% FOREACH entry IN BIBLIO_RESULT.HOSTITEMENTRIES %]
314 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% entry.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=entry %]</a>
319 <td>[% BIBLIO_RESULT.author | html %]</td>
321 [% IF ( BIBLIO_RESULT.publicationyear ) %]
322 [% BIBLIO_RESULT.publicationyear | html %]
324 [% BIBLIO_RESULT.copyrightdate | html %]
327 <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]<ul>[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
329 [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]
330 <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span>
331 [% IF ( ITEM_RESULT.itemcallnumber ) %]
332 ([% ITEM_RESULT.itemcallnumber | html %])
334 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
336 [% END %]</ul>[% ELSE %]This record has no items.[% END %]
339 [% END # / FOREACH BIBLIO_RESULT %]
343 [% END # / verbose %]
345 <form name="myform" action="opac-basket.pl" method="get">
346 <input type="hidden" name="records" id="records" />
348 <form method="post" id="download_cart" action="/cgi-bin/koha/opac-downloadcart.pl">
349 <input type="hidden" name="format" id="download_format" value="" />
350 <input type="hidden" name="bib_list" value="[% bib_list | html %]" />
353 </div> <!-- / #userbasket -->
354 </div> <!-- / .col -->
355 </div> <!-- / .row -->
356 </div> <!-- / .container-fluid -->
357 </div> <!-- / .main -->
359 [% INCLUDE 'opac-bottom.inc' %]
361 [% BLOCK jsinclude %]
362 [% Asset.js("lib/hc-sticky.js") | $raw %]
363 [% INCLUDE 'datatables.inc' %]
365 [% IF ( TagsInputEnabled && loggedinusername ) %]
366 function tagSelected() {
367 var bibs = document.getElementById('records').value;
369 $("#tagsel_tag").hide();
370 $("#tag_hides").hide();
371 $("#tagsel_form").show();
373 alert( __("No item was selected") );
377 function tagCanceled() {
378 $("#tagsel_form").hide();
379 $("#tagsel_tag").show();
380 $("#tag_hides").show();
381 $("#tagsel_new").val("");
382 $(".tagstatus").empty().hide();
385 function tagAdded() {
386 var checkedBoxes = $("input:checkbox:checked");
387 if (!$(checkedBoxes).size()) {
388 alert( __("No item was selected") );
392 var tag = $("#tagsel_new").val();
393 if (!tag || (tag == "")) {
394 alert(MSG_NO_TAG_SPECIFIED);
399 for (var i = 0; i < $(checkedBoxes).size(); i++) {
400 var box = $(checkedBoxes).get(i);
401 bibs[i] = $(box).val();
404 KOHA.Tags.add_multitags_button(bibs, tag);
407 [% END # / TagsInputEnabled && loggedinusername %]
409 $(document).ready(function(){
410 $(".brief").click(function(e){
415 $(".detail").click(function(e){
420 $(".send").click(function(e){
425 $(".download-cart").on("click", function(e){
427 var format = $(this).data("format");
428 $("#download_format").val( format );
429 $("#download_cart").submit();
432 $(".empty").click(function(e){
437 $(".deleteshelf").click(function(e){
442 $(".newshelf").click(function(e){
447 $(".hold").click(function(e){
452 $("#tagsel_tag").click(function(e){
457 $("#tagsel_button").click(function(e){
462 $("#tagsel_cancel").click(function(e){
467 $("#CheckAll").click(function(e){
469 $(".cb").each(function(){
470 $(this).prop("checked", true);
471 selRecord(this.value, true);
473 enableCheckboxActions();
476 $("#CheckNone").click(function(e){
478 $(".cb").each(function(){
479 $(this).prop("checked", false);
480 selRecord(this.value, false);
482 enableCheckboxActions();
485 if( $("#itemst").length > 0 ){
486 var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
487 "order": [[ 1, "asc" ]],
489 { "targets": [ 0,-1 ], "sortable": false, "searchable": false }
493 { "type": "anti-the" },
500 var buttons = new $.fn.dataTable.Buttons(itemst, {
504 }).container().appendTo($('#toolbar'));
507 $(".cb").change(function(){
508 selRecord( $(this).val(), $(this).prop("checked") );
509 enableCheckboxActions();
512 enableCheckboxActions();
514 Sticky = $("#floating");
516 stickTo: "#userbasket",
517 stickyClass: "floating"
521 function enableCheckboxActions(){
522 // Enable/disable controls if checkboxes are checked
523 var checkedBoxes = $(".cb:checked");
524 if ( checkedBoxes.length ) {
525 $(".selections").html(_("With selected titles: "));
526 $(".selections-toolbar .links a").removeClass("disabled").attr("aria-disabled", "false");
528 $(".selections").html(_("Select titles to: "));
529 $(".selections-toolbar .links a").addClass("disabled").attr("aria-disabled", "true");
533 [% END # / BLOCK jsinclude %]