Bugzilla – Attachment 159266 Details for
Bug 35372
Support for empty AdvancedSearchTypes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35372: Add support for AdvancedSearchTypes to be empty and disabled
Bug-35372-Add-support-for-AdvancedSearchTypes-to-b.patch (text/plain), 3.87 KB, created by
Nick Clemens (kidclamp)
on 2023-11-27 12:09:07 UTC
(
hide
)
Description:
Bug 35372: Add support for AdvancedSearchTypes to be empty and disabled
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-11-27 12:09:07 UTC
Size:
3.87 KB
patch
obsolete
>From 56bd9265cef1c710fb7907e17a95ddc43c5dbaa2 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleisha@catalyst.net.nz> >Date: Mon, 20 Nov 2023 20:48:52 +0000 >Subject: [PATCH] Bug 35372: Add support for AdvancedSearchTypes to be empty > and disabled > >This enhancement makes it possible to leave the AdvancedSearchTypes system preference empty if your library would like to disable the item filter tabs available on the staff interface advanced search. It also adds a message to the system preference description to describe this. > >To test: > >1. Go to Koha Administration -> system preferences. Search for the AdvancedSearchTypes system preference and remove its contents, so it is saved empty. >2. Go to advanced search in the staff interface. Notice the item types tab still shows as a filter option. >3. Apply the patch, restart services and refresh the advanced search >4. Confirm the item types tab no longer shows. >5. Add something back to the AdvancedSearchTypes system preference i.e. itemtypes, ccode >6. Go back to advanced search and confirm your expected tabs show as normal > >Sponsored-by: Education Services Australia SCIS >--- > catalogue/search.pl | 2 +- > .../prog/en/modules/admin/preferences/searching.pref | 3 ++- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt | 2 ++ > 3 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index e3da85daeee..2befaa94473 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -253,7 +253,7 @@ $template->param( > ); > > # load the Type stuff >-my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; >+my $types = C4::Context->preference("AdvancedSearchTypes"); > my $advancedsearchesloop = prepare_adv_search_types($types); > $template->param(advancedsearchesloop => $advancedsearchesloop); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >index b06c6621bf5..8eb1e2da6a7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >@@ -107,7 +107,8 @@ Searching: > - pref: AdvancedSearchTypes > class: long > - "fields (separate values with |). Tabs appear in the order listed.<br/>" >- - "<em>Currently supported values</em>: Item types (<strong>itemtypes</strong>), Collection, (<strong>ccode</strong>) and Shelving location (<strong>loc</strong>)." >+ - "<em>Currently supported values</em>: Item types (<strong>itemtypes</strong>), Collection, (<strong>ccode</strong>) and Shelving location (<strong>loc</strong>).<br/>" >+ - Leave empty to disable these tabs in the staff interface advanced search. > - > - Limit the languages listed in the advanced search drop-down to the > - pref: AdvancedSearchLanguages >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >index a176d73de73..adfe028242c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >@@ -211,6 +211,7 @@ > </div> <!-- /#advanced-search --> > > <!-- MC-TYPE LIMITS --> >+ [% IF advancedsearchesloop %] > [% WRAPPER tabs id= "advsearches" %] > [% WRAPPER tabs_nav %] > [% FOREACH advsearchloo IN advancedsearchesloop %] >@@ -267,6 +268,7 @@ > [% END # /FOREACH advsearchloo %] > [% END # /WRAPPER tab_panels %] > [% END # /WRAPPER tabs %] >+ [% END %] > <!-- /MC-TYPE LIMIT --> > > [% IF ( expanded_options ) %] >-- >2.30.2
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 35372
:
159149
|
159189
| 159266 |
159267