@@ -, +, @@ - Open the cart - The "Download" button should now be a dropdown menu. - Selecting any of the download options should trigger a download prompt. - Test with and without some CSV profiles which have been configured for use in the OPAC --- .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 27 +++++++++++++++++++--- opac/opac-basket.pl | 3 ++- 2 files changed, 26 insertions(+), 4 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt @@ -27,7 +27,22 @@ [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] Send [% END %] - Download + + + Empty and close Hide window [% IF ( verbose ) %] @@ -295,6 +310,10 @@
+
+ + +
@@ -369,9 +388,11 @@ sendBasket(); }); - $(".download").click(function(e){ + $(".download-cart").on("click", function(e){ e.preventDefault(); - downloadBasket(); + var format = $(this).data("format"); + $("#download_format").val( format ); + $("#download_cart").submit(); }); $(".empty").click(function(e){ --- a/opac/opac-basket.pl +++ a/opac/opac-basket.pl @@ -26,7 +26,7 @@ use C4::Circulation; use C4::Auth; use C4::Output; use Koha::RecordProcessor; - +use Koha::CsvProfiles; use Koha::AuthorisedValues; my $query = new CGI; @@ -167,6 +167,7 @@ my $resultsarray = \@results; # my $itemsarray=\@items; $template->param( + csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records', opac_option => 1 }) ], bib_list => $bib_list, BIBLIO_RESULTS => $resultsarray, ); --