Bugzilla – Attachment 49332 Details for
Bug 16082
Empty patron detail page is displayed if the patron does not exist - circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 16082: Display a friendly "patron does not exist" message if that's the case - circulation.pl
PASSED-QA-Bug-16082-Display-a-friendly-patron-does.patch (text/plain), 7.22 KB, created by
Katrin Fischer
on 2016-03-20 16:03:28 UTC
(
hide
)
Description:
[PASSED QA] Bug 16082: Display a friendly "patron does not exist" message if that's the case - circulation.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-03-20 16:03:28 UTC
Size:
7.22 KB
patch
obsolete
>From 8f407e2eaa531a7f23f49a7ba2fd09d422ccd0d7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Mar 2016 10:01:18 +0000 >Subject: [PATCH] [PASSED QA] Bug 16082: Display a friendly "patron does not > exist" message if that's the case - circulation.pl >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The major part of pages you can access from a patron detail page (menu) >does not take into consideration the 'patron does not exist' case. >If the borrowernumber is linked to a deleted patron, a friendly message >should be displayed instead of an empty patron detail page. > >Test plan: >Go on circ/circulation.pl?borrowernumber=424242 >and circ/circulation.pl?borrowernumber=424242&batch=1 >Notice the difference before and after this patch > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > circ/circulation.pl | 2 +- > .../prog/en/modules/circ/circulation.tt | 16 +++++++------ > .../en/modules/circ/circulation_batch_checkouts.tt | 28 ++++++++++++++-------- > 3 files changed, 28 insertions(+), 18 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 5cfd93f..75799bd 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -537,7 +537,7 @@ foreach my $flag ( sort keys %$flags ) { > } > } > >-my $amountold = $borrower->{flags}->{'CHARGES'}->{'message'} || 0; >+my $amountold = $borrower->{flags} ? $borrower->{flags}->{'CHARGES'}->{'message'} || 0 : 0; > $amountold =~ s/^.*\$//; # remove upto the $, if any > > my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index c4b41f3..eaae5d7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -10,7 +10,7 @@ > [% INCLUDE 'doc-head-open.inc' %] > [% SET destination = "circ" %] > <title>Koha › Circulation >-[% IF borrowernumber %] >+[% IF borrowernumber and borrower%] > › Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %] > [% END %] > </title> >@@ -50,7 +50,7 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); > > columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %] > >-[% IF ( borrowernumber ) %] >+[% IF borrowernumber and borrower %] > if($.cookie("holdfor") != [% borrowernumber %]){ > $.removeCookie("holdfor", { path: '/' }); > } >@@ -129,7 +129,7 @@ $(document).ready(function() { > [% INCLUDE 'circ-search.inc' %] > > <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › >-[% IF ( borrowernumber ) %] >+[% IF borrowernumber and borrower %] > <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> › [% INCLUDE 'patron-title.inc' %] > [% ELSE %] > <strong>Checkouts</strong> >@@ -149,7 +149,7 @@ $(document).ready(function() { > <div class="yui-b"> > [% END %] > >-[% IF ( borrowernumber ) %] >+[% IF borrowernumber and borrower %] > [% INCLUDE 'members-toolbar.inc' %] > [% END %] > >@@ -599,7 +599,7 @@ No patron matched <span class="ex">[% message %]</span> > > <!-- BARCODE ENTRY --> > >-[% IF ( borrowernumber ) %] >+[% IF borrowernumber and borrower %] > <div class="yui-g"> > > [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %] >@@ -977,13 +977,15 @@ No patron matched <span class="ex">[% message %]</span> > [% END %] > </div> <!-- reservesloop --> > >-[% END %] <!-- borrowernumber --> >+[% ELSE %] >+ <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div> >+[% END %] <!-- borrowernumber and borrower--> > </div></div> > [% END %] > > </div> > </div> >-[% UNLESS ( borrowers ) %][% IF ( borrowernumber ) %]<div class="yui-b"> >+[% UNLESS ( borrowers ) %][% IF borrowernumber and borrower %]<div class="yui-b"> > [% INCLUDE 'circ-menu.inc' %] > </div>[% END %][% END %] > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >index 8118251..eadeb1d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >@@ -7,7 +7,7 @@ > [% INCLUDE 'doc-head-open.inc' %] > [% SET destination = "circ" %] > <title>Koha › Circulation >-[% IF borrowernumber %] >+[% IF borrowernumber and borrower %] > › Batch check out › Issuing items to [% INCLUDE 'patron-title.inc' invert_name = 1 %] > [% END %] > </title> >@@ -42,7 +42,11 @@ $(document).ready(function() { > [% INCLUDE 'circ-search.inc' %] > > <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › >- <a href="/cgi-bin/koha/circ/circulation.pl">Batch check out</a> › [% INCLUDE 'patron-title.inc' %] >+ [% IF borrower and borrowernumber %] >+ <a href="/cgi-bin/koha/circ/circulation.pl">Batch check out</a> › [% INCLUDE 'patron-title.inc' %] >+ [% ELSE %] >+ Batch check out >+ [% END %] > </div> > <div id="doc3" class="yui-t2"> > >@@ -52,20 +56,20 @@ $(document).ready(function() { > > <div class="yui-g"> > >-[% IF ( borrowernumber ) %] >+[% IF borrowernumber and borrower %] > [% INCLUDE 'members-toolbar.inc' %] > [% END %] > >-[% IF NOT batch_allowed %] >+[% IF borrower and not batch_allowed %] > <div class="dialog alert">You are not allowed to use batch checkout for this patron</div> >-[% ELSIF noissues and not checkout_infos %] >+[% ELSIF borrower and noissues and not checkout_infos %] > <div class="dialog alert"> > Cannot check out! > [% IF charges_is_blocker %] > Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>. > [% END %] > </div> >-[% ELSIF NOT checkout_infos %] >+[% ELSIF borrower and not checkout_infos %] > <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl"> > <fieldset id="circ_circulation_issue"> > <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label> >@@ -94,7 +98,7 @@ $(document).ready(function() { > </fieldset> > </form> > >-[% ELSE %] >+[% ELSIF borrower %] > [% IF confirmation_needed && CAN_user_circulate_force_checkout %] > <h3>Batch checkout confirmation [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3> > <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off"> >@@ -276,13 +280,17 @@ $(document).ready(function() { > </form> > [% END %] > >+[% ELSE %] >+ <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div> > [% END %] > > </div> > </div> > </div> >-<div class="yui-b"> >-[% INCLUDE 'circ-menu.inc' %] >-</div> >+[% IF borrower %] >+ <div class="yui-b"> >+ [% INCLUDE 'circ-menu.inc' %] >+ </div> >+[% END %] > </div> > [% INCLUDE 'intranet-bottom.inc' %] >-- >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 16082
:
49205
|
49211
| 49332