Bugzilla – Attachment 130513 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: Add system preference IntranetAddMastheadLibraryPulldown
Bug-30077-Add-system-preference-IntranetAddMasthea.patch (text/plain), 5.75 KB, created by
Lucas Gass (lukeg)
on 2022-02-11 16:16:21 UTC
(
hide
)
Description:
Bug 30077: Add system preference IntranetAddMastheadLibraryPulldown
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-02-11 16:16:21 UTC
Size:
5.75 KB
patch
obsolete
>From 1c31de711b56166aa4d7c4f72a181a47c326bbac Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 10 Feb 2022 23:48:13 +0000 >Subject: [PATCH] Bug 30077: Add system preference > IntranetAddMastheadLibraryPulldown > >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 the branch you are logged in at. >7. Do a search and make sure it is correctly limiting to your logged in branch. >8. Try changing to a different branch and doing another search. It should correcrly limit to that branch BUT it should also default back to your logged in branch for the next search. >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. >--- > ...d_syspref_IntranetAddMastheadLibraryPulldown.pl | 14 ++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../prog/en/includes/catalogue-search-box.inc | 8 ++++++++ > .../modules/admin/preferences/staff_interface.pref | 6 ++++++ > 4 files changed, 29 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_30077_add_syspref_IntranetAddMastheadLibraryPulldown.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30077_add_syspref_IntranetAddMastheadLibraryPulldown.pl b/installer/data/mysql/atomicupdate/bug_30077_add_syspref_IntranetAddMastheadLibraryPulldown.pl >new file mode 100755 >index 0000000000..b4d18f9278 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30077_add_syspref_IntranetAddMastheadLibraryPulldown.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "30077", >+ description => "Add the system preference IntranetAddMastheadLibraryPulldown", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES ('IntranetAddMastheadLibraryPulldown','0','','Add a library select pulldown menu on the staff header search','YesNo ') >+ }); >+ say $out "Finished adding system preference IntranetAddMastheadLibraryPulldown"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index dd83a00fd8..b231494520 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -267,6 +267,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'), > ('IndependentBranchesPatronModifications','0', NULL, 'Show only modification request for the logged in branch','YesNo'), > ('IndependentBranchesTransfers','0', NULL, 'Allow non-superlibrarians to transfer items between libraries','YesNo'), >+('IntranetAddMastheadLibraryPulldown','0', NULL, 'Add a library select pulldown menu on the staff header search','YesNo'), > ('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'), > ('RecordedBooksClientSecret','','30','Client key for RecordedBooks integration','Free'), > ('RecordedBooksDomain','','','RecordedBooks domain','Free'), >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 134bf93de8..d4c575fb73 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 >@@ -1,3 +1,4 @@ >+[% USE Branches %] > [% IF ( CAN_user_catalogue ) %] > <div id="catalog_search" class="residentsearch"> > <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block"> >@@ -6,7 +7,14 @@ > [% INCLUDE 'search_indexes.inc' %] > [% END %] > <input type="text" name="q" id="search-form" size="40" value="[% ms_value | html %]" title="Enter the terms you wish to search for." class="query form-text head-searchbox" /> >+ [% 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( ) %] >+ </select> >+ [% END %] > <input type="submit" value="Submit" class="submit" /> >+ > </form> > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >index 10c41c581d..d246586ea0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >@@ -175,6 +175,12 @@ Staff interface: > 1: "Enable" > 0: "Don't enable" > - audio alerts for events defined in the <a href="/cgi-bin/koha/admin/audio_alerts.pl">audio alerts</a> section of administration. >+ - >+ - pref: IntranetAddMastheadLibraryPulldown >+ choices: >+ 1: Show >+ 0: "Don't show" >+ - a library select pulldown menu on the staff header search. > - > - pref: IntranetCatalogSearchPulldown > choices: >-- >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