From 16e988301c8afb4f4ecca498ca7a01a3a82f64d9 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 Oct 2021 10:25:37 +0200 Subject: [PATCH] Bug 28859: Correctly handle 'Checked out by' visibility We must have the column in the table and let DT deal with the visibility. This patch hides the "Checked out by" column by default if RecordStaffUserOnCheckout is off, but the DT column settings is aware of its existence and the end user can still display the column. IMO that's the most optimal situation considering both maintenance and ergonomic. Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- .../prog/en/modules/catalogue/issuehistory.tt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt index ca7cf67acb..53c0121d52 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -56,6 +56,8 @@ Checked out from [% IF Koha.Preference('RecordStaffUserOnCheckout') %] Checked out by + [% ELSE %] + Checked out by [% END %] Renewed Checkout on @@ -83,13 +85,11 @@ [% ELSE %]   [% END %] - [% IF Koha.Preference('RecordStaffUserOnCheckout') %] [% IF checkout.issuer_id %] [% INCLUDE 'patron-title.inc' patron=checkout.issuer %] [% END %] - [% END %] [% IF checkout.renewals %] Yes[% IF checkout.lastreneweddate %], last on: [% checkout.lastreneweddate |$KohaDates with_hours => 1 %] [% END %] @@ -138,11 +138,7 @@ [% END %] var table = KohaTable("table_issues", { "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', - [% IF Koha.Preference('RecordStaffUserOnCheckout') %] "aaSorting": [[ 5, "desc" ]], - [% ELSE %] - "aaSorting": [[ 4, "desc" ]], - [% END %] "sPaginationType": "full_numbers" }, columns_settings); }); -- 2.39.5