Bugzilla – Attachment 132982 Details for
Bug 30077
Add option for library dropdown in search function for staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30077: (follow-up) retain branch selection
Bug-30077-follow-up-retain-branch-selection.patch (text/plain), 2.78 KB, created by
Lucas Gass (lukeg)
on 2022-04-05 23:06:30 UTC
(
hide
)
Description:
Bug 30077: (follow-up) retain branch selection
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-04-05 23:06:30 UTC
Size:
2.78 KB
patch
obsolete
>From 9b7ec6f30a11d5a27243e8edf257d284adeb5cb3 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 5 Apr 2022 23:04:33 +0000 >Subject: [PATCH] Bug 30077: (follow-up) retain branch selection > >To test: >1. Apply patch, updatedatabase, restart_all >2. Search for the system pref 'IntranetAddMastheadLibraryPulldown' >3. Set it to 'Show'. >4. Go to any page that contains header search box and click on 'Search the catalog'. >5. To the left of the search bar you should see a dropdown for branches. >6. This should be defaulted to 'All libraries'. >7. In the dropdown choose any branch and do a search and make sure it is correctly limiting to that branch. >8. Try changing to a different branch and doing another search. It should correcrly limit to that branch and retain that branch in the dropdown, just like the OPAC. >9. Try selecting 'All libraries' from the top of the dropdown and make sure it is correctly searching all branches. >10. Turn on the system pref 'IntranetCatalogSearchPulldown' and make sure it looks nice with both of those dropdowns and functions when you use limiters from both dropdowns. >--- > catalogue/search.pl | 6 ++++++ > .../intranet-tmpl/prog/en/includes/catalogue-search-box.inc | 2 +- > 2 files changed, 7 insertions(+), 1 deletion(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index ef7f49088f..1ef7c2300e 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -241,8 +241,14 @@ my @search_groups = > Koha::Library::Groups->get_search_groups( { interface => 'staff' } )->as_list; > @search_groups = sort { $a->title cmp $b->title } @search_groups; > >+my $branch_limit = ''; >+if ( scalar $cgi->param('limit') =~ /branch:([\w-]+)/ ) { >+ $branch_limit = $1; >+} >+ > $template->param( > search_groups => \@search_groups, >+ branch_limit => $branch_limit > ); > > # load the Type stuff >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc >index 1404105a51..4e2e432435 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc >@@ -10,7 +10,7 @@ > [% IF ( Koha.Preference('IntranetAddMastheadLibraryPulldown') ) %] > <select id="select_library" name="limit" style="margin-left:5px;"> > <option value="">All libraries</option> >- [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( selected => "" ) %] >+ [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( selected => branch_limit ) %] > </select> > [% END %] > <input type="submit" value="Submit" class="submit" /> >-- >2.20.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 30077
:
130478
|
130513
|
131528
|
131544
|
132982
|
133037
|
135530
|
135531
|
135532
|
138134
|
138135
|
138136
|
138396
|
138397
|
138398
|
138484