From d96e2e71b8ac77e09194d02e72d67ec5c03187ec Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 31 Oct 2017 12:25:17 +0000 Subject: [PATCH] Bug 19550: Add links to related authorities for UNIMARC Links exist in search results for MARC21 but not for UNIMARC. This patch fixes that. Test plan: 1. Create an authority with a field 550 that links to another authority e.g. 550 $a Foo $9 42 2. Reindex this authority 3. Search for this authority 4. See that you now have a link "Foo" to authorities/detail.pl?authid=42 in the summary Signed-off-by: delaye Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- .../en/includes/authorities-search-results.inc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc index 7deec643ea..be3c0abfe5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc @@ -8,15 +8,20 @@ [% SET searchurl = '/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&marclist=any&operator=contains&orderby=HeadingAsc&value=' %] [% IF marcflavour == 'UNIMARC' %] + [% IF authid %] + [% link = BLOCK %][% heading | html %][% END %] + [% ELSE %] + [% link = BLOCK %][% heading | html %][% END %] + [% END %] [% SWITCH type %] [% CASE 'broader' %] - BT: [% heading | html %] + BT: [% link %] [% CASE 'narrower' %] - NT: [% heading | html %] + NT: [% link %] [% CASE 'seefrom' %] - UF: [% heading | html %] + UF: [% link %] [% CASE 'seealso' %] - RT: [% heading | html %] + RT: [% link %] [% END %] [% ELSE %] @@ -72,7 +77,7 @@ [% IF summary.seefrom %]
[% FOREACH see IN summary.seefrom %] - [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %] + [% PROCESS showreference heading=see.heading linkType="" type=see.type authid=see.authid %] [% IF ! loop.last %] ; [% END %] [% END %]
@@ -80,7 +85,7 @@ [% IF summary.seealso %]
[% FOREACH see IN summary.seealso %] - [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %] + [% PROCESS showreference heading=see.heading linkType="" type=see.type authid=see.authid %] [% IF ! loop.last %] ; [% END %] [% END %]
-- 2.39.5