Bugzilla – Attachment 195313 Details for
Bug 41604
Impossible to hide Checkin column in issues-table in circ/circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41604: Use visibility_condition in other places
4ffcc0c.patch (text/plain), 6.15 KB, created by
Jonathan Druart
on 2026-03-13 10:26:09 UTC
(
hide
)
Description:
Bug 41604: Use visibility_condition in other places
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-03-13 10:26:09 UTC
Size:
6.15 KB
patch
obsolete
>From 4ffcc0cfeeb36d8e93157a779789406b318de9cb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 6 Mar 2026 11:51:29 +0100 >Subject: [PATCH] Bug 41604: Use visibility_condition in other places > >There are 3 other places where we force the visibility of columns. They >must als use this new visibility_condition flag, so they are all using >it. > >Test plan: >The 3 tables are: >1. basket with the columns edifact, modify, cancel >2. hold history with the column itemtype >3. batch edit patron with the columns checkbox, password expiration, > protected >--- > .../prog/en/modules/acqui/basket.tt | 22 +++++-------------- > .../prog/en/modules/members/holdshistory.tt | 10 +++------ > .../prog/en/modules/tools/modborrowers.tt | 14 ++++-------- > 3 files changed, 13 insertions(+), 33 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 9e80209ae7d..bdc78134a94 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -1406,28 +1406,18 @@ > <script> > var orders_table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %]; > let supplier_report_column = orders_table_settings.columns.find(c => c.columnname == 'supplier_report'); >- [% IF !(Koha.Preference('EDIFACT') && ediaccount) %] >- supplier_report_column.is_hidden = 1; >- supplier_report_column.cannot_be_toggled = 1; >- [% ELSE %] >- supplier_report_column.is_hidden = 0; >- [% END %] >+ const editfact_available = [% Koha.Preference('EDIFACT') && ediaccount ? 1 : 0 | html %]; >+ supplier_report_column.visibility_condition = edifact_available; > supplier_report_column.force_visibility = 1; > > let modify_column = orders_table_settings.columns.find(c => c.columnname == 'modify'); >- [% IF ( active && !closedate ) %] >- modify_column.is_hidden = 0; >- [% ELSE %] >- modify_column.is_hidden = 1; >- [% END %] >+ const modify_column_available = [% active && !closedate ? 1 : 0 | html %]; >+ modify_column.visibility_condition = modify_column_available; > modify_column.force_visibility = 1; > > let cancel_column = orders_table_settings.columns.find(c => c.columnname == 'cancel'); >- [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %] >- cancel_column.is_hidden = 0; >- [% ELSE %] >- cancel_column.is_hidden = 1; >- [% END %] >+ const cancel_column_available = [% !closedate || Koha.Preference('CancelOrdersInClosedBaskets') ? 1 : 0 %] >+ cancel_column.visibility_condition = cancel_column_available; > cancel_column.force_visibility = 1; > > let skip_confirm_reopen = [% skip_confirm_reopen ? 1 : 0 | html %]; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >index 1f49609826e..f70e777c74f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >@@ -183,14 +183,10 @@ > </script> > <script> > $(document).ready(function () { >- let item_type_column = table_settings.columns.find(c => c.columnname == "itemtype"); >- if (!show_itemtype_column) { >- item_type_column.is_hidden = 1; >- item_type_column.cannot_be_toggled = 1; >- } else { >- item_type_column.is_hidden = 0; >- } >+ >+ let item_type_column = table_settings.columns.find(c => c.columnname == 'itemtype'); > item_type_column.force_visibility = 1; >+ item_type_column.visibility_condition = show_itemtype_column; > > let current_holds_table = build_holds_table("#table_holdshistory"); > let old_holds_table = build_holds_table("#table_oldholdshistory", 1); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >index 89102f2b4d5..95797eb51fa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -517,28 +517,22 @@ > $(document).ready(function () { > if (has_patrons) { > let selections_column = table_settings.columns.find(c => c.columnname == "batch_patron_edit_selections"); >+ const selections_column_available = op == "show"; > selections_column.cannot_be_modified = 1; >- selections_column.cannot_be_toggled = 1; >+ selections_column.visibility_condition = selections_column_available; > selections_column.force_visibility = 1; >- if (op == "show") { >- selections_column.is_hidden = 0; >- } else { >- selections_column.is_hidden = 1; >- } > > if (!permissions.CanUpdatePasswordExpiration) { > let password_expiration_date_column = table_settings.columns.find(c => c.columnname == "batch_patron_edit_password_expiration_date"); >- password_expiration_date_column.is_hidden = 1; > password_expiration_date_column.cannot_be_modified = 1; >- password_expiration_date_column.cannot_be_toggled = 1; >+ password_expiration_date_column.visibility_condition = 0; > password_expiration_date_column.force_visibility = 1; > } > > if (!permissions.CanUpdateProtectPatron) { > let protected_column = table_settings.columns.find(c => c.columnname == "batch_patron_edit_protected"); >- protected_column.is_hidden = 1; > protected_column.cannot_be_modified = 1; >- protected_column.cannot_be_toggled = 1; >+ protected_column.visibility_condition = 0; > protected_column.force_visibility = 1; > } > >-- >2.43.0 >
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 41604
:
191480
|
191482
|
192316
|
194641
|
194998
| 195313 |
195314