From d934e72f5d7ee919b7a1e2e013a317371c20d37f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 25 May 2017 12:40:43 +0000 Subject: [PATCH] Bug 12644 - Add subtitles to staff client cart This patch adds display of subtitles to the staff client cart. To test you should have some values mapped to subtitle in Administration -> Keyword to MARC Mapping. 1. Apply the patch. 2. Add some records to the staff client cart which have subtitles. 3. Open the cart and onfirm that subtitles display correctly in both the brief and "More details" view. Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- basket/basket.pl | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/basket/basket.pl b/basket/basket.pl index 14f661fd5f..ae65a8e56c 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -61,9 +61,12 @@ if (C4::Context->preference('TagsEnabled')) { foreach my $biblionumber ( @bibs ) { $template->param( biblionumber => $biblionumber ); + my $fw = GetFrameworkCode($biblionumber); + my $dat = &GetBiblioData($biblionumber); next unless $dat; my $record = &GetMarcBiblio($biblionumber); + $dat->{subtitle} = GetRecordValue('subtitle', $record, $fw); my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index c4f0e1167d..30f276c040 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -78,12 +78,12 @@

[% IF ( print_basket ) %] [% BIBLIO_RESULT.title |html %] - [% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %] + [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield | html %][% END %] [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author %][% END %] [% ELSE %] [% BIBLIO_RESULT.title |html %] - [% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %] + [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield | html %][% END %] [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author %][% END %] [% END %]

@@ -253,7 +253,7 @@ [% END %] - [% BIBLIO_RESULT.title |html %] + [% BIBLIO_RESULT.title |html %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield | html %][% END %] [% BIBLIO_RESULT.author %]

[% IF ( BIBLIO_RESULT.publishercode ) %]- [% BIBLIO_RESULT.publishercode %] -- 2.39.5