Bugzilla – Attachment 173607 Details for
Bug 33484
Ability to remember user's selected table configuration and search filters for tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33484: checkouts - Move visibility handling to table_settings
Bug-33484-checkouts---Move-visibility-handling-to-.patch (text/plain), 4.28 KB, created by
Jonathan Druart
on 2024-10-29 09:45:17 UTC
(
hide
)
Description:
Bug 33484: checkouts - Move visibility handling to table_settings
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-10-29 09:45:17 UTC
Size:
4.28 KB
patch
obsolete
>From 9ca7881157bcc0f09bc5bf394d050f6375cabf53 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 29 Oct 2024 10:42:22 +0100 >Subject: [PATCH] Bug 33484: checkouts - Move visibility handling to > table_settings > >We need to set is_hidden for the column we want to force hide (depending >on system config) > >This patch fixes t/db_dependent/selenium/regressions.t > >Obviously there will be incorrect behaviours if we restore from a state >and that the settings have been modified in the meanwhile. >Not sure we can deal with that properly. >--- > .../prog/en/modules/circ/circulation.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 22 +++++++++++++++---- > 2 files changed, 19 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index e96fa9f1488..bd2fce08fbf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1007,7 +1007,7 @@ > var theme = "[% theme | html %]"; > var borrowernumber = "[% patron.borrowernumber | html %]"; > var branchcode = "[% branch | html %]"; >- var exports_enabled = "[% Koha.Preference('ExportCircHistory') | html %]"; >+ var exports_enabled = [% Koha.Preference('ExportCircHistory') ? 1 : 0 | html %]; > var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 | html %]; > var AllowRenewalOnHoldOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalOnHoldOverride') )? 1: 0 | html %]; > var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 | html %]; >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index a27fd722cfb..19b16d33311 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -32,6 +32,24 @@ function LoadIssuesTable() { > $('#issues-table').show(); > $('#issues-table-actions').show(); > var msg_loading = __('Loading... you may continue scanning.'); >+ if (!AllowCirculate) { >+ table_settings_issues_table.columns.find( >+ c => c.columnname == "renew" >+ ).is_hidden = 42; >+ table_settings_issues_table.columns.find( >+ c => c.columnname == "checkin" >+ ).is_hidden = 1; >+ } >+ if (!ClaimReturnedLostValue) { >+ table_settings_issues_table.columns.find( >+ c => c.columnname == "claims_returned" >+ ).is_hidden = 1; >+ } >+ if (!exports_enabled) { >+ table_settings_issues_table.columns.find( >+ c => c.columnname == "export" >+ ).is_hidden = 1; >+ } > issuesTable = KohaTable("issues-table", { > "language": { > "emptyTable": msg_loading, >@@ -224,7 +242,6 @@ function LoadIssuesTable() { > }, > { > "orderable": false, >- "visible": AllowCirculate ? true : false, > "data": function ( oObj ) { > var content = ""; > var msg = ""; >@@ -363,7 +380,6 @@ function LoadIssuesTable() { > }, > { > "orderable": false, >- "visible": AllowCirculate ? true : false, > "data": function ( oObj ) { > if ( oObj.can_renew_error == "recalled" ) { > return "<a href='/cgi-bin/koha/recalls/request.pl?biblionumber=" + oObj.biblionumber + "'>" + __("Recalled") + "</a>"; >@@ -377,7 +393,6 @@ function LoadIssuesTable() { > } > }, > { >- "visible": ClaimReturnedLostValue ? true : false, > "orderable": false, > "data": function ( oObj ) { > let content = ""; >@@ -393,7 +408,6 @@ function LoadIssuesTable() { > } > }, > { >- "visible": exports_enabled == 1 ? true : false, > "orderable": false, > "data": function ( oObj ) { > var s = "<input type='checkbox' name='itemnumbers' value='" + oObj.itemnumber + "' style='visibility:hidden;' />"; >-- >2.34.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 33484
:
149444
|
149445
|
149447
|
149448
|
149449
|
149925
|
149926
|
149927
|
149928
|
149929
|
149930
|
149974
|
149975
|
149976
|
149977
|
149978
|
149979
|
173443
|
173444
|
173445
|
173446
|
173447
|
173448
|
173449
|
173450
|
173451
|
173452
|
173453
|
173454
|
173455
|
173456
|
173457
|
173458
|
173459
|
173460
|
173461
|
173462
|
173463
|
173464
|
173465
|
173466
|
173467
|
173468
|
173469
|
173470
|
173471
|
173472
|
173473
|
173474
|
173475
|
173476
|
173477
|
173478
|
173479
|
173480
|
173481
|
173482
|
173483
|
173484
|
173485
|
173486
|
173546
|
173606
| 173607 |
173985
|
174219