From cd9a827b6928ed0cb80c78ebf897e2d77132296a Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 9 Jun 2015 02:44:48 +0200 Subject: [PATCH] Bug 14303: Fix item search CSV export - obsolete "by" and display of publication year for MARC21 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The exported CSV file from the item search didn't display the publication year in MARC21 installations and the title always contained 'by' even if there was no author information to display. Also the by is not needed by MARC21 as the data should include punctuation. This basically copies the changes done to the JSON format on bug 13859 to the CSV include. To test: Switch from 'Screen' to 'CSV' - Check publication date always displays (MARC21 and UNIMARC) - Check that for MARC21 the 'by' has been removed from the title information - Check that for UNIMARC the 'by' only displays when there is also an author to display Tested for MARC21, works as expected. Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../prog/en/includes/catalogue/itemsearch_item.csv.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc index 9cc781c262..82e014ce15 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc @@ -1,4 +1,5 @@ [%- USE Branches -%] +[%- USE Koha -%] [%- 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 %]"[% INCLUDE 'empty_line.inc' %] +"[% biblio.title |html %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author |html %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) |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' %] -- 2.39.5