Bugzilla – Attachment 74670 Details for
Bug 20363
Privacy management shows misleading "No reading history to delete"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20363: (bug 16966 follow-up) better messages handling
Bug-20363-bug-16966-follow-up-better-messages-hand.patch (text/plain), 2.59 KB, created by
Katrin Fischer
on 2018-04-21 08:01:48 UTC
(
hide
)
Description:
Bug 20363: (bug 16966 follow-up) better messages handling
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-04-21 08:01:48 UTC
Size:
2.59 KB
patch
obsolete
>From 01c8ec3c88943f26be8288f64cd194a189bec28d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 23 Mar 2018 13:58:24 -0300 >Subject: [PATCH] Bug 20363: (bug 16966 follow-up) better messages handling > >User views the "Your privacy" -page, it shows "No reading history to >delete", even when the user has history. > >Test plan: >- Turn OPACPrivacy on >- Go to opac-privacy.pl >- Click the "Immediate deletion button" to delete the reading history >=> If the patron has reading history you must get "Your reading history has been deleted." >Otherwise "No reading history to delete" > >Note that this patch reintroduce the "something went wrong" message if >the deletion failed for whatever reason. > >Signed-off-by: David Bourgault <david.bourgault@inlibro.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt | 4 +++- > opac/opac-privacy.pl | 9 +++++++-- > 2 files changed, 10 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >index 98346f6b90..143f4e023b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >@@ -27,7 +27,9 @@ > > [% IF deleted %] > <div class="alert alert-success">Your reading history has been deleted.</div> >- [% ELSE %] >+ [% ELSIF history_not_deleted %] >+ <div class="alert">The deletion of your reading history failed, because there is a problem with the configuration of this feature. Please help to fix the system by informing your library of this error</div> >+ [% ELSIF nothing_to_delete %] > <div class="alert">No reading history to delete</div> > [% END %] > >diff --git a/opac/opac-privacy.pl b/opac/opac-privacy.pl >index ff0d3282d7..8796a7a8dd 100755 >--- a/opac/opac-privacy.pl >+++ b/opac/opac-privacy.pl >@@ -63,8 +63,13 @@ elsif ( $op eq "delete_record" ) { > my $rows = eval { > Koha::Patrons->search({ 'me.borrowernumber' => $borrowernumber })->anonymise_issue_history; > }; >- $rows = $@ ? 0 : int($rows); >- $template->param( 'deleted' => $rows ); >+ $template->param( >+ ( >+ $@ ? ( history_not_deleted => 1 ) >+ : $rows ? ( deleted => int($rows) ) >+ : ( nothing_to_delete => 1 ) >+ ) >+ ); > } > > # get borrower privacy .... >-- >2.14.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 20363
:
73208
|
73432
|
74663
| 74670