From d0a29bd410829d301a559d7c82f4fc1b3426bfcf 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 Content-Type: text/plain; charset="utf-8" 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 ++++ .../en/modules/opac-authoritiessearchresultlist.tt | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index c92c319..f209ab1 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 a27480a..2573dad 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 -- 1.7.2.5