From 7b1e1f957ce75826e621bb936c0c8fcd8b62b1c9 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 Signed-off-by: Tomas Cohen Arazi --- 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 560b3cf5a8..cc51d00c2c 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 04b43cd210..bceb480a87 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.39.5