Bugzilla – Attachment 131065 Details for
Bug 20615
Add the link of number of times the authority are used in edit mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20615: Add the link of number of times the authority are used in edit mode
Bug-20615-Add-the-link-of-number-of-times-the-auth.patch (text/plain), 3.17 KB, created by
George Veranis
on 2022-02-24 15:47:39 UTC
(
hide
)
Description:
Bug 20615: Add the link of number of times the authority are used in edit mode
Filename:
MIME Type:
Creator:
George Veranis
Created:
2022-02-24 15:47:39 UTC
Size:
3.17 KB
patch
obsolete
>From 7d270779f10f19c300fc0bf02d38c11469e846cc Mon Sep 17 00:00:00 2001 >From: root <root@vmi538303.contaboserver.net> >Date: Thu, 24 Feb 2022 16:16:19 +0100 >Subject: [PATCH] Bug 20615: Add the link of number of times the authority are > used in edit mode > >Currently when show an authority record you can see the count of records linked >with that authority, but when edit that authority record the that detail is >dissapeared. >Applying this patch will have that information also on edit mode of authority. > >Test plan: >1) Search for an authority that is already connected with at least one record >2) On detail view of an authority you can check that authority is linked with > x records. >3) Edit that authority and the information about in how many records that > authority is linked is missing. >4) Apply this patch >5) Edit again that authrity and you can find now the count in how many records > is used that authority >--- > authorities/authorities.pl | 5 ++++- > .../prog/en/modules/authorities/authorities.tt | 8 +++++++- > 2 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/authorities/authorities.pl b/authorities/authorities.pl >index 3b4a5d64be..1c2b3d068c 100755 >--- a/authorities/authorities.pl >+++ b/authorities/authorities.pl >@@ -557,13 +557,16 @@ if(!$authtypecode) { > $authtypecode = $authid ? Koha::Authorities->find($authid)->authtypecode : ''; > } > >+my $authobj = Koha::Authorities->find($authid); >+my $count = $authobj ? $authobj->get_usage_count : 0; >+ > my ($template, $loggedinuser, $cookie) > = get_template_and_user({template_name => "authorities/authorities.tt", > query => $input, > type => "intranet", > flagsrequired => {editauthorities => 1}, > }); >-$template->param(nonav => $nonav,index=>$myindex,authtypecode=>$authtypecode,breedingid=>$breedingid); >+$template->param(nonav => $nonav,index=>$myindex,authtypecode=>$authtypecode,breedingid=>$breedingid, count=>$count); > > $tagslib = GetTagsLabels(1,$authtypecode); > $mandatory_z3950 = GetMandatoryFieldZ3950($authtypecode); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index 71a935a5bc..c9f2ee32cc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -263,7 +263,13 @@ > [% END %] > </div> > </div> <!-- /#toolbar --> >- >+ <div id="action"> >+ [% IF count %] >+ Used in <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&op=do_search&q=an=[% authid | uri %]">[% count | html %] record(s)</a> >+ [% ELSE %] >+ This authority is not used in any records. >+ [% END %] >+ </div> > <div id="authoritytabs" class="toptabs numbered"> > <ul> > [% FOREACH BIG_LOO IN BIG_LOOP %] >-- >2.20.1
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 20615
:
129207
|
129294
|
131065
|
131171
|
134226
|
134249