Bug 8282: Bug in modules list in about.pl
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Thu, 21 Jun 2012 13:41:54 +0000 (15:41 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 25 Jun 2012 14:20:32 +0000 (16:20 +0200)
  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 <veron@veron.ch>

Added some code to about.tt to have empty the last remaining cells, not sure if an other signoff is needed.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

about.pl
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt

index 7189a22..d196a7f 100755 (executable)
--- 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 );
index 2fd6655..b4baa6e 100644 (file)
                     <th scope="row" style="background-color:#FFCB2F;font-weight:normal" title="Module upgrade needed">
                     [% END %]
                     [% ELSE %]
-                    [% IF ( ro.require ) %]
+                    [% IF ( ro.name == '' ) %]
+                    <th>
+                    [% ELSIF ( ro.require ) %]
                     <th scope="row" style="background-color:#FF8A8A;font-weight:bold;" title="Required module missing">
                     [% ELSE %]
                     <th scope="row" style="background-color:#FF8A8A;font-weight:normal" title="Optional module missing">
                     [% END %]
                     [% END %]
-                        [% ro.name %]
+                    [% ro.name %]
                     </th>
-                    [% IF ( ro.version ) %]<td>[% ro.version %][% ELSE %]<td style="font-weight:bold">Not Installed[% END %]</td>
+                    [% IF ( ro.name == '' ) %]
+                    <td>
+                    [% ELSIF ( ro.version ) %]
+                    <td>[% ro.version %]
+                    [% ELSE %]
+                    <td style="font-weight:bold">Not Installed [% END %]</td>
                     [% END %]
                 </tr>
                 [% END %]