From 6130827059154b83f8010520dd7b8cb2a4c5f6e2 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Thu, 21 Jun 2012 15:41:54 +0200 Subject: [PATCH] Bug 8282: Bug in modules list in about.pl Content-Type: text/plain; charset="utf-8" Last modules were not displayed if the number of modules did not match the number of rows of the table (when $number_of_modules % 4 != 0) Signed-off-by: Marc Veron Added some code to about.tt to have empty the last remaining cells, not sure if an other signoff is needed. --- about.pl | 7 +++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 13 ++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/about.pl b/about.pl index 7189a22..d196a7f 100755 --- a/about.pl +++ b/about.pl @@ -108,6 +108,13 @@ foreach (@components) { $row = []; } } +# Processing the last line (if there are any modules left) +if (scalar(@$row) > 0) { + # Extending $row to the table size + $$row[3] = ''; + # Pushing the last line + push (@$table, {row => $row}); +} ## ## $table $template->param( table => $table ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 2fd6655..0896c58 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -69,15 +69,22 @@ [% END %] [% ELSE %] - [% IF ( ro.require ) %] + [% IF ( ro.name == '' ) %] + + [% ELSIF ( ro.require ) %] [% ELSE %] [% END %] [% END %] - [% ro.name %] + [% ro.name %] - [% IF ( ro.version ) %][% ro.version %][% ELSE %]Not Installed[% END %] + [% IF ( ro.name == '' ) %] + + [% ELSIF ( ro.version ) %] + [% ro.version %] + [% ELSE %] + Not Installed [% END %] [% END %] [% END %] -- 1.7.2.5