@@ -, +, @@ cd misc/translate; ./translate update es-ES; ./translate install es-ES --- catalogue/itemsearch.pl | 5 ++++- .../intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc | 2 +- .../prog/en/includes/csv_headers/catalogue/itemsearch.tt | 2 ++ koha-tmpl/intranet-tmpl/prog/en/includes/empty_line.inc | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.csv.tt | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/empty_line.inc --- a/catalogue/itemsearch.pl +++ a/catalogue/itemsearch.pl @@ -303,7 +303,10 @@ if ($format eq 'csv') { type => 'text/csv', attachment => 'items.csv', }); - print $template->output; + + for my $line ( split '\n', $template->output ) { + print "$line\n" unless $line =~ m|^\s*$|; + } } else { output_with_http_headers $cgi, $cookie, $template->output, $content_type; } --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc @@ -1,4 +1,4 @@ [%- USE Branches -%] [%- biblio = item.biblio -%] [%- biblioitem = item.biblioitem -%] -"[% biblio.title |html %] by [% biblio.author |html %]", "[% biblioitem.publicationyear |html %]", "[% biblioitem.publishercode |html %]", "[% biblioitem.collectiontitle |html %]", "[% item.barcode |html %]", "[% item.itemcallnumber |html %]", "[% Branches.GetName(item.homebranch) |html %]", "[% Branches.GetName(item.holdingbranch) |html %]", "[% item.location |html %]", "[% item.stocknumber |html %]", "[% item.status |html %]", "[% (item.issues || 0) |html %]" +"[% biblio.title |html %] by [% biblio.author |html %]", "[% biblioitem.publicationyear |html %]", "[% biblioitem.publishercode |html %]", "[% biblioitem.collectiontitle |html %]", "[% item.barcode |html %]", "[% item.itemcallnumber |html %]", "[% Branches.GetName(item.homebranch) |html %]", "[% Branches.GetName(item.holdingbranch) |html %]", "[% item.location |html %]", "[% item.stocknumber |html %]", "[% item.status |html %]", "[% (item.issues || 0) |html %]"[% INCLUDE 'empty_line.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt @@ -0,0 +1,2 @@ +Title, Publication Date, Publisher, Collection, Barcode, Call number, Home library, Current location, Shelving location, Inventory number, Status, Checkouts + --- a/koha-tmpl/intranet-tmpl/prog/en/includes/empty_line.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/empty_line.inc @@ -0,0 +1, @@ + --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.csv.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.csv.tt @@ -1,4 +1,4 @@ -Title, Publication Date, Publisher, Collection, Barcode, Call number, Home library, Current location, Shelving location, Inventory number, Status, Checkouts +[% INCLUDE csv_headers/catalogue/itemsearch.tt %] [% FOREACH item IN results -%] [%- INCLUDE 'catalogue/itemsearch_item.csv.inc' item = item -%] [%- END -%] --