Skip to content

Commit 95fdfb5

Browse files
committed
Add tags for streams to state help
- Legacy-Id: 6134
1 parent 026ed3f commit 95fdfb5

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

ietf/doc/views_help.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
from django.template import RequestContext
44

55
from ietf.doc.models import *
6+
from ietf.doc.utils import get_tags_for_stream_id
67

78
def state_help(request, type):
89
slug, title = {
910
"draft-iesg": ("draft-iesg", "IESG States For Internet-Drafts"),
1011
"draft-rfceditor": ("draft-rfceditor", "RFC Editor States For Internet-Drafts"),
1112
"draft-iana-action": ("draft-iana-action", "IANA Action States For Internet-Drafts"),
13+
"draft-stream-ietf": ("draft-stream-ietf", "IETF Stream States For Internet-Drafts"),
1214
"charter": ("charter", "Charter States"),
1315
"conflict-review": ("conflrev", "Conflict Review States"),
1416
"status-change": ("statchg", "RFC Status Change States"),
@@ -35,12 +37,14 @@ def state_help(request, type):
3537
states.insert(0, fake_state)
3638

3739
tags = DocTagName.objects.filter(slug__in=IESG_SUBSTATE_TAGS)
40+
elif state_type.slug.startswith("draft-stream-"):
41+
possible = get_tags_for_stream_id(state_type.slug.replace("draft-stream-", ""))
42+
tags = DocTagName.objects.filter(slug__in=possible)
3843

3944
return render_to_response("doc/state_help.html", {
4045
"title": title,
4146
"state_type": state_type,
4247
"states": states,
4348
"has_next_states": has_next_states,
4449
"tags": tags,
45-
},
46-
context_instance=RequestContext(request))
50+
}, context_instance=RequestContext(request))

ietf/templates/doc/state_help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1>{{ title }}</h1>
2424
{% for state in states %}
2525
<tr id="{{ state.slug }}" class="{{ forloop.counter|divisibleby:2|yesno:"evenrow,oddrow" }}">
2626
<td class="name">{{ state.name }}</td>
27-
<td class="desc">{{ state.desc|linebreaksbr }}</td>
27+
<td class="desc">{{ state.desc|safe|linebreaksbr }}</td>
2828
{% if has_next_states %}
2929
<td class="name">
3030
{% for s in state.next_states.all %}

0 commit comments

Comments
 (0)