[Koha-patches] [PATCH] Bug 6720: Display the authority type in OPAC

Jared Camins-Esakov jcamins at cpbibliography.com
Thu Jun 14 01:27:41 CEST 2012


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.
---
 C4/AuthoritiesMarc.pm                              |    1 +
 .../en/modules/opac-authoritiessearchresultlist.tt |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm
index 5ea5098..405e689 100644
--- a/C4/AuthoritiesMarc.pm
+++ b/C4/AuthoritiesMarc.pm
@@ -351,6 +351,7 @@ sub SearchAuthorities {
                         $reported_tag .= '$' . $_->[0] . $_->[1];
                     }
                 }
+                $newline{authtype}     = GetAuthType(GetAuthTypeCode($authid))->{'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 5fdfb27..ecd345d 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt
@@ -55,7 +55,7 @@
 					<td>[% resul.summary %]</td>
 
 						<td>
-					[% authtypetext %]
+                        [% resul.authtype %]
 						</td>
 					[% UNLESS ( resul.isEDITORS ) %]
 						<td>
-- 
1.7.2.5



More information about the Koha-patches mailing list