Bug 16875: OPAC - removing link to records if authority is not used by any records

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 <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Aleisha 2016-07-07 23:26:12 +00:00 committed by Kyle M Hall
parent 4d417521c0
commit d8aae99a1c
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@
<h1>[% summary.mainentry %][% IF authtypetext %] ([% authtypetext %])[% END %]</h1>
<div class="usedin">
<a href="opac-search.pl?type=opac&amp;q=[% authid %]&amp;idx=an,phr">Number of records used in: [% count %]</a>
[% IF count > 0 %]<a href="/cgi-bin/koha/opac-search.pl?type=opac&amp;q=[% authid %]&amp;idx=an,phr">Number of records used in: [% count %]</a>[% ELSE %]This authority is not used in any records.[% END %]
</div>
<div class="authstanza">

View File

@ -66,7 +66,7 @@
<td>[% resul.authtype %]</td>
[% UNLESS ( resul.isEDITORS ) %]
<td>
<a href="/cgi-bin/koha/opac-search.pl?type=opac&amp;op=do_search&amp;q=an=[% resul.authid %]">[% resul.used %] biblios</a>
[% IF resul.used > 0 %]<a href="/cgi-bin/koha/opac-search.pl?type=opac&amp;op=do_search&amp;q=an=[% resul.authid %]">[% resul.used %] biblios</a>[% ELSE %]0 biblios[% END %]
</td>
[% END %]
</tr>