Bugzilla – Attachment 151974 Details for
Bug 33247
Deleted authority still on results list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33247: Flag the authority pending deletion in the result list
Bug-33247-Flag-the-authority-pending-deletion-in-t.patch (text/plain), 2.77 KB, created by
Marcel de Rooy
on 2023-06-02 08:39:55 UTC
(
hide
)
Description:
Bug 33247: Flag the authority pending deletion in the result list
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-06-02 08:39:55 UTC
Size:
2.77 KB
patch
obsolete
>From 1326ead8bee953763a0081b375a4d536fb48cb5b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 11 May 2023 13:48:50 +0200 >Subject: [PATCH] Bug 33247: Flag the authority pending deletion in the result > list >Content-Type: text/plain; charset=utf-8 > >When an authority is removed from the result list it is not removed from >the search engine yet. >This patch suggests to add a note in the summary column to tell the user >that the deletion is pending. > >Test plan: >1 - Go to authorities home and perform a search; >2 - Delete any authority; >3 - After the confirmation, the page is refreshed but still contains the >deleted authority, with a red note explaining that the deletion is >pending. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > authorities/authorities-home.pl | 4 ++++ > .../prog/en/modules/authorities/searchresultlist.tt | 1 + > 2 files changed, 5 insertions(+) > >diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl >index 2be064c1c2..5b4ab19bd7 100755 >--- a/authorities/authorities-home.pl >+++ b/authorities/authorities-home.pl >@@ -46,6 +46,7 @@ my $authid = $query->param('authid') || ''; > my ( $template, $loggedinuser, $cookie ); > > my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypetext'] } ); >+my $pending_deletion_authid; > > if ( $op eq "delete" ) { > ( $template, $loggedinuser, $cookie ) = get_template_and_user( >@@ -64,6 +65,8 @@ if ( $op eq "delete" ) { > }); > > DelAuthority({ authid => $authid }); >+ # FIXME No error handling here, DelAuthority needs adjustments >+ $pending_deletion_authid = $authid; > > if ( $query->param('operator') ) { > # query contains search params so perform search >@@ -238,6 +241,7 @@ my $servers = Koha::Z3950Servers->search( > $template->param( > servers => $servers, > authority_types => $authority_types, >+ pending_deletion_authid => $pending_deletion_authid, > op => $op, > ); > >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 42826d7928..22cbd559b6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >@@ -73,6 +73,7 @@ > [% ELSE %] > [% PROCESS authresult summary=resul.summary authid=resul.authid %] > [% END %] >+ [% IF pending_deletion_authid == resul.authid %]<span style="color: red;">Pending deletion</span>[% END %] > </td> > <td>[% resul.authtype | html %]</td> > [% UNLESS ( resul.isEDITORS ) %] >-- >2.30.2
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 33247
:
151070
|
151162
| 151974 |
151975