Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template
Summary: colspan calculation done by members/statistics.pl should be moved to template
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-01 18:56 UTC by Owen Leonard
Modified: 2015-06-04 23:33 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template (2.07 KB, patch)
2014-08-01 19:12 UTC, Owen Leonard
Details | Diff | Splinter Review
[Signed-off] Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template (2.24 KB, patch)
2014-08-05 09:11 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template (2.21 KB, patch)
2014-08-07 11:12 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-08-01 18:56:16 UTC
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>
Comment 1 Owen Leonard 2014-08-01 19:12:01 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2014-08-05 09:11:56 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2014-08-07 11:12:50 UTC
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>
Comment 4 Tomás Cohen Arazi 2014-08-11 18:57:01 UTC
Patch pushed to master.

Thanks Owen!