6 [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && TagsEnabled && TagsInputOnList ) %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Your cart › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</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">
18 <div id="userbasket" class="maincontent">
21 <div id="toolbar" class="toolbar noprint">
23 <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>
25 <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>
27 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
28 <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>
31 <div id="download-cart" class="btn-group dropdown">
32 <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>
33 <div class="dropdown-menu" role="menu" aria-labelledby="format">
34 <a role="menuitem" class="dropdown-item download-cart" data-format="bibtex" href="#">BibTeX</a>
35 <a role="menuitem" class="dropdown-item download-cart" data-format="isbd" href="#">ISBD</a>
36 <a role="menuitem" class="dropdown-item download-cart" data-format="iso2709" href="#">MARC</a>
37 <a role="menuitem" class="dropdown-item download-cart" data-format="ris" href="#">RIS (Zotero, EndNote, others)</a>
38 [% FOREACH csv_profile IN csv_profiles %]
39 <a role="menuitem" class="dropdown-item download-cart" data-format="[% csv_profile.export_format_id | html %]" href="#">CSV - [% csv_profile.profile | html %]</a>
44 <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>
45 <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>
47 <a class="btn btn-link btn-sm print-large" href="#"><i class="fa fa-fw fa-print" aria-hidden="true"></i> Print</a>
51 <div class="selections-toolbar toolbar noprint">
52 <div class="check_control">
53 <a id="CheckAll" class="btn btn-link btn-sm btn-sm" href="#">Select all</a>
54 <a id="CheckNone" class="btn btn-link btn-sm btn-sm" href="#">Clear all</a>
56 <span class="links" id="tag_hides">
57 <span class="selections">Select titles to: </span>
58 <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>
59 [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
60 [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
61 <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>
63 [% IF ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
64 <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>
66 [% IF ( TagsInputEnabled && loggedinusername ) %]
67 <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>
69 [% END # / IF opacuserlogin %]
71 [% IF ( TagsInputEnabled && loggedinusername ) %]
72 <span id="tagsel_form" style="display:none">
73 <label for="tagsel_new">New tag:</label>
74 <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
75 <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="Add" type="submit" value="Add">
76 <a href="#" id="tagsel_cancel">Cancel</a>
80 </div> <!-- /#floating -->
83 <form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form">
84 [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
85 [% IF BIBLIO_RESULT.title %]
86 [% check_title = BIBLIO_RESULT.title %]
88 [% check_title = BIBLIO_RESULT.biblionumber %]
90 <label for="bib[% BIBLIO_RESULT.biblionumber | html %]" class="sr-only">[% check_title | html %]</label>
92 <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
93 [% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]
94 [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author | html %][% END %]
96 <!-- COinS / Openurl -->
97 <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>
100 [% IF ( BIBLIO_RESULT.isbn ) %]
102 <th scope="row">ISBN</th>
103 <td>[% BIBLIO_RESULT.isbn | html %]</td>
107 [% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
109 <th scope="row">Author(s)</th>
111 [% IF ( BIBLIO_RESULT.author ) %]
112 <p>[% BIBLIO_RESULT.author | html %]</p>
114 [% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
115 [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %]
116 <p> [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
117 [% MARCAUTHOR_SUBFIELDS_LOO.separator | html %]
118 [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]
127 [% IF ( BIBLIO_RESULT.publishercode ) %]
129 <th scope="row">Publisher</th>
130 <td>[% BIBLIO_RESULT.place | html %] [% BIBLIO_RESULT.publishercode | html %] [% BIBLIO_RESULT.publicationyear | html %]
135 [% IF ( BIBLIO_RESULT.pages ) %]
137 <th scope="row">Details</th>
138 <td>[% BIBLIO_RESULT.pages | html %] [% BIBLIO_RESULT.illus | html %] [% BIBLIO_RESULT.item('size') | html %]</td>
142 [% IF ( BIBLIO_RESULT.seriestitle ) %]
144 <th scope="row">Collection</th>
145 <td> [% BIBLIO_RESULT.seriestitle | html %]</td>
149 [% IF ( BIBLIO_RESULT.MARCSUBJCTS ) %]
151 <th scope="row">Subject(s)</th>
152 <td>[% FOREACH MARCSUBJCT IN BIBLIO_RESULT.MARCSUBJCTS %]
153 <p> [% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
154 [% MARCSUBJECT_SUBFIELDS_LOO.separator | html %][% MARCSUBJECT_SUBFIELDS_LOO.value | html %][% END %]
160 [% IF ( BIBLIO_RESULT.copyrightdate ) %]
161 <tr><th scope="row">Copyright</th>
162 <td> [% BIBLIO_RESULT.copyrightdate | html %]</td>
166 [% IF ( BIBLIO_RESULT.MARCNOTES ) %]
168 <th scope="row">Notes</th>
170 [% FOREACH MARCNOTE IN BIBLIO_RESULT.MARCNOTES %]
172 [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
173 - <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
175 - [% MARCNOTE.marcnote | html %]
183 [% IF ( BIBLIO_RESULT.unititle ) %]
185 <th scope="row">Unified title</th>
186 <td> [% BIBLIO_RESULT.unititle | html %]</td>
190 [% IF ( BIBLIO_RESULT.serial ) %]
192 <th scope="row">Serial</th>
193 <td>[% BIBLIO_RESULT.serial | html %]</td>
197 [% IF ( BIBLIO_RESULT.dewey ) %]
199 <th scope="row">Dewey</th>
200 <td>[% BIBLIO_RESULT.dewey | html %]</td>
204 [% IF ( BIBLIO_RESULT.classification ) %]
206 <th scope="row">Classification</th>
207 <td> [% BIBLIO_RESULT.classification | html %]</td>
211 [% IF ( BIBLIO_RESULT.lccn ) %]
213 <th scope="row">LCCN</th>
214 <td> [% BIBLIO_RESULT.lccn | html %]</td>
218 [% IF BIBLIO_RESULT.MARCURLS.size %]
220 <th scope="row">URL(s)</th>
222 [% FOREACH MARCurl IN BIBLIO_RESULT.MARCURLS %]
223 [% IF MARCurl.part %]<p>[% MARCurl.part | html %]</p>[% END %]
225 [% IF OPACURLOpenInNewWindow %]
226 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">[% MARCurl.linktext | html %]</a>
228 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]">[% MARCurl.linktext | html %]</a>
231 [% IF MARCurl.notes %][% FOREACH note IN MARCurl.notes %]<p>[% note.note | html %]</p>[% END %][% END %]
238 <th scope="row">Location(s) (Status)</th>
240 [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
242 [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
244 <strong>[% ITEM_RESULT.branchname | html %]</strong>
245 [% IF ( ITEM_RESULT.location_opac ) %]<span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>[% END %]
246 [% IF ( ITEM_RESULT.itemcallnumber ) %]
247 ([% ITEM_RESULT.itemcallnumber | html %])
249 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
254 This record has no items.
259 [% END # / FOREACH BIBLIO_RESULT %]
264 <form action="/cgi-bin/koha/opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form">
265 <table id="itemst" class="table table-bordered table-striped">
266 <caption class="sr-only">Items in your cart</caption>
269 <th class="noprint"> </th>
273 <th>Location (Status)</th>
277 [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
279 <td class="noprint selectcol">
280 [% IF BIBLIO_RESULT.title %]
281 [% check_title = BIBLIO_RESULT.title %]
283 [% check_title = BIBLIO_RESULT.biblionumber %]
285 <label for="bib[% BIBLIO_RESULT.biblionumber | html %]" class="sr-only">[% check_title | html %]</label>
286 <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]">
289 <a href="#" onclick="openBiblio('[% BIBLIO_RESULT.dest | html %]',[% BIBLIO_RESULT.biblionumber | html %])">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]</a>
290 <!-- COinS / Openurl -->
291 <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>
292 [% IF ( TagsInputEnabled && loggedinusername ) %]
293 <span id="newtag[% BIBLIO_RESULT.biblionumber | html %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</span>
296 <td>[% BIBLIO_RESULT.author | html %]</td>
298 [% IF ( BIBLIO_RESULT.publicationyear ) %]
299 [% BIBLIO_RESULT.publicationyear | html %]
301 [% BIBLIO_RESULT.copyrightdate | html %]
304 <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]<ul>[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
306 [% ITEM_RESULT.branchname | html %]
307 [% IF ( ITEM_RESULT.location_opac ) %]<span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>[% END %]
308 [% IF ( ITEM_RESULT.itemcallnumber ) %]
309 ([% ITEM_RESULT.itemcallnumber | html %])
311 ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
313 [% END %]</ul>[% ELSE %]This record has no items.[% END %]
316 [% END # / FOREACH BIBLIO_RESULT %]
320 [% END # / verbose %]
322 <form name="myform" action="opac-basket.pl" method="get">
323 <input type="hidden" name="records" id="records" />
325 <form method="post" id="download_cart" action="/cgi-bin/koha/opac-downloadcart.pl">
326 <input type="hidden" name="format" id="download_format" value="" />
327 <input type="hidden" name="bib_list" value="[% bib_list | html %]" />
330 </div> <!-- / #userbasket -->
331 </div> <!-- / .col -->
332 </div> <!-- / .row -->
333 </div> <!-- / .container-fluid -->
334 </div> <!-- / .main -->
336 [% INCLUDE 'opac-bottom.inc' %]
338 [% BLOCK jsinclude %]
339 [% Asset.js("lib/hc-sticky.js") | $raw %]
340 [% INCLUDE 'datatables.inc' %]
342 [% IF ( TagsInputEnabled && loggedinusername ) %]
343 function tagSelected() {
344 var bibs = document.getElementById('records').value;
346 $("#tagsel_tag").hide();
347 $("#tag_hides").hide();
348 $("#tagsel_form").show();
350 alert( __("No item was selected") );
354 function tagCanceled() {
355 $("#tagsel_form").hide();
356 $("#tagsel_tag").show();
357 $("#tag_hides").show();
358 $("#tagsel_new").val("");
359 $(".tagstatus").empty().hide();
362 function tagAdded() {
363 var checkedBoxes = $("input:checkbox:checked");
364 if (!$(checkedBoxes).size()) {
365 alert( __("No item was selected") );
369 var tag = $("#tagsel_new").val();
370 if (!tag || (tag == "")) {
371 alert(MSG_NO_TAG_SPECIFIED);
376 for (var i = 0; i < $(checkedBoxes).size(); i++) {
377 var box = $(checkedBoxes).get(i);
378 bibs[i] = $(box).val();
381 KOHA.Tags.add_multitags_button(bibs, tag);
384 [% END # / TagsInputEnabled && loggedinusername %]
386 $(document).ready(function(){
387 $(".brief").click(function(e){
392 $(".detail").click(function(e){
397 $(".send").click(function(e){
402 $(".download-cart").on("click", function(e){
404 var format = $(this).data("format");
405 $("#download_format").val( format );
406 $("#download_cart").submit();
409 $(".empty").click(function(e){
414 $(".deleteshelf").click(function(e){
419 $(".newshelf").click(function(e){
424 $(".hold").click(function(e){
429 $("#tagsel_tag").click(function(e){
434 $("#tagsel_button").click(function(e){
439 $("#tagsel_cancel").click(function(e){
444 $("#CheckAll").click(function(e){
446 $(".cb").each(function(){
447 $(this).prop("checked", true);
448 selRecord(this.value, true);
450 enableCheckboxActions();
453 $("#CheckNone").click(function(e){
455 $(".cb").each(function(){
456 $(this).prop("checked", false);
457 selRecord(this.value, false);
459 enableCheckboxActions();
462 if( $("#itemst").length > 0 ){
463 var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
464 "order": [[ 1, "asc" ]],
466 { "targets": [ 0,-1 ], "sortable": false, "searchable": false }
470 { "type": "anti-the" },
477 var buttons = new $.fn.dataTable.Buttons(itemst, {
481 }).container().appendTo($('#toolbar'));
484 $(".cb").change(function(){
485 selRecord( $(this).val(), $(this).prop("checked") );
486 enableCheckboxActions();
489 enableCheckboxActions();
491 Sticky = $("#floating");
493 stickTo: "#userbasket",
494 stickyClass: "floating"
498 function enableCheckboxActions(){
499 // Enable/disable controls if checkboxes are checked
500 var checkedBoxes = $(".cb:checked");
501 if ( checkedBoxes.length ) {
502 $(".selections").html(_("With selected titles: "));
503 $(".selections-toolbar .links a").removeClass("disabled").attr("aria-disabled", "false");
505 $(".selections").html(_("Select titles to: "));
506 $(".selections-toolbar .links a").addClass("disabled").attr("aria-disabled", "true");
510 [% END # / BLOCK jsinclude %]