Skip to content

Commit 7b8928f

Browse files
committed
Make milestones visible in draft search results, and add notices to
the draft state edit form for WG chairs, as reminders for the WG chairs to keep the milestones updated - Legacy-Id: 4559
1 parent 02509a4 commit 7b8928f

7 files changed

Lines changed: 29 additions & 7 deletions

File tree

ietf/idrfc/views_doc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ def document_main_idrfc(request, name, tab):
439439
'doc':doc, 'info':info, 'tab':tab,
440440
'include_text':include_text(request),
441441
'stream_info': get_full_info_for_draft(id),
442+
'milestones': id.groupmilestone_set.filter(state="active"),
442443
'versions':versions, 'history':history},
443444
context_instance=RequestContext(request));
444445

ietf/ietfworkflows/templatetags/ietf_streams.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def stream_state(context, doc):
4040

4141
data.update({'workflow': workflow,
4242
'draft': draft,
43-
'state': state})
43+
'state': state,
44+
'milestones': draft.groupmilestone_set.filter(state="active")
45+
})
4446

4547
return data
4648

ietf/ietfworkflows/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def _edit_draft_stream(request, draft, form_class=DraftTagsStateForm):
8383
stream = get_stream_from_draft(draft)
8484
history = get_workflow_history_for_draft(draft, 'objectworkflowhistoryentry')
8585
tags = get_annotation_tags_for_draft(draft)
86+
milestones = draft.groupmilestone_set.all()
8687
return render_to_response('ietfworkflows/state_edit.html',
8788
{'draft': draft,
8889
'state': state,
@@ -91,6 +92,7 @@ def _edit_draft_stream(request, draft, form_class=DraftTagsStateForm):
9192
'history': history,
9293
'tags': tags,
9394
'form': form,
95+
'milestones': milestones,
9496
},
9597
context_instance=RequestContext(request))
9698

ietf/templates/idrfc/doc_tab_document_id.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,18 @@
7171
{% ifequal stream_info.stream.name "IETF" %}
7272
<tr>
7373
<td>IETF State:</td>
74-
<td>{{ stream_info.state.name }} ({{ stream_info.streamed.get_group }})
75-
{% if stream_info.tags %}<br /><i>{% for tag in stream_info.tags %}{{ tag.name }}{% if not forloop.last %}, {% endif %}{% endfor %}{% endif %}
76-
</td>
74+
<td class="stream-state">{{ stream_info.state.name }} ({{ stream_info.streamed.get_group }})
75+
{% if stream_info.tags %}<br /><i>{% for tag in stream_info.tags %}{{ tag.name }}{% if not forloop.last %}, {% endif %}{% endfor %}</i>{% endif %}
76+
{% if milestones %}{% for m in milestones %}<span title="In {{ m.group.acronym }} milestone: {{ m.desc }}" class="milestone">{{ m.due|date:"M Y" }}</span>{% endfor %}{% endif %}
77+
</td>
7778
</tr>
7879
{% else %}
7980
{% if stream_info.stream %}
8081
<tr>
8182
<td>{{ stream_info.stream.name }} status:</td>
8283
<td>
8384
{{ stream_info.state.name }} {% if stream_info.streamed.get_group %}({{ stream_info.streamed.get_group }}) {% endif %}
84-
{% if stream_info.tags %}<br /><i>{% for tag in stream_info.tags %}{{ tag.name }}{% if not forloop.last %}, {% endif %}{% endfor %}{% endif %}
85+
{% if stream_info.tags %}<br /><i>{% for tag in stream_info.tags %}{{ tag.name }}{% if not forloop.last %}, {% endif %}{% endfor %}</i>{% endif %}
8586
</td>
8687
</tr>
8788
{% endif %}

ietf/templates/ietfworkflows/state_edit.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ <h1>Change state for {{ draft }}</h1>
2929
<a href="{% url doc_view draft.filename %}">Return to document view</a>
3030
</p>
3131
</div>
32+
33+
{% if state and state.slug == "wg-doc" and not milestones %}
34+
<p>This document is not part of any milestone. You may wish to <a href="{% url wg_edit_milestones acronym=draft.group.acronym %}">add it to one</a>.</p>
35+
{% endif %}
36+
37+
{% if state and state.slug == "sub-pub" and milestones %}
38+
<p>This document is part of {% if milestones|length > 1 %}{{ milestones|length }}
39+
milestones{% else %}a milestone{% endif %}. Now that the draft is
40+
submitted to IESG for publication, you may wish to
41+
<a href="{% url wg_edit_milestones acronym=draft.group.acronym %}">update the
42+
milestone{{ milestones|pluralize }}</a>.</p>
43+
{% endif %}
44+
3245
<table class="ietf-table" style="width: 100%;">
3346
<tr>
3447
<th>Current stream</th>

ietf/templates/ietfworkflows/stream_state.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{% if draft %}
2-
<div class="stream_state">
3-
<div class="stream_state_more" style="float: left; margin: 1px 0.5em 0 0;"><a href="{% url stream_history draft.filename %}" class="show_stream_info" title="Stream information for {{ draft.filename }}" style="text-decoration: none; color:transparent; margin: 0; padding: 0; border: 0;"><img src="/images/plus.png" style="margin: 0; padding: 0; border:0;"><img></a></div>
2+
<div class="stream-state">
3+
<div class="stream_state_more" style="float: left; margin: 1px 0.5em 0 0;"><a href="{% url stream_history draft.filename %}" class="show_stream_info" title="Stream information for {{ draft.filename }}" style="text-decoration: none; color:transparent; margin: 0; padding: 0; border: 0;"><img src="/images/plus.png" style="margin: 0; padding: 0; border:0;"></a></div>
44
{% if stream %}
55
{% if state %}{{ state.name }}{% else %}{{ stream }}{% endif %}
6+
{% if milestones %}{% for m in milestones %}<span title="Included in milestone: {{ m.desc }}" class="milestone">{{ m.due|date:"M Y" }}</span>{% endfor %}{% endif %}
67
{% else %}
78
No stream assigned
89
{% endif %}

static/css/base2.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,5 @@ form table .help {
193193

194194
table.milestones td.due { vertical-align: top; width: 80px; }
195195
table.milestones .doc { display: block; padding-left: 1em; }
196+
197+
.stream-state .milestone { display: inline-block; font-size: smaller; background-color: #d5dde6; padding: 0 0.2em; margin-left: 0.3em; }

0 commit comments

Comments
 (0)