Bugzilla – Attachment 48451 Details for
Bug 15931
If Authority is not used by any records, remove link to cataloguing search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15931: Removing link to records if authority is not used by any records
Bug-15931-Removing-link-to-records-if-authority-is.patch (text/plain), 2.91 KB, created by
Nick Clemens (kidclamp)
on 2016-02-29 13:34:48 UTC
(
hide
)
Description:
Bug 15931: Removing link to records if authority is not used by any records
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-02-29 13:34:48 UTC
Size:
2.91 KB
patch
obsolete
>From 96d228091c5eb2bc5ace60f3e18ec44e4682ef67 Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Mon, 29 Feb 2016 00:42:28 +0000 >Subject: [PATCH] Bug 15931: Removing link to records if authority is not used > by any records > >To test: >1) Do an authority search on authorities-home.pl. Notice that authorities not used in any records have a clickable link (under 'Used in:' column) which redirects to a catalog search with no results >2) Go back to your authority search results on authorities-home.pl and click 'Details'. Notice that under the auth name, there is a 'Used in X records' link that again returns a catalog search with no results. >3) Apply patch >4) Repeat steps 1, 2. Authorities not used in any records should no longer have clickable links and authorities which are used in records should work as expected. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt | 8 +++++--- > .../intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt | 6 +++++- > 2 files changed, 10 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >index 737130a..fddd91f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >@@ -90,9 +90,11 @@ function searchauthority() { > <h1>Authority #[% authid %] ([% authtypetext %])</h1> > > <div id="action"> >- >- >- Used in <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&op=do_search&q=an=[% authid %]">[% count %] record(s)</a> >+ [% IF count > 0 %] >+ Used in <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&op=do_search&q=an=[% authid %]">[% count %] record(s)</a> >+ [% ELSE %] >+ Used in 0 records >+ [% END %] > </div> > > <div id="authoritiestabs" class="toptabs numbered"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >index be2e156..6d40e13 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >@@ -83,7 +83,11 @@ function searchauthority() { > <td><a href="detail.pl?authid=[% resul.authid %]">Details</a></td> > [% UNLESS ( resul.isEDITORS ) %] > <td> >- <a href="../catalogue/search.pl?type=intranet&op=do_search&idx=an,phr&q=[% resul.authid %]" class="button">[% resul.used %] records(s)</a> >+ [% IF resul.used > 0 %] >+ <a href="../catalogue/search.pl?type=intranet&op=do_search&idx=an,phr&q=[% resul.authid %]" class="button">[% resul.used %] records(s)</a> >+ [% ELSE %] >+ 0 records >+ [% END %] > </td> > [% END %] > [% IF ( CAN_user_editauthorities ) %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15931
:
48419
|
48451
|
48521
|
49284
|
49539
|
49569
|
49570