members/statistics.pl contains some code to calculate how many columns of the main table the footer's total column should span. As the colspan value is purely a display consideration, the logic should be moved to the template. members/statistics.pl: length_keys => scalar( @statistic_column_names), koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt: <td colspan="[% length_keys %]">TOTAL</td>
Created attachment 30471 [details] [review] Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template 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.
Created attachment 30544 [details] [review] [Signed-off] Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template 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 Véron <veron@veron.ch>
Created attachment 30572 [details] [review] Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template 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>
Patch pushed to master. Thanks Owen!