From ba03ccc6eb46dfe4a2a3dc5e5b11dc9f8b7d499e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 1 Aug 2022 15:54:42 +0200 Subject: [PATCH] Bug 29983: Show the column by default but hide if the feature is disabled Prior to this patch there was a blink, the column was displayed then hidden if the column was hidden. Also we could display the column even if the feature was disabled. Now the column is shown by default, and hidden if the feature is disabled. Signed-off-by: Jonathan Druart --- admin/columns_settings.yml | 1 - .../prog/en/modules/circ/overdue.tt | 25 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 560b3cf5a8c..cc51d00c2ca 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1507,7 +1507,6 @@ modules: columnname: non-public_note - columnname: claims_returned - is_hidden: 1 print_summary: print-summary-checkouts: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 04b43cd2107..bceb480a87a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -94,7 +94,9 @@ Item type Price Non-public note - Return claims + [% IF Koha.Preference('ClaimReturnedLostValue') %] + Return claims + [% END %] [%- BLOCK subject -%]Overdue:[%- END -%] @@ -120,19 +122,17 @@ [% ItemTypes.GetDescription( overdueloo.itemtype ) | html %] [% overdueloo.replacementprice | $Price %] [% overdueloo.itemnotes_nonpublic | html %] - - [% IF ( overdueloo.return_claim_created_on ) %] + [% IF Koha.Preference('ClaimReturnedLostValue') %] + + [% IF ( overdueloo.return_claim_created_on ) %] [% overdueloo.return_claim_created_on | $KohaDates with_hours => 1 %] - [% ELSIF Koha.Preference('ClaimReturnedLostValue') %] + [% ELSE %] Claim returned - [% ELSE %] - - Claim returned - - [% END %] - + [% END %] + + [% END %] [% END %] @@ -319,6 +319,11 @@ $(document).ready(function(){ var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %]; + + [% IF !Koha.Preference('ClaimReturnedLostValue') %] + table_settings['columns'].splice(13, 1); + [% END %] + KohaTable("overduest", { "sPaginationType": "full", "autoWidth": false, -- 2.25.1