Bugzilla – Attachment 34680 Details for
Bug 13458
Add new patron shows default / hardcoded patron categories after search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13458: Display the correct patron categories
Bug-13458-Display-the-correct-patron-categories.patch (text/plain), 3.27 KB, created by
Jonathan Druart
on 2014-12-26 09:37:02 UTC
(
hide
)
Description:
Bug 13458: Display the correct patron categories
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-12-26 09:37:02 UTC
Size:
3.27 KB
patch
obsolete
>From 23973dabf1d4d943eba543920b842838376abc13 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 26 Dec 2014 10:22:34 +0100 >Subject: [PATCH] Bug 13458: Display the correct patron categories > >Bug 9811 removes useful code. >Actually the AddPatronLists pref is not sent to the template from >members/member.pl. > >To fix this issue, we can use the existing not clean way, or compare the >syspref value directly in the template. This second solution is >implemented in this patch. > >Test plan: >1/ Set the AddPatronLists pref to 'specific' >2/ On the patron home page (members/members-home/pl), the patron search >result page (members/member.pl after launching a search) and on the >checkouts page/patron search result (circ/circulation.pl after searching >a patron using the check out), verify that the patron category list is >the specific ones. >3/ Test there are no regression with the AddPatronLists pref set to >'general'. >--- > circ/circulation.pl | 3 --- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc | 2 +- > members/members-home.pl | 1 - > 3 files changed, 1 insertion(+), 5 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 6e9f449..50936d7 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -207,9 +207,6 @@ my $message; > if ($findborrower) { > my $borrowers = Search($findborrower, 'cardnumber') || []; > if (C4::Context->preference("AddPatronLists")) { >- $template->param( >- "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1", >- ); > if (C4::Context->preference("AddPatronLists")=~/code/){ > my $categories = GetBorrowercategoryList; > $categories->[0]->{'first'} = 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >index 8d36da3..f67f64c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >@@ -3,7 +3,7 @@ > <div class="btn-group"> > <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button> > <ul class="dropdown-menu"> >- [% IF ( AddPatronLists_categorycode ) %] >+ [% IF Koha.Preference('AddPatronLists') == 'categorycode' %] > [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=[% categorie.categorycode %]">[% categorie.description | html_entity %]</a></li>[% END %] > [% ELSE %] > <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=A">Adult patron</a></li> >diff --git a/members/members-home.pl b/members/members-home.pl >index c758ff2..37fc496 100755 >--- a/members/members-home.pl >+++ b/members/members-home.pl >@@ -95,7 +95,6 @@ my $pending_borrower_modifications = > Koha::Borrower::Modifications->GetPendingModificationsCount( $branch ); > > $template->param( >- "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1", > no_add => $no_add, > pending_borrower_modifications => $pending_borrower_modifications, > ); >-- >2.1.0
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 13458
:
34680
|
34682
|
34707
|
35555