From e717d3eb3b8a906772970634d0f361fcba881444 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Wed, 18 Mar 2015 01:11:24 +0100 Subject: [PATCH] Bug 13589: Item search improvements - publication date and title formatting In the item search accessible from the advanced search the publication date would not display for MARC21 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 includes punctuation. To test: - 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 --- .../prog/en/includes/catalogue/itemsearch_item.json.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc index 605a1bf..4085b94 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc @@ -1,11 +1,12 @@ [%- USE Branches -%] +[%- USE Koha -%] [%- biblio = item.biblio -%] [%- biblioitem = item.biblioitem -%] [ "[% FILTER escape_quotes = replace('"', '\"') ~%] - [% biblio.title |html %] by [% biblio.author |html %] + [% biblio.title |html %][% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %] by[% END %] [% biblio.author |html %] [%~ END %]", - "[% biblioitem.publicationyear |html %]", + "[% (biblioitem.publicationyear || biblio.copyrightdate) |html %]", "[% biblioitem.publishercode |html %]", "[% biblioitem.collectiontitle |html %]", "[% FILTER escape_quotes ~%] -- 1.9.1