From 37302e71fc7fab6dece6914a5438044bd1e8a14c Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 7 Jan 2023 01:34:24 +0000 Subject: [PATCH] Bug 32589: Improve headings on result tables for 'Items with no checkouts' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When no filter was selected on the search form, the heading on the results table showed as NULL. When library or item type were selected the codes instead of the descriptions showed. To test: * Without patch: * Run the 'items with no checkouts' report with different settings for 'By:'. Verify the headings on the tables are not nice. * Apply patch * Rerun reports * Headings should be "Ungrouped, item type or library descriptions * Summary table also shows item type and library descriptions Signed-off-by: Frédéric Demians → OK. Would be nice to have decoding also in 'Filtered on' top section Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/reports/catalogue_out.tt | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt index 35a62dd0dd..73060fdb0c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt @@ -1,4 +1,5 @@ [% USE Branches %] +[% USE ItemTypes %] [% INCLUDE 'doc-head-open.inc' %] Items with no checkouts › Reports › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -45,9 +46,16 @@ [% ELSE %]

[% END %] - [% IF ( loopfilte.sql ) %][% END %] - [% loopfilte.crit | html %] = [% loopfilte.filter | html %] - [% IF ( loopfilte.sql ) %][% END %] + [% IF ( loopfilte.sql ) %] + + [% loopfilte.crit | html %] = [% loopfilte.filter | html %] + + [% ELSE %] + [% loopfilte.crit | html %] = [% loopfilte.filter | html %] + [% IF ( loopfilte.crit == "by" ) %] + [% group_by = loopfilte.filter %] + [% END %] + [% END %]

[% END %] [% END %] @@ -65,7 +73,13 @@ [% FOREACH looptable IN mainloo.looptables %] - [% looptable.coltitle | html %] + [% IF ( group_by=="itype" ) %] + [% ItemTypes.GetDescription( looptable.coltitle ) | html %] + [% ELSIF ( group_by=="homebranch" ) %] + [% Branches.GetName( looptable.coltitle ) | html %] + [% ELSE %] + [% looptable.coltitle | html %] + [% END %] [% IF ( looptable.looptable_count ) %] @@ -89,8 +103,13 @@ [% FOREACH looptable IN mainloo.looptables %]

- - [% looptable.coltitle | html %] + [% IF ( group_by=="itype" ) %] + [% ItemTypes.GetDescription( looptable.coltitle ) | html %] + [% ELSIF ( group_by=="homebranch" ) %] + [% Branches.GetName( looptable.coltitle ) | html %] + [% ELSE %] + Ungrouped + [% END %]

-- 2.39.5