From d8aae99a1cf69a019139debbbb18906956b0702a Mon Sep 17 00:00:00 2001 From: Aleisha Date: Thu, 7 Jul 2016 23:26:12 +0000 Subject: [PATCH] Bug 16875: OPAC - removing link to records if authority is not used by any records MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To test: 1) Do an authority search. Notice that authorities not used by any records have a clickable link (under Biblio records) which redirects to a catalog search with no results 2) Go back to the authority search and click View full heading for an authority with no records. Notice that under the auth name, it says Number of records used in: 0, with a link to a catalog search 3) Apply patch 4) Repeat steps 1 and 2. Authorities not used in any records should no longer have clickable links nd authorities which have records should work as expected. Sponsored-by: Catalyst IT Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt | 2 +- .../bootstrap/en/modules/opac-authoritiessearchresultlist.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt index 3f3f55c6bb..fd85eda98d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt @@ -46,7 +46,7 @@

[% summary.mainentry %][% IF authtypetext %] ([% authtypetext %])[% END %]

- Number of records used in: [% count %] + [% IF count > 0 %]Number of records used in: [% count %][% ELSE %]This authority is not used in any records.[% END %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt index 605c35a6e8..e6d5e24293 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt @@ -66,7 +66,7 @@ [% resul.authtype %] [% UNLESS ( resul.isEDITORS ) %] - [% resul.used %] biblios + [% IF resul.used > 0 %][% resul.used %] biblios[% ELSE %]0 biblios[% END %] [% END %] -- 2.39.5