Skip to content

Commit 9ee06f1

Browse files
committed
fix: issue2551341 - if @columns missing from an index url, the group headers colspan property = 0
Fix packaged templates with fix for group headers not spaning the whole table if @columns parameter is missing from the url.
1 parent 4023886 commit 9ee06f1

File tree

12 files changed

+39
-14
lines changed

12 files changed

+39
-14
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ Fixed:
151151
- make classhelper link open in a new window by setting
152152
target="_blank". This prevents overwriting of current page with the
153153
classhelper if javascript is disabled. (John Rouillard)
154+
- issue2551341 - if @columns missing from an index url, the
155+
group headers colspan property = 0. Add "or 100" in
156+
stanza's so headers span all rows (up to 100).
154157

155158
Features:
156159

doc/upgrading.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,28 @@ schema.
356356

357357
`You can see the diff in the Sourceforge web interface <https://sourceforge.net/p/roundup/code/ci/54eb12cd3be143b079809795dcb2f813f75a691c/tree/share/roundup/templates/devel/html/task.index.html?diff=c95870b2bbab822def6066498a4ef8634e76e0b3>`_.
358358

359+
Make group headers span all columns (optional)
360+
----------------------------------------------
361+
362+
In a number of index pages a version of the following TAL command
363+
appears::
364+
365+
<th tal:attributes="colspan python:len(request.columns)" class="group">
366+
367+
If the ``@columns`` parameter (aka request.columns) is not set,
368+
all columns are shown. However the group header only spans the
369+
first column. Changing this to read::
370+
371+
<th tal:attributes="colspan python:len(request.columns) or 100" class="group">
372+
373+
makes the group header span all the columns (if you have fewer
374+
than 100 columns). All of the supplied templates hae been
375+
upgraded with this change. `See issue 2551341 for details
376+
<https://issues.roundup-tracker.org/issue2551341>`_.
377+
378+
Note the jinja2 template has the same issue, but the development
379+
team hasn't devised a solution.
380+
359381
Use @current_user in Searches (optional)
360382
----------------------------------------
361383

share/roundup/templates/classic/html/issue.index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<tal:block tal:repeat="i batch" condition=true>
3838
<tr tal:define="group python:[r[1] for r in request.group]"
3939
tal:condition="python:group and batch.propchanged(*group)">
40-
<th tal:attributes="colspan python:len(request.columns)" class="group">
40+
<th tal:attributes="colspan python:len(request.columns) or 100" class="group">
4141
<tal:block tal:repeat="g group">
4242
<tal:block i18n:translate="" tal:content="python:str(i[g]) or '(no %s set)'%g"/>
4343
</tal:block>
@@ -73,7 +73,7 @@
7373

7474
<metal:index define-macro="batch-footer">
7575
<tr tal:condition="batch">
76-
<th tal:attributes="colspan python:len(request.columns)">
76+
<th tal:attributes="colspan python:len(request.columns) or 100">
7777
<table width="100%">
7878
<tr class="navigation">
7979
<th>

share/roundup/templates/classic/html/user.index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
</tr>
7676
</tal:block>
7777
<tr tal:condition="batch">
78-
<th tal:attributes="colspan python:len(request.columns)">
78+
<th tal:attributes="colspan python:len(request.columns) or 100">
7979
<table width="100%">
8080
<tr class="navigation">
8181
<th>

share/roundup/templates/devel/html/bug.index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<tal:block tal:repeat="i batch" condition="true">
4343
<tr tal:define="group python:[r[1] for r in request.group]"
4444
tal:condition="python:group and batch.propchanged(*group)">
45-
<th tal:attributes="colspan python:len(request.columns)" class="group">
45+
<th tal:attributes="colspan python:len(request.columns) or 100" class="group">
4646
<tal:block tal:repeat="g group">
4747
<tal:block tal:content="python:str(i[g]) or '(no %s set)'%g"/>
4848
</tal:block>
@@ -87,7 +87,7 @@
8787

8888
<metal:index define-macro="batch-footer">
8989
<tr tal:condition="batch">
90-
<th tal:attributes="colspan python:len(request.columns)">
90+
<th tal:attributes="colspan python:len(request.columns) or 100">
9191
<table width="100%">
9292
<tr class="navigation">
9393
<th>

share/roundup/templates/devel/html/milestone.index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<tal:block tal:repeat="i batch" condition=true>
3232
<tr tal:define="group python:[r[1] for r in request.group]"
3333
tal:condition="python:group and batch.propchanged(*group)">
34-
<th tal:attributes="colspan python:len(request.columns)" class="group">
34+
<th tal:attributes="colspan python:len(request.columns) or 100" class="group">
3535
<tal:block tal:repeat="g group">
3636
<tal:block tal:content="python:str(i[g]) or '(no %s set)'%g"/>
3737
</tal:block>
@@ -52,7 +52,7 @@
5252

5353
<metal:index define-macro="batch-footer">
5454
<tr tal:condition="batch">
55-
<th tal:attributes="colspan python:len(request.columns)">
55+
<th tal:attributes="colspan python:len(request.columns) or 100">
5656
<table width="100%">
5757
<tr class="navigation">
5858
<th>

share/roundup/templates/devel/html/task.index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<tal:block tal:repeat="i batch" condition="true">
4040
<tr tal:define="group python:[r[1] for r in request.group]"
4141
tal:condition="python:group and batch.propchanged(*group)">
42-
<th tal:attributes="colspan python:len(request.columns)" class="group">
42+
<th tal:attributes="colspan python:len(request.columns) or 100" class="group">
4343
<tal:block tal:repeat="g group">
4444
<tal:block tal:content="python:str(i[g]) or '(no %s set)'%g"/>
4545
</tal:block>
@@ -78,7 +78,7 @@
7878

7979
<metal:index define-macro="batch-footer">
8080
<tr tal:condition="batch">
81-
<th tal:attributes="colspan python:len(request.columns)">
81+
<th tal:attributes="colspan python:len(request.columns) or 100">
8282
<table width="100%">
8383
<tr class="navigation">
8484
<th>

share/roundup/templates/devel/html/user.index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
</tr>
7070
</tal:block>
7171
<tr tal:condition="batch">
72-
<th tal:attributes="colspan python:len(request.columns)">
72+
<th tal:attributes="colspan python:len(request.columns) or 100">
7373
<table width="100%">
7474
<tr class="navigation">
7575
<th>

share/roundup/templates/responsive/html/bug.index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<tal:block tal:repeat="i batch" condition="true">
4040
<tr tal:define="group python:[r[1] for r in request.group]"
4141
tal:condition="python:group and batch.propchanged(*group)">
42-
<th tal:attributes="colspan python:len(request.columns)" class="group">
42+
<th tal:attributes="colspan python:len(request.columns) or 100" class="group">
4343
<tal:block tal:repeat="g group">
4444
<tal:block tal:content="python:str(i[g]) or '(no %s set)'%g"/>
4545
</tal:block>

share/roundup/templates/responsive/html/milestone.index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<tal:block tal:repeat="i batch" condition=true>
3232
<tr tal:define="group python:[r[1] for r in request.group]"
3333
tal:condition="python:group and batch.propchanged(*group)">
34-
<th tal:attributes="colspan python:len(request.columns)" class="group">
34+
<th tal:attributes="colspan python:len(request.columns) or 100" class="group">
3535
<tal:block tal:repeat="g group">
3636
<tal:block tal:content="python:str(i[g]) or '(no %s set)'%g"/>
3737
</tal:block>

0 commit comments

Comments
 (0)