From 03b526dcc821ffad3aaa5e3e368cff49adc46e6f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 27 Jun 2025 18:22:42 +0000 Subject: [PATCH] Bug 20601: Untranslatable strings in circulation statistics This patch makes some updates to the circulation statistics wizard in order to make more information translatable. The patch also adds some template plugins to the output of filter options in order to be able to show descriptions instead of codes, and corrects the markup for the 'Patron library' dropdown which wasn't working. To test apply the patch and go to Reports -> Statistics wizards -> Circulation. - Test setting some or all options in the "Filter column" and running the report. - Confirm that the "Patron library" dropdown works. - At the top of the results there should be a list of the filter options you selected and their values. - All the filter labels should be correct, and the filter values should should be in their full/description form rather than in code form (e.g. library, item type, collection code, sorting field, etc.) Sponsored-by: Athens County Public Libraries --- .../prog/en/modules/reports/issues_stats.tt | 72 +++++++++++++------ 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt index 4ef937e635c..53036c74e5b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt @@ -1,6 +1,9 @@ [% USE raw %] [% USE Koha %] [% USE Branches %] +[% USE Categories %] +[% USE ItemTypes %] +[% USE AuthorisedValues %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -67,37 +70,66 @@ [% END %] [% SWITCH loopfilte.crit %] [% CASE 0 %] - Period from [% loopfilte.filter | html %] + Period from: [% loopfilte.filter | html %] [% CASE 1 %] - Period to [% loopfilte.filter | html %] + Period to: [% loopfilte.filter | html %] [% CASE 2 %] - Patron category = [% loopfilte.filter | html %] + Patron category: [% Categories.GetName( loopfilte.filter ) | html %] [% CASE 3 %] - Item type = [% loopfilte.filter | html %] + Item type: [% ItemTypes.GetDescription( loopfilte.filter ) | html %] [% CASE 4 %] - Issuing library = [% loopfilte.filter | html %] + Issuing library: [% Branches.GetName( loopfilte.filter ) | html %] [% CASE 5 %] - Collection = [% loopfilte.filter | html %] + Collection: [% AuthorisedValues.GetByCode( 'CCODE', loopfilte.filter ) | html %] [% CASE 6 %] - Location = [% loopfilte.filter | html %] + Location: [% AuthorisedValues.GetByCode( 'LOC', loopfilte.filter ) | html %] [% CASE 7 %] - Item call number >= [% loopfilte.filter | html %] + Item call number > [% loopfilte.filter | html %] [% CASE 8 %] - Item call number < [% loopfilte.filter | html %] + Item call number < [% loopfilte.filter | html %] [% CASE 9 %] - Patron sort1 = [% loopfilte.filter | html %] + Patron sort1: [% AuthorisedValues.GetByCode('Bsort1', loopfilte.filter ) | html %] [% CASE 10 %] - Patron sort2 = [% loopfilte.filter | html %] + Patron sort2: [% AuthorisedValues.GetByCode('Bsort2', loopfilte.filter ) | html %] [% CASE 11 %] - Home library = [% loopfilte.filter | html %] + Home library: [% Branches.GetName( loopfilte.filter ) | html %] [% CASE 12 %] - Holding library = [% loopfilte.filter | html %] + Holding library: [% Branches.GetName( loopfilte.filter ) | html %] [% CASE 13 %] - Patron library = [% loopfilte.filter | html %] + Patron library: [% Branches.GetName( loopfilte.filter ) | html %] [% CASE 14 %] - Issuing library = [% loopfilte.filter | html %] + Issuing library: [% Branches.GetName( loopfilte.filter ) | html %] + [% CASE "Event" %] + Event: + [% SWITCH ( loopfilte.filter ) %] + [% CASE "issue" %] + Checkout + [% CASE "return" %] + Check-in + [% CASE "renew" %] + Renewal + [% CASE %] + [% loopfilte.filter | html %] + [% END %] + [% CASE "Select Day" %] + Select day: [% loopfilte.filter | html %] + [% CASE "Select Month" %] + Select month: [% loopfilte.filter | html %] + [% CASE "Display by" %] + Group by: + [% SWITCH ( loopfilte.filter ) %] + [% CASE "1" %] + Day of week + [% CASE "2" %] + Month + [% CASE "3" %] + Year + [% CASE "4" %] + Hour + [% END %] [% CASE %] - [% loopfilte.crit | html %] = [% loopfilte.filter | html %] + [% loopfilte.crit | html %]: + [% loopfilte.filter | html %] [% END %] [% END %] @@ -336,11 +368,9 @@ - + + [% PROCESS options_for_libraries libraries => Branches.all() %] -- 2.39.5