Add an entry to the group history when closing a group is being

requested and use that to put a notice on the WG page.
 - Legacy-Id: 4399
This commit is contained in:
Ole Laursen 2012-05-04 17:46:35 +00:00
parent e2aa218b8a
commit 07382a07a4
4 changed files with 21 additions and 2 deletions

View file

@ -86,6 +86,7 @@ GROUP_EVENT_CHOICES = [
("changed_state", "Changed state"),
("added_comment", "Added comment"),
("info_changed", "Changed metadata"),
("requested_close", "Requested closing group"),
]
class GroupEvent(models.Model):

View file

@ -55,7 +55,14 @@ is occasionally incorrect.</span>
<tr><td>Area:</td><td>{{ wg.parent.name }} ({{ wg.parent.acronym }})</td></tr>
{% endif %}
<tr><td>State:</td><td>{{ wg.state.name }}</td></tr>
<tr>
<td>State:</td>
<td>{{ wg.state.name }}
{% if requested_close %}
(but in the process of being closed)
{% endif %}
</td>
</tr>
<tr>
<td>Charter:</td>

View file

@ -251,6 +251,11 @@ def conclude(request, acronym):
email_secretariat(request, wg, "conclude", instructions)
e = GroupEvent(group=wg, by=login)
e.type = "requested_close"
e.desc = "Requested closing group"
e.save()
return redirect('wg_charter', acronym=wg.acronym)
else:
form = ConcludeForm()

View file

@ -168,13 +168,19 @@ def wg_charter(request, acronym):
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
fill_in_charter_info(wg)
actions = []
e = wg.latest_event(type__in=("changed_state", "requested_close",))
requested_close = wg.state_id != "conclude" and e and e.type == "requested_close"
if wg.state_id != "conclude":
actions.append(("Edit WG", urlreverse("wg_edit", kwargs=dict(acronym=wg.acronym))))
actions.append(("Request closing WG", urlreverse("wg_conclude", kwargs=dict(acronym=wg.acronym))))
context = get_wg_menu_context(wg, "charter")
context.update(dict(
actions=actions))
actions=actions,
requested_close=requested_close,
))
return render_to_response('wginfo/wg_charterREDESIGN.html',
context,