Bugzilla – Attachment 38068 Details for
Bug 7380
Can't filter patron search on detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 7380: Rename filter to avoid confusion
PASSED-QA-Bug-7380-Rename-filter-to-avoid-confusio.patch (text/plain), 5.26 KB, created by
Katrin Fischer
on 2015-04-17 13:38:00 UTC
(
hide
)
Description:
[PASSED QA] Bug 7380: Rename filter to avoid confusion
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-04-17 13:38:00 UTC
Size:
5.26 KB
patch
obsolete
>From 2e0c1e6654fba13ce421109115303d9cbd4cc59d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 14 Apr 2015 12:05:45 +0200 >Subject: [PATCH] [PASSED QA] Bug 7380: Rename filter to avoid confusion > >The branchcode and categorycode parameter names are too common and are >confusing. >To remove the ambiguity, this patch renames them with branchcode_filter >and categorycode_filter. > >Test plan: >1/ Go on the patron home page (members-home.pl) >2/ Fill the library and category dropdown list in the header search >3/ The patron result list appears and the filters (on the right) are >correctly set with what you have selected. >Make sure the ones in the header are also correctly selected. >4/ Click on a patron >5/ On the patron detail page (moremember.pl), the dropdown lists in the >header are not preselected. > >Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 8 ++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 8 ++++---- > members/member.pl | 9 ++------- > 3 files changed, 10 insertions(+), 15 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index 7723e3a..05a0e98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -75,8 +75,8 @@ > > <p> > <label for="branchcode">Library: </label> >- [% SET branches = Branches.all( selected => branchcode ) %] >- <select name="branchcode" id="branchcode"> >+ [% SET branches = Branches.all( selected => branchcode_filter ) %] >+ <select name="branchcode_filter" id="branchcode"> > [% IF branches.size != 1 %] > <option value="">Any</option> > [% END %] >@@ -92,8 +92,8 @@ > > <p> > <label for="categorycode">Category: </label> >- [% SET categories = Categories.all( selected => categorycode ) %] >- <select name="categorycode" id="categorycode"> >+ [% SET categories = Categories.all( selected => categorycode_filter ) %] >+ <select name="categorycode_filter" id="categorycode"> > <option value="">Any</option> > [% FOREACH categorie IN categories %] > [% IF ( categorie.selected ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index cd2608b..aac6657 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -98,10 +98,10 @@ $(document).ready(function() { > $("#searchtype_filter").val("[% searchtype %]"); > [% END %] > [% IF categorycode %] >- $("#categorycode_filter").val("[% categorycode %]"); >+ $("#categorycode_filter").val("[% categorycode_filter %]"); > [% END %] > [% IF branchcode %] >- $("#branchcode_filter").val("[% branchcode %]"); >+ $("#branchcode_filter").val("[% branchcode_filter %]"); > [% END %] > > [% IF view != "show_results" %] >@@ -454,7 +454,7 @@ function filterByFirstLetterSurname(letter) { > </li> > <li> > <label for="categorycode_filter">Category:</label> >- [% SET categories = Categories.all( selected => categorycode ) %] >+ [% SET categories = Categories.all( selected => categorycode_filter ) %] > <select id="categorycode_filter"> > <option value="">Any</option> > [% FOREACH cat IN categories %] >@@ -468,7 +468,7 @@ function filterByFirstLetterSurname(letter) { > </li> > <li> > <label for="branchcode_filter">Library:</label> >- [% SET branches = Branches.all( selected => branchcode ) %] >+ [% SET branches = Branches.all( selected => branchcode_filter ) %] > <select id="branchcode_filter"> > [% IF branches.size != 1 %] > <option value="">Any</option> >diff --git a/members/member.pl b/members/member.pl >index 03fcc8f..b80cd73 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -45,11 +45,6 @@ my ($template, $loggedinuser, $cookie) > > my $theme = $input->param('theme') || "default"; > >-my $patron = $input->Vars; >-foreach (keys %$patron){ >- delete $patron->{$_} unless($patron->{$_}); >-} >- > my $searchmember = $input->param('searchmember'); > my $quicksearch = $input->param('quicksearch') // 0; > >@@ -82,8 +77,8 @@ my $view = $input->request_method() eq "GET" ? "show_form" : "show_results"; > $template->param( > patron_lists => [ GetPatronLists() ], > searchmember => $searchmember, >- branchcode => $patron->{branchcode}, >- categorycode => $patron->{categorycode}, >+ branchcode_filter => $input->param('branchcode_filter'), >+ categorycode_filter => $input->param('categorycode_filter'), > searchtype => $input->param('searchtype') || 'start_with', > searchfieldstype => $searchfieldstype, > PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, >-- >1.7.10.4
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 7380
:
29697
|
33157
|
35222
|
35259
|
35342
|
37805
|
37806
|
38053
|
38055
|
38056
|
38067
| 38068 |
38090
|
38107
|
38108