From a28a718084bcc79ff98af84450151301dd801d6f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 3 May 2016 09:48:11 -0400 Subject: [PATCH] Bug 16315 - OPAC Shelfbrowser doesn't display the full title This patch adds subtitle information to the display of titles in the OPAC's shelf browser. To test, apply the patch and make sure OPACShelfBrowser is enabled. - View the detail page for any title in the OPAC which has items. - Click the "Browse shelf" link next to any item in the holdings table. - The titles in the shelf browser should display with all subtitle information as defined in Keywords to MARC mapping. Signed-off-by: Bernardo Gonzalez Kriegel Adding 245a and c as 'subtitle' in Keywords to Marc make them show on shelf browser. No errors. Signed-off-by: Jonathan Druart Signed-off-by: Brendan Gallagher (cherry picked from commit 67f91f24e537ef93d0c121b68681dcdec9f417e1) Signed-off-by: Julian Maurice (cherry picked from commit b47e87d0820c3f2e1afa4679c13234abc4d86517) Signed-off-by: Chris Cormack --- C4/ShelfBrowser.pm | 1 + .../opac-tmpl/bootstrap/en/includes/shelfbrowser.inc | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/C4/ShelfBrowser.pm b/C4/ShelfBrowser.pm index 13a0f7fda7..c28ce4774a 100644 --- a/C4/ShelfBrowser.pm +++ b/C4/ShelfBrowser.pm @@ -230,6 +230,7 @@ sub GetShelfInfo { $item->{'browser_normalized_oclc'} = GetNormalizedOCLCNumber($this_record,$marcflavour); $item->{'browser_normalized_isbn'} = GetNormalizedISBN(undef,$this_record,$marcflavour); $item->{'browser_normalized_ean'} = GetNormalizedEAN($this_record,$marcflavour); + $item->{'subtitle'} = GetRecordValue('subtitle', $this_record, GetFrameworkCode( $item->{biblionumber} )); push @valid_items, $item; } return @valid_items; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc index 255fac18ae..9e295b3b73 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc @@ -80,7 +80,13 @@ [% FOREACH item IN shelfbrowser_items %] [% item.itemcallnumber %] - [% item.title |html %] + + [% item.title |html %] + [% FOREACH subtitl IN item.subtitle %] + [% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] + [% subtitl.subfield |html %] + [% END %] + [% END %] -- 2.39.5