From ca7fa487c6c25d6d385ca5ae1e83a9732e04e08a Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Mon, 28 May 2012 14:49:04 -0400 Subject: [PATCH] Bug 6720: Display the authority type in OPAC Due to a peculiarity in the way SearchAuthorities worked, the authority search results on the OPAC always listed the authority type that the user searched for, rather than the authority type of the results. Signed-off-by: Katrin Fischer Works nicely, result list for OPAC search now shows the authority type for each record. Signed-off-by: Jared Camins-Esakov Rebased 20 June 2012. Signed-off-by: Mirko Tietgen <5p4m@gmx.de> Works as expected. --- C4/AuthoritiesMarc.pm | 4 ++++ .../prog/en/modules/opac-authoritiessearchresultlist.tt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index c92c319f90..f209ab18b4 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -351,6 +351,10 @@ sub SearchAuthorities { $reported_tag .= '$' . $_->[0] . $_->[1]; } } + my $thisauthtype = GetAuthType(GetAuthTypeCode($authid)); + $newline{authtype} = defined ($thisauthtype) ? + $thisauthtype->{'summary'} : + GetAuthType($authtypecode)->{'summary'}; $newline{summary} = $summary; $newline{even} = $counter % 2; $newline{reported_tag} = $reported_tag; diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt index a27480a1ed..2573dad397 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt @@ -54,7 +54,7 @@ [% END %] [% PROCESS authresult summary=resul.summary %] - [% authtypetext %] + [% resul.authtype %] [% UNLESS ( resul.isEDITORS ) %] [% resul.used %] biblios -- 2.39.5