Bugzilla – Attachment 40891 Details for
Bug 14508
'New patron' dropdown empty list on circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14508: 'New patron' dropdown empty list on circulation.pl
Bug-14508-New-patron-dropdown-empty-list-on-circul.patch (text/plain), 2.25 KB, created by
Jonathan Druart
on 2015-07-09 15:17:59 UTC
(
hide
)
Description:
Bug 14508: 'New patron' dropdown empty list on circulation.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-07-09 15:17:59 UTC
Size:
2.25 KB
patch
obsolete
>From 8064e6407264398afe1901a02e34111a42b62b21 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 8 Jul 2015 18:25:45 -0300 >Subject: [PATCH] Bug 14508: 'New patron' dropdown empty list on circulation.pl >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch makes includes/patron-toolbar.inc (the one in charge of >rendering the 'New patron' dropdown) make use of the Categories >Template Toolkit plugin to create the list of categories. > >(1) To check the setup is sane: >- Go to the Patrons page >=> SUCCESS: The 'New patron' dropdown is populated >- Click on the [+] symbol on the Patron search on the top >=> SUCCESS: The Categories dropdown is populated > >(2) To test the patch: >- On the checkout form, perform a patron search that > (a) returns more than one result > (b) returns zero results >- Click the dropdown menu to create a new patron >=> FAIL: Dropdown is empty >- Repeat for (a) or (b) >- Apply the patch and reload >=> SUCCESS: The dropdown is correctly populated >- Repeat (1) >=> SUCCESS: Nothing got broken >- Verify the logs >=> SUCCESS: No new warnings >- Sign off :-D >- Get a cookie >- Smile > >Regards > >Discussion: we might need a new bug to start cleaning stuff like this: > >@categories=C4::Category->all; >if(scalar(@categories) < 1){ > $no_add = 1; > $template->param(no_categories => 1); >} >else { > $template->param(categories=>\@categories); >} > >but it belongs to a new bug me thinks. Well, suggestions are welcome, but this must >be fixed on stable ASAP so hurry :-D > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc | 3 +++ > 1 file changed, 3 insertions(+) > >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 10c14a8..2df6cec 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc >@@ -1,3 +1,6 @@ >+[% USE Categories %] >+[% SET categories = Categories.all %] >+ > [% UNLESS ( no_add ) %] > <div id="toolbar" class="btn-toolbar"> > <div class="btn-group"> >-- >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 14508
:
40847
|
40848
|
40850
|
40887
| 40891