If draft name has rfcXXXX-bis or rfcXXXXbis then add rfcXXXX to diff context menu. Fixes #460 (7 years old ticket). Commit ready for merge

- Legacy-Id: 14374
This commit is contained in:
Tero Kivinen 2017-11-15 11:33:02 +00:00
parent 7b4727541a
commit 23d053ea53
2 changed files with 15 additions and 0 deletions

View file

@ -536,3 +536,8 @@ def role_names(roles):
@register.filter()
def zaptmp(s):
return re.sub(r'/tmp/tmp[^/]+/', '', s)
@register.filter()
def rfcbis(s):
m = re.search('^.*-rfc(\d+)-?bis(-.*)?$', s)
return None if m is None else 'rfc' + m.group(1)

View file

@ -36,6 +36,11 @@
({{ time|date:"Y-m-d" }})
</option>
{% endfor %}
{% if doc.name|rfcbis %}
<option value="{{ doc.name|rfcbis }}">
{{ doc.name|rfcbis }}
</option>
{% endif %}
</select>
</div>
</div>
@ -52,6 +57,11 @@
({{ time|date:"Y-m-d" }})
</option>
{% endfor %}
{% if doc.name|rfcbis %}
<option value="{{ doc.name|rfcbis }}">
{{ doc.name|rfcbis }}
</option>
{% endif %}
</select>
</div>
</div>