Bugzilla – Attachment 178692 Details for
Bug 38108
Make display of table filters in staff interface holdings table configurable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38108: Add ability to show/hide table filters via system preference
Bug-38108-Add-ability-to-showhide-table-filters-vi.patch (text/plain), 4.74 KB, created by
Andrew Fuerste-Henry
on 2025-02-25 16:43:07 UTC
(
hide
)
Description:
Bug 38108: Add ability to show/hide table filters via system preference
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2025-02-25 16:43:07 UTC
Size:
4.74 KB
patch
obsolete
>From 286bbd741b34bb21f5e820658557f2e8b3a0b4de Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 24 Feb 2025 20:44:07 +0000 >Subject: [PATCH] Bug 38108: Add ability to show/hide table filters via system > preference > >To test: >1. APPLY PATCH, updatedatabase, restart_all >2. Search for the 'AlwaysShowHoldingsTableFilters' system preference. It should be set to 'Don't'. >3. Without changing the system preference, go to a record detail page. >4. The filters should not show by default. >5. Make sure that toggling the Hide filters/Show filters button still work as expected. >6. Set 'AlwaysShowHoldingsTableFilters' to 'Do'. >7. Now the filters should show by default when you load the table. >8. Make sure that toggling the Hide filters/Show filters button still work as expected. > >Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> >--- > .../html_helpers/tables/items/catalogue_detail.inc | 9 +++++++-- > .../prog/en/modules/admin/preferences/cataloguing.pref | 6 ++++++ > .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 7 +++++-- > 3 files changed, 18 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >index af13412104..84451e0aa4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >@@ -50,8 +50,13 @@ > [% BLOCK items_table %] > <div class="[% tab | html %]_table_table_controls"> > <span class="show_hide_filters"> >- <button class="btn btn-link show_filters" data-tab="[% tab | html %]"><i class="fa fa-filter"></i> Show filters</button> >- <button class="btn btn-link hide_filters" data-tab="[% tab | html %]" style="display: none;"><i class="fa fa-filter"></i> Hide filters</button> >+ [% IF Koha.Preference('AlwaysShowHoldingsTableFilters') %] >+ <button class="btn btn-link show_filters" data-tab="[% tab | html %]" style="display: none;"><i class="fa fa-filter"></i> Show filters</button> >+ <button class="btn btn-link hide_filters" data-tab="[% tab | html %]"><i class="fa fa-filter"></i> Hide filters</button> >+ [% ELSE %] >+ <button class="btn btn-link show_filters" data-tab="[% tab | html %]"><i class="fa fa-filter"></i> Show filters</button> >+ <button class="btn btn-link hide_filters" data-tab="[% tab | html %]" style="display: none;"><i class="fa fa-filter"></i> Hide filters</button> >+ [% END %] > </span> > <button class="btn btn-link SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</button> > <button class="btn btn-link ClearAll" data-tab="[% tab | html %]"><i class="fa fa-times"></i> Clear all</button> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >index 11eed37437..40b08d0c91 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >@@ -294,6 +294,12 @@ Cataloging: > homebranch: 'home library' > holdingbranch: 'holding library' > - "is the logged in user's library. The second tab will contain all other items." >+ - >+ - pref: AlwaysShowHoldingsTableFilters >+ choices: >+ 1: "Do" >+ 0: "Don't" >+ - always show filters by default on the holdings table in the record details page. > - > - "Don't show" > - pref: NotesToHide >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 19eb3aefb4..801f7dad1e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -2039,8 +2039,11 @@ > > // Early return if the tab is not shown (ie. no table) > if (!$("#%s-tab".format(tab_id)).length) return; >- >- build_items_table(tab_id, false, {}, build_items_table_drawncallback); >+ [% IF Koha.Preference('AlwaysShowHoldingsTableFilters') %] >+ build_items_table(tab_id, true, {}, build_items_table_drawncallback); >+ [% ELSE %] >+ build_items_table(tab_id, false, {}, build_items_table_drawncallback); >+ [% END %] > > [% IF bundlesEnabled %] > // Add event listener for opening and closing bundle details >-- >2.39.5
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 38108
:
178638
|
178639
|
178691
|
178692
|
178694
|
178695
|
178696
|
179171