Skip to content

Commit 23d053e

Browse files
committed
If draft name has rfcXXXX-bis or rfcXXXXbis then add rfcXXXX to diff context menu. Fixes ietf-tools#460 (7 years old ticket). Commit ready for merge
- Legacy-Id: 14374
1 parent 7b47275 commit 23d053e

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

ietf/doc/templatetags/ietf_filters.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,3 +536,8 @@ def role_names(roles):
536536
@register.filter()
537537
def zaptmp(s):
538538
return re.sub(r'/tmp/tmp[^/]+/', '', s)
539+
540+
@register.filter()
541+
def rfcbis(s):
542+
m = re.search('^.*-rfc(\d+)-?bis(-.*)?$', s)
543+
return None if m is None else 'rfc' + m.group(1)

ietf/templates/doc/document_history.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ <h2>Revision differences</h2>
3636
({{ time|date:"Y-m-d" }})
3737
</option>
3838
{% endfor %}
39+
{% if doc.name|rfcbis %}
40+
<option value="{{ doc.name|rfcbis }}">
41+
{{ doc.name|rfcbis }}
42+
</option>
43+
{% endif %}
3944
</select>
4045
</div>
4146
</div>
@@ -52,6 +57,11 @@ <h2>Revision differences</h2>
5257
({{ time|date:"Y-m-d" }})
5358
</option>
5459
{% endfor %}
60+
{% if doc.name|rfcbis %}
61+
<option value="{{ doc.name|rfcbis }}">
62+
{{ doc.name|rfcbis }}
63+
</option>
64+
{% endif %}
5565
</select>
5666
</div>
5767
</div>

0 commit comments

Comments
 (0)