Bugzilla – Attachment 30523 Details for
Bug 8521
Error in warning message when deleting list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 8521 - Error in warning message when deleting list
PASSED-QA-Bug-8521---Error-in-warning-message-when.patch (text/plain), 4.03 KB, created by
Katrin Fischer
on 2014-08-03 20:54:49 UTC
(
hide
)
Description:
[PASSED QA] Bug 8521 - Error in warning message when deleting list
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-08-03 20:54:49 UTC
Size:
4.03 KB
patch
obsolete
>From a97dfa566ccb0573aa1f6bedf07054e3d4985a03 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 15 Jul 2014 15:35:54 -0400 >Subject: [PATCH] [PASSED QA] Bug 8521 - Error in warning message when deleting > list > >When deleting a list the operation is blocked if there are items still >on the list, and the interface shows a warning which includes a count of >the items on the list. This count is broken for lists containing more >items than the number specified in the numSearchResults system >preference. > >This patch corrects the item count to use an actual count of the total >number of results, not the total number of results in the first page of >results. > >The template change to the staff client copies some language logic from >the OPAC template for dealing with a single number of list entries. > >Test in both the OPAC and the staff client. > >Check the number specified in the numSearchResults system preference and >locate or create a list containing more than that number of items. Try >to delete the list. You should receive a warning message stating the >correct total number of items on the list. > >Test also with a list which contains fewer than numSearchResults >entries, and a list which contains zero entries. > >Signed-off-by: Ian Beardslee <ian@catalyst.net.nz> > >Tested Public and Private lists with 0, 5 & 25 entries, Public with 40 and Private with 45. Working as expected. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works as described, passes tests and QA script. >--- > C4/VirtualShelves/Page.pm | 6 +++--- > koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 6 +++++- > 2 files changed, 8 insertions(+), 4 deletions(-) > >diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm >index 3c90afc..56518c2 100644 >--- a/C4/VirtualShelves/Page.pm >+++ b/C4/VirtualShelves/Page.pm >@@ -384,13 +384,13 @@ sub shelfpage { > } > my $contents; > ( $contents, $totshelves ) = GetShelfContents( $number, $shelveslimit, $shelvesoffset ); >- if ( my $count = scalar @$contents ) { >+ if ( $totshelves > 0 ) { > unless ( scalar grep { /^CONFIRM-$number$/ } $query->param() ) { > if ( defined $shelflist->{$number} ) { >- push( @paramsloop, { need_confirm => $shelflist->{$number}->{shelfname}, count => $count, single => ($count eq 1 ? 1:0) } ); >+ push( @paramsloop, { need_confirm => $shelflist->{$number}->{shelfname}, count => $totshelves, single => ($totshelves eq 1 ? 1:0) } ); > $shelflist->{$number}->{confirm} = $number; > } else { >- push( @paramsloop, { need_confirm => $privshelflist->{$number}->{shelfname}, count => $count } ); >+ push( @paramsloop, { need_confirm => $privshelflist->{$number}->{shelfname}, count => $totshelves } ); > $privshelflist->{$number}->{confirm} = $number; > } > $stay = 0; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 23d815f..95505e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -234,7 +234,11 @@ function placeHold () { > [% IF ( paramsloo.noshelfnumber ) %]<div class="dialog alert">ERROR: No list number given.</div>[% END %] > [% IF ( paramsloo.need_confirm ) %] > <div class="dialog alert">The list <i>[% paramsloo.need_confirm %]</i> is not empty. >- <br />It has <b>[% paramsloo.count %]</b> entries. >+ [% IF ( paramsloo.single ) %] >+ <br />It has <b>[% paramsloo.count %]</b> entry. >+ [% ELSE %] >+ <br />It has <b>[% paramsloo.count %]</b> entries. >+ [% END %] > <br />Use the "Confirm" button below to confirm deletion. > </div> > [% END %] >-- >1.9.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 8521
:
29751
|
30064
| 30523