@@ -, +, @@
- In the toolbar at the top of the list contents table 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
---
.../bootstrap/en/modules/opac-shelves.tt | 33 +++++++++++++------
opac/opac-shelves.pl | 6 ++++
2 files changed, 29 insertions(+), 10 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
@@ -208,7 +208,18 @@
-
-
-
-
-
Loading
-
-
-
-
+
@@ -1044,6 +1050,13 @@ $(function() {
);
});
+ $(".download-list").on("click", function(e){
+ e.preventDefault();
+ var format = $(this).data("format");
+ $("#download_format").val( format );
+ $("#download_list").submit();
+ });
+
}); // document.ready
function sortMenu( sorting_form ){
--- a/opac/opac-shelves.pl
+++ a/opac/opac-shelves.pl
@@ -33,6 +33,7 @@ use C4::XSLT;
use Koha::Biblios;
use Koha::Biblioitems;
use Koha::CirculationRules;
+use Koha::CsvProfiles;
use Koha::Items;
use Koha::ItemTypes;
use Koha::Patrons;
@@ -385,6 +386,11 @@ if ( $op eq 'view' ) {
itemsloop => \@items,
sortfield => $sortfield,
direction => $direction,
+ csv_profiles => [
+ Koha::CsvProfiles->search(
+ { type => 'marc', used_for => 'export_records', staff_only => 0 }
+ )
+ ],
);
if ( $page ) {
my $pager = $contents->pager;
--