Bug 12693 - colspan calculation done by members/statistics.pl should be moved to...
authorOwen Leonard <oleonard@myacpl.org>
Fri, 1 Aug 2014 18:58:35 +0000 (14:58 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 11 Aug 2014 18:47:14 +0000 (15:47 -0300)
It is not necessary for the patron statistics script to pass a colspan
value to the template. The number can be output using Template::Toolkit
syntax.

To test, view the statistics page for a patron. Confirm that the "Total"
cell in the footer spans the correct number of columns. Test with
various numbers of fields in the StatisticsFields system preference.

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt
members/statistics.pl

index b034613..876559a 100644 (file)
@@ -78,7 +78,7 @@
                 </tbody>
                 <tfoot>
                     <tr>
-                        <td colspan="[% length_keys %]">TOTAL</td>
+                        <td colspan="[% column_names.size %]">TOTAL</td>
                         <td>[% count_total_precedent_state %]</td>
                         <td>[% count_total_issues %]</td>
                         <td>[% count_total_issues_returned %]</td>
index 15a1c69..af31815 100755 (executable)
@@ -105,7 +105,6 @@ $template->param(
     datas          => $datas,
     address        => $address,
     column_names   => \@statistic_column_names,
-    length_keys    => scalar( @statistic_column_names),
     count_total_issues => $count_total_issues,
     count_total_issues_returned => $count_total_issues_returned,
     count_total_precedent_state => $count_total_precedent_state,