Merged [4212] from rcross@amsl.com:
Ticket #673 Add ability to clear ballot
- Legacy-Id: 4222
Note: SVN reference [4212] has been migrated to Git commit cbc660e7fb
This commit is contained in:
commit
4034532ea1
|
@ -53,6 +53,7 @@ urlpatterns = patterns('',
|
|||
url(r'^(?P<name>[A-Za-z0-9.-]+)/edit/resurrect/$', views_edit.resurrect, name='doc_resurrect'),
|
||||
url(r'^(?P<name>[A-Za-z0-9.-]+)/edit/addcomment/$', views_edit.add_comment, name='doc_add_comment'),
|
||||
url(r'^(?P<name>[A-Za-z0-9.-]+)/edit/position/$', views_ballot.edit_position, name='doc_edit_position'),
|
||||
url(r'^(?P<name>[A-Za-z0-9.-]+)/edit/clearballot/$', views_ballot.clear_ballot, name='doc_clear_ballot'),
|
||||
url(r'^(?P<name>[A-Za-z0-9.-]+)/edit/deferballot/$', views_ballot.defer_ballot, name='doc_defer_ballot'),
|
||||
url(r'^(?P<name>[A-Za-z0-9.-]+)/edit/undeferballot/$', views_ballot.undefer_ballot, name='doc_undefer_ballot'),
|
||||
url(r'^(?P<name>[A-Za-z0-9.-]+)/edit/sendballotcomment/$', views_ballot.send_ballot_comment, name='doc_send_ballot_comment'),
|
||||
|
|
|
@ -511,6 +511,23 @@ def send_ballot_commentREDESIGN(request, name):
|
|||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
send_ballot_comment = send_ballot_commentREDESIGN
|
||||
|
||||
@group_required('Secretariat')
|
||||
def clear_ballot(request, name):
|
||||
"""Clear all positions and discusses. This is actually accomplished by creating a new
|
||||
started_iesg_process DocEvent."""
|
||||
doc = get_object_or_404(Document, name=name)
|
||||
if request.method == 'POST':
|
||||
DocEvent.objects.create(type='started_iesg_process',
|
||||
doc=doc,
|
||||
by=request.user.get_profile(),
|
||||
desc='cleared_ballot')
|
||||
|
||||
return HttpResponseRedirect(urlreverse("doc_view", kwargs=dict(name=doc.name)))
|
||||
|
||||
return render_to_response('idrfc/clear_ballot.html',
|
||||
dict(doc=doc,
|
||||
back_url=doc.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def defer_ballot(request, name):
|
||||
|
|
18
ietf/templates/idrfc/clear_ballot.html
Normal file
18
ietf/templates/idrfc/clear_ballot.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Clear ballot for {{ doc }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Clear ballot for {{ doc }}</h1>
|
||||
|
||||
<form action="" method="POST">
|
||||
<p>Clear the ballot for {{ doc.file_tag }}?</p>
|
||||
|
||||
<p>This will clear all ballot positions and discuss entries.</p>
|
||||
|
||||
<div class="actions">
|
||||
<a href="{{ back_url }}">Back</a>
|
||||
<input type="submit" value="Clear ballot"/>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -48,6 +48,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if doc_ballot_edit_button and user|in_group:"Secretariat" %}
|
||||
<div style="margin-top:8px; margin-bottom:8px;"><span id="doc_clear_ballot_button" class="yui-button yui-link-button"><span class="first-child"><a href="{% url doc_clear_ballot name=doc.draft_name %}">Clear ballot</a></span></span></div>
|
||||
{% endif %}
|
||||
|
||||
<p style="margin-top:1em;"><span class="square" style="background:#c00000;"></span><b>Discuss</b><br/>
|
||||
{% with ballot.get_discuss as positions %}{% include "idrfc/doc_ballot_list.html" %}{% endwith %}</p>
|
||||
|
||||
|
|
Loading…
Reference in a new issue