Skip to content

Commit 33f58d7

Browse files
committed
Fixed a wrong row count for stream meta-info when displaying RFCs. Also fixed a 'missing columns' html warning. Fixes issue ietf-tools#1697.
- Legacy-Id: 9613
1 parent e34cbcc commit 33f58d7

2 files changed

Lines changed: 7 additions & 24 deletions

File tree

ietf/doc/views_doc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ def document_main(request, name, rev=None):
352352
# group label. This would be easy if all browsers supported the rowspan="0" (zero)
353353
# semantics of the html standard, but only Firefox and Opera do, so we have to count
354354
# how many entries there will be in each section here, instead. Bah!
355-
table_rows = dict(doc=5, stream=3, iesg=5, iana=3, rfced=2)
355+
table_rows = dict(doc=4, stream=2, iesg=4, iana=2, rfced=1)
356356
table_rows['doc'] += 1 if replaces or can_edit_stream_info else 0
357357
table_rows['doc'] += 1 if replaced_by else 0
358-
table_rows['doc'] += 1 if doc.get_state_slug != "rfc" else 0
358+
table_rows['doc'] += 1 if doc.get_state_slug() != "rfc" else 0
359359
table_rows['doc'] += 1 if conflict_reviews else 0
360360

361361
table_rows['stream'] += 1 if consensus else 0

ietf/templates/doc/document_draft.html

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@
3636

3737
<tbody class="plain">
3838
<tr>
39-
<th rowspan="{{table_rows.doc}}">Document</th>
40-
</tr>
41-
42-
<tr>
39+
<th rowspan="{{table_rows.doc}}">Document</th>
4340
<th>Type</th>
4441
<td class="edit"></td>
4542
<td>
@@ -150,12 +147,8 @@
150147

151148
</tbody>
152149
<tbody class="plain">
153-
154-
<tr>
155-
<th rowspan="{{table_rows.stream}}">Stream</th>
156-
</tr>
157-
158150
<tr>
151+
<th rowspan="{{table_rows.stream}}">Stream</th>
159152
{% if doc.stream %}
160153
<th>
161154
{% if doc.stream.slug != "legacy" %}
@@ -247,12 +240,8 @@
247240

248241
</tbody>
249242
<tbody class="plain">
250-
251-
<tr>
252-
<th rowspan="{{table_rows.iesg}}">IESG</th>
253-
</tr>
254-
255243
<tr>
244+
<th rowspan="{{table_rows.iesg}}">IESG</th>
256245
<th><a href="{% url "ietf.help.views.state" doc=doc.type.slug type="iesg" %}">IESG state</a></th>
257246
<td class="edit">
258247
{% if iesg_state and can_edit %}
@@ -334,10 +323,7 @@
334323
{% if iana_review_state %}
335324
<tbody class="plain">
336325
<tr>
337-
<th rowspan="{{table_rows.iana}}">IANA</th>
338-
</tr>
339-
340-
<tr>
326+
<th rowspan="{{table_rows.iana}}">IANA</th>
341327
<th><a href="{% url "ietf.help.views.state" doc=doc.type.slug type="iana-review" %}">IANA review state</a></th>
342328
<td class="edit">
343329
{% if can_edit_iana_state %}
@@ -367,10 +353,7 @@
367353

368354
{% if rfc_editor_state %}
369355
<tr>
370-
<th rowspan="{{table_rows.rfced}}">RFC Editor</th>
371-
</tr>
372-
373-
<tr>
356+
<th rowspan="{{table_rows.rfced}}">RFC Editor</th>
374357
<th><a href="{% url "ietf.help.views.state" doc=doc.type.slug type="rfceditor" %}">RFC Editor state</a></th>
375358
<td class="edit"></td>
376359
<td><a href="https://www.rfc-editor.org/queue2.html#{{ doc.name }}">{{ rfc_editor_state }}</a></td>

0 commit comments

Comments
 (0)