From aebffeea714352109c2d04ddaf20006d69bacb92 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' 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 --- .../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 fa2090dbc4..198877d24c 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.30.2