Delete dead code from idrfc, and delete some obsolete imports too
- Legacy-Id: 6001
This commit is contained in:
parent
214b1e0a3b
commit
ec2f0cabbf
|
@ -4,7 +4,6 @@ import datetime
|
|||
|
||||
from django.conf import settings
|
||||
|
||||
from ietf.idtracker.models import InternetDraft, DocumentComment, BallotInfo
|
||||
from ietf.idrfc.mails import *
|
||||
from ietf.idrfc.utils import *
|
||||
|
||||
|
@ -12,15 +11,6 @@ from ietf.doc.models import *
|
|||
from ietf.person.models import Person
|
||||
|
||||
def request_last_call(request, doc):
|
||||
try:
|
||||
ballot = doc.idinternal.ballot
|
||||
except BallotInfo.DoesNotExist:
|
||||
ballot = generate_ballot(request, doc)
|
||||
|
||||
send_last_call_request(request, doc, ballot)
|
||||
add_document_comment(request, doc, "Last Call was requested")
|
||||
|
||||
def request_last_callREDESIGN(request, doc):
|
||||
if not doc.latest_event(type="changed_ballot_writeup_text"):
|
||||
generate_ballot_writeup(request, doc)
|
||||
if not doc.latest_event(type="changed_ballot_approval_text"):
|
||||
|
@ -37,14 +27,7 @@ def request_last_callREDESIGN(request, doc):
|
|||
e.desc = "Last call was requested"
|
||||
e.save()
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
request_last_call = request_last_callREDESIGN
|
||||
|
||||
def get_expired_last_calls():
|
||||
return InternetDraft.objects.filter(lc_expiration_date__lte=datetime.date.today(),
|
||||
idinternal__cur_state__document_state_id=IDState.IN_LAST_CALL)
|
||||
|
||||
def get_expired_last_callsREDESIGN():
|
||||
today = datetime.date.today()
|
||||
for d in Document.objects.filter(states__type="draft-iesg", states__slug="lc"):
|
||||
e = d.latest_event(LastCallDocEvent, type="sent_last_call")
|
||||
|
@ -52,24 +35,6 @@ def get_expired_last_callsREDESIGN():
|
|||
yield d
|
||||
|
||||
def expire_last_call(doc):
|
||||
state = IDState.WAITING_FOR_WRITEUP
|
||||
|
||||
try:
|
||||
ballot = doc.idinternal.ballot
|
||||
if ballot.ballot_writeup and "Relevant content can frequently be found in the abstract" not in ballot.ballot_writeup:
|
||||
state = IDState.WAITING_FOR_AD_GO_AHEAD
|
||||
except BallotInfo.DoesNotExist:
|
||||
pass
|
||||
|
||||
doc.idinternal.change_state(IDState.objects.get(document_state_id=state), None)
|
||||
doc.idinternal.event_date = datetime.date.today()
|
||||
doc.idinternal.save()
|
||||
|
||||
log_state_changed(None, doc, by="system", email_watch_list=False)
|
||||
|
||||
email_last_call_expired(doc)
|
||||
|
||||
def expire_last_callREDESIGN(doc):
|
||||
state = State.objects.get(used=True, type="draft-iesg", slug="writeupw")
|
||||
|
||||
e = doc.latest_event(WriteupDocEvent, type="changed_ballot_writeup_text")
|
||||
|
@ -94,8 +59,3 @@ def expire_last_callREDESIGN(doc):
|
|||
doc.save()
|
||||
|
||||
email_last_call_expired(doc)
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
get_expired_last_calls = get_expired_last_callsREDESIGN
|
||||
expire_last_call = expire_last_callREDESIGN
|
||||
|
||||
|
|
|
@ -9,23 +9,12 @@ from django.conf import settings
|
|||
from django.core.urlresolvers import reverse as urlreverse
|
||||
|
||||
from ietf.utils.mail import send_mail, send_mail_text
|
||||
from ietf.idtracker.models import *
|
||||
from ietf.ipr.search import iprs_from_docs, related_docs
|
||||
#from ietf.doc.models import *
|
||||
from ietf.doc.models import WriteupDocEvent, BallotPositionDocEvent, LastCallDocEvent, DocAlias, ConsensusDocEvent
|
||||
from ietf.person.models import Person
|
||||
from ietf.group.models import Group
|
||||
from ietf.group.models import Group, Role
|
||||
|
||||
def email_state_changed(request, doc, text):
|
||||
to = [x.strip() for x in doc.idinternal.state_change_notice_to.replace(';', ',').split(',')]
|
||||
if to:
|
||||
send_mail(request, to, None,
|
||||
"ID Tracker State Update Notice: %s" % doc.file_tag(),
|
||||
"idrfc/state_changed_email.txt",
|
||||
dict(text=text,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.idinternal.get_absolute_url()))
|
||||
|
||||
def email_state_changedREDESIGN(request, doc, text):
|
||||
to = [x.strip() for x in doc.notify.replace(';', ',').split(',')]
|
||||
if not to:
|
||||
return
|
||||
|
@ -37,25 +26,21 @@ def email_state_changedREDESIGN(request, doc, text):
|
|||
dict(text=text,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
email_state_changed = email_state_changedREDESIGN
|
||||
|
||||
def email_stream_changed(request, doc, old_stream, new_stream, text=""):
|
||||
"""Email the change text to the notify group and to the stream chairs"""
|
||||
to = [x.strip() for x in doc.notify.replace(';', ',').split(',')]
|
||||
from ietf.group.models import Role as RedesignRole
|
||||
|
||||
# These use comprehension to deal with conditions when there might be more than one chair listed for a stream
|
||||
if old_stream:
|
||||
to.extend([x.person.formatted_email() for x in RedesignRole.objects.filter(group__acronym=old_stream.slug,name='chair')])
|
||||
to.extend([x.person.formatted_email() for x in Role.objects.filter(group__acronym=old_stream.slug,name='chair')])
|
||||
if new_stream:
|
||||
to.extend([x.person.formatted_email() for x in RedesignRole.objects.filter(group__acronym=new_stream.slug,name='chair')])
|
||||
to.extend([x.person.formatted_email() for x in Role.objects.filter(group__acronym=new_stream.slug,name='chair')])
|
||||
|
||||
if not to:
|
||||
return
|
||||
|
||||
if not text:
|
||||
text = u"Stream changed to <b>%s</b> from %s"% (new_stream,old_stream)
|
||||
text = u"Stream changed to <b>%s</b> from %s" % (new_stream, old_stream)
|
||||
text = strip_tags(text)
|
||||
|
||||
send_mail(request, to, None,
|
||||
|
@ -86,20 +71,7 @@ def email_authors(request, doc, subject, text):
|
|||
def html_to_text(html):
|
||||
return strip_tags(html.replace("<", "<").replace(">", ">").replace("&", "&").replace("<br>", "\n"))
|
||||
|
||||
def email_owner(request, doc, owner, changed_by, text, subject=None):
|
||||
if not owner or not changed_by or owner == changed_by:
|
||||
return
|
||||
|
||||
to = u"%s <%s>" % owner.person.email()
|
||||
send_mail(request, to,
|
||||
"DraftTracker Mail System <iesg-secretary@ietf.org>",
|
||||
"%s updated by %s" % (doc.file_tag(), changed_by),
|
||||
"idrfc/change_notice.txt",
|
||||
dict(text=html_to_text(text),
|
||||
doc=doc,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.idinternal.get_absolute_url()))
|
||||
|
||||
def email_adREDESIGN(request, doc, ad, changed_by, text, subject=None):
|
||||
def email_ad(request, doc, ad, changed_by, text, subject=None):
|
||||
if not ad or not changed_by or ad == changed_by:
|
||||
return
|
||||
|
||||
|
@ -112,9 +84,6 @@ def email_adREDESIGN(request, doc, ad, changed_by, text, subject=None):
|
|||
doc=doc,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
email_owner = email_adREDESIGN
|
||||
|
||||
|
||||
def generate_ballot_writeup(request, doc):
|
||||
e = doc.latest_event(type="iana_review")
|
||||
|
@ -131,10 +100,6 @@ def generate_ballot_writeup(request, doc):
|
|||
return e
|
||||
|
||||
def generate_last_call_announcement(request, doc):
|
||||
pass
|
||||
|
||||
def generate_last_call_announcementREDESIGN(request, doc):
|
||||
|
||||
expiration_date = date.today() + timedelta(days=14)
|
||||
cc = []
|
||||
if doc.group.type_id in ("individ", "area"):
|
||||
|
@ -177,18 +142,9 @@ def generate_last_call_announcementREDESIGN(request, doc):
|
|||
return e
|
||||
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
generate_last_call_announcement = generate_last_call_announcementREDESIGN
|
||||
|
||||
def generate_approval_mail(request, doc):
|
||||
pass
|
||||
|
||||
def generate_approval_mail_rfc_editor(request, doc):
|
||||
pass
|
||||
|
||||
DO_NOT_PUBLISH_IESG_STATES = ("nopubadw", "nopubanw")
|
||||
|
||||
def generate_approval_mailREDESIGN(request, doc):
|
||||
def generate_approval_mail(request, doc):
|
||||
if doc.get_state_slug("draft-iesg") in DO_NOT_PUBLISH_IESG_STATES or doc.stream_id in ('ise','irtf'):
|
||||
mail = generate_approval_mail_rfc_editor(request, doc)
|
||||
else:
|
||||
|
@ -253,7 +209,7 @@ def generate_approval_mail_approved(request, doc):
|
|||
)
|
||||
)
|
||||
|
||||
def generate_approval_mail_rfc_editorREDESIGN(request, doc):
|
||||
def generate_approval_mail_rfc_editor(request, doc):
|
||||
disapproved = doc.get_state_slug("draft-iesg") in DO_NOT_PUBLISH_IESG_STATES
|
||||
doc_type = "RFC" if doc.get_state_slug() == "rfc" else "Internet Draft"
|
||||
|
||||
|
@ -281,10 +237,6 @@ def generate_approval_mail_rfc_editorREDESIGN(request, doc):
|
|||
)
|
||||
)
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
generate_approval_mail = generate_approval_mailREDESIGN
|
||||
generate_approval_mail_rfc_editor = generate_approval_mail_rfc_editorREDESIGN
|
||||
|
||||
def generate_publication_request(request, doc):
|
||||
group_description = ""
|
||||
if doc.group and doc.group.acronym != "none":
|
||||
|
@ -310,18 +262,7 @@ def generate_publication_request(request, doc):
|
|||
)
|
||||
)
|
||||
|
||||
def send_last_call_request(request, doc, ballot):
|
||||
to = "iesg-secretary@ietf.org"
|
||||
frm = '"DraftTracker Mail System" <iesg-secretary@ietf.org>'
|
||||
docs = [d.document() for d in doc.idinternal.ballot_set()]
|
||||
|
||||
send_mail(request, to, frm,
|
||||
"Last Call: %s" % doc.file_tag(),
|
||||
"idrfc/last_call_request.txt",
|
||||
dict(docs=docs,
|
||||
doc_url=settings.IDTRACKER_BASE_URL + doc.idinternal.get_absolute_url()))
|
||||
|
||||
def send_last_call_requestREDESIGN(request, doc):
|
||||
def send_last_call_request(request, doc):
|
||||
to = "iesg-secretary@ietf.org"
|
||||
frm = '"DraftTracker Mail System" <iesg-secretary@ietf.org>'
|
||||
|
||||
|
@ -331,21 +272,8 @@ def send_last_call_requestREDESIGN(request, doc):
|
|||
dict(docs=[doc],
|
||||
doc_url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
send_last_call_request = send_last_call_requestREDESIGN
|
||||
|
||||
def email_resurrect_requested(request, doc, by):
|
||||
to = "I-D Administrator <internet-drafts@ietf.org>"
|
||||
frm = u"%s <%s>" % by.person.email()
|
||||
send_mail(request, to, frm,
|
||||
"I-D Resurrection Request",
|
||||
"idrfc/resurrect_request_email.txt",
|
||||
dict(doc=doc,
|
||||
by=frm,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.idinternal.get_absolute_url()))
|
||||
|
||||
def email_resurrect_requestedREDESIGN(request, doc, by):
|
||||
to = "I-D Administrator <internet-drafts@ietf.org>"
|
||||
|
||||
if by.role_set.filter(name="secr", group__acronym="secretariat"):
|
||||
e = by.role_email("secr", group="secretariat")
|
||||
|
@ -360,20 +288,7 @@ def email_resurrect_requestedREDESIGN(request, doc, by):
|
|||
by=frm,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
email_resurrect_requested = email_resurrect_requestedREDESIGN
|
||||
|
||||
def email_resurrection_completed(request, doc):
|
||||
to = u"%s <%s>" % doc.idinternal.resurrect_requested_by.person.email()
|
||||
frm = "I-D Administrator <internet-drafts-reply@ietf.org>"
|
||||
send_mail(request, to, frm,
|
||||
"I-D Resurrection Completed - %s" % doc.file_tag(),
|
||||
"idrfc/resurrect_completed_email.txt",
|
||||
dict(doc=doc,
|
||||
by=frm,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.idinternal.get_absolute_url()))
|
||||
|
||||
def email_resurrection_completedREDESIGN(request, doc, requester):
|
||||
def email_resurrection_completed(request, doc, requester):
|
||||
if requester.role_set.filter(name="secr", group__acronym="secretariat"):
|
||||
e = requester.role_email("secr", group="secretariat")
|
||||
else:
|
||||
|
@ -388,9 +303,6 @@ def email_resurrection_completedREDESIGN(request, doc, requester):
|
|||
by=frm,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
email_resurrection_completed = email_resurrection_completedREDESIGN
|
||||
|
||||
def email_ballot_deferred(request, doc, by, telechat_date):
|
||||
to = "iesg@ietf.org"
|
||||
frm = "DraftTracker Mail System <iesg-secretary@ietf.org>"
|
||||
|
@ -401,10 +313,7 @@ def email_ballot_deferred(request, doc, by, telechat_date):
|
|||
by=by,
|
||||
telechat_date=telechat_date))
|
||||
|
||||
def generate_issue_ballot_mail(request, doc):
|
||||
pass
|
||||
|
||||
def generate_issue_ballot_mailREDESIGN(request, doc, ballot):
|
||||
def generate_issue_ballot_mail(request, doc, ballot):
|
||||
active_ads = Person.objects.filter(role__name="ad", role__group__state="active").distinct()
|
||||
|
||||
positions = BallotPositionDocEvent.objects.filter(doc=doc, type="changed_ballot_position", ballot=ballot).order_by("-time", '-id').select_related('ad')
|
||||
|
@ -456,7 +365,7 @@ def generate_issue_ballot_mailREDESIGN(request, doc, ballot):
|
|||
e = doc.latest_event(WriteupDocEvent, type="changed_ballot_writeup_text")
|
||||
ballot_writeup = e.text if e else ""
|
||||
|
||||
return render_to_string("idrfc/issue_ballot_mailREDESIGN.txt",
|
||||
return render_to_string("idrfc/issue_ballot_mail.txt",
|
||||
dict(doc=doc,
|
||||
doc_url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url(),
|
||||
active_ad_positions=active_ad_positions,
|
||||
|
@ -468,9 +377,6 @@ def generate_issue_ballot_mailREDESIGN(request, doc, ballot):
|
|||
)
|
||||
)
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
generate_issue_ballot_mail = generate_issue_ballot_mailREDESIGN
|
||||
|
||||
def email_iana(request, doc, to, msg):
|
||||
# fix up message and send it with extra info on doc in headers
|
||||
import email
|
||||
|
@ -494,19 +400,6 @@ def extra_automation_headers(doc):
|
|||
return extra
|
||||
|
||||
def email_last_call_expired(doc):
|
||||
text = "IETF Last Call has ended, and the state has been changed to\n%s." % doc.idinternal.cur_state.state
|
||||
|
||||
send_mail(None,
|
||||
"iesg@ietf.org",
|
||||
"DraftTracker Mail System <iesg-secretary@ietf.org>",
|
||||
"Last Call Expired: %s" % doc.file_tag(),
|
||||
"idrfc/change_notice.txt",
|
||||
dict(text=text,
|
||||
doc=doc,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.idinternal.get_absolute_url()),
|
||||
cc="iesg-secretary@ietf.org")
|
||||
|
||||
def email_last_call_expiredREDESIGN(doc):
|
||||
text = "IETF Last Call has ended, and the state has been changed to\n%s." % doc.get_state("draft-iesg").name
|
||||
|
||||
to = [x.strip() for x in doc.notify.replace(';', ',').split(',')]
|
||||
|
@ -521,7 +414,3 @@ def email_last_call_expiredREDESIGN(doc):
|
|||
doc=doc,
|
||||
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()),
|
||||
cc="iesg-secretary@ietf.org")
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
email_last_call_expired = email_last_call_expiredREDESIGN
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from django import template
|
||||
from django.core.cache import cache
|
||||
from django.template import loader
|
||||
from ietf.idtracker.models import Area
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
from django import template
|
||||
from django.core.cache import cache
|
||||
from django.template import loader
|
||||
from ietf.idtracker.models import Area
|
||||
|
||||
from ietf.group.models import Group
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
@ -42,26 +43,27 @@ area_short_names = {
|
|||
'rai':'RAI'
|
||||
}
|
||||
|
||||
def get_short_name(area):
|
||||
if area.area_acronym.acronym in area_short_names:
|
||||
return area_short_names[area.area_acronym.acronym]
|
||||
else:
|
||||
area_name = area.area_acronym.name
|
||||
if area_name.endswith(" Area"):
|
||||
area_name = area_name[:-5]
|
||||
return area_name
|
||||
|
||||
class WgMenuNode(template.Node):
|
||||
def __init__(self):
|
||||
pass
|
||||
def render(self, context):
|
||||
x = cache.get('idrfc_wgmenu')
|
||||
if x:
|
||||
return x
|
||||
areas = [{'area':x, 'short_name':get_short_name(x)} for x in Area.active_areas()]
|
||||
x = loader.render_to_string('base_wgmenu.html', {'areas':areas})
|
||||
|
||||
areas = Group.objects.filter(type="area", state="active").order_by('acronym')
|
||||
groups = Group.objects.filter(type="wg", state="active", parent__in=areas).order_by("acronym")
|
||||
|
||||
for a in areas:
|
||||
a.short_area_name = area_short_names.get(a.acronym) or a.name
|
||||
if a.short_area_name.endswith(" Area"):
|
||||
a.short_area_name = a.short_area_name[:-len(" Area")]
|
||||
|
||||
a.active_groups = [g for g in groups if g.parent_id == a.id]
|
||||
|
||||
areas = [a for a in areas if a.active_groups]
|
||||
|
||||
res = loader.render_to_string('base_wgmenu.html', {'areas':areas})
|
||||
cache.set('idrfc_wgmenu', x, 30*60)
|
||||
return x
|
||||
return res
|
||||
|
||||
def do_wg_menu(parser, token):
|
||||
return WgMenuNode()
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
from django.conf import settings
|
||||
|
||||
from ietf.idtracker.models import InternetDraft, DocumentComment, BallotInfo, IESGLogin
|
||||
from ietf.idrfc.mails import *
|
||||
from ietf.ietfauth.utils import has_role, is_authorized_in_doc_stream
|
||||
|
||||
|
@ -32,38 +31,7 @@ def generate_ballot(request, doc):
|
|||
doc.idinternal.ballot = ballot
|
||||
return ballot
|
||||
|
||||
def log_state_changed(request, doc, by, email_watch_list=True, note=''):
|
||||
change = u"State changed to <b>%s</b> from %s." % (
|
||||
doc.idinternal.docstate(),
|
||||
format_document_state(doc.idinternal.prev_state,
|
||||
doc.idinternal.prev_sub_state))
|
||||
if note:
|
||||
change += "<br>%s" % note
|
||||
|
||||
c = DocumentComment()
|
||||
c.document = doc.idinternal
|
||||
c.public_flag = True
|
||||
c.version = doc.revision_display()
|
||||
c.comment_text = change
|
||||
|
||||
if doc.idinternal.docstate()=="In Last Call":
|
||||
c.comment_text += "\n\n<b>The following Last Call Announcement was sent out:</b>\n\n"
|
||||
c.comment_text += doc.idinternal.ballot.last_call_text
|
||||
|
||||
|
||||
if isinstance(by, IESGLogin):
|
||||
c.created_by = by
|
||||
c.result_state = doc.idinternal.cur_state
|
||||
c.origin_state = doc.idinternal.prev_state
|
||||
c.rfc_flag = doc.idinternal.rfc_flag
|
||||
c.save()
|
||||
|
||||
if email_watch_list:
|
||||
email_state_changed(request, doc, strip_tags(change))
|
||||
|
||||
return change
|
||||
|
||||
def log_state_changedREDESIGN(request, doc, by, prev_iesg_state, prev_iesg_tag):
|
||||
def log_state_changed(request, doc, by, prev_iesg_state, prev_iesg_tag):
|
||||
from ietf.doc.models import DocEvent, IESG_SUBSTATE_TAGS
|
||||
|
||||
state = doc.get_state("draft-iesg")
|
||||
|
@ -83,47 +51,7 @@ def log_state_changedREDESIGN(request, doc, by, prev_iesg_state, prev_iesg_tag):
|
|||
e.save()
|
||||
return e
|
||||
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
log_state_changed = log_state_changedREDESIGN
|
||||
|
||||
|
||||
def update_telechat(request, idinternal, new_telechat_date, new_returning_item=None):
|
||||
on_agenda = bool(new_telechat_date)
|
||||
|
||||
if new_returning_item == None:
|
||||
new_returning_item = idinternal.returning_item
|
||||
|
||||
returning_item_changed = False
|
||||
if idinternal.returning_item != bool(new_returning_item):
|
||||
idinternal.returning_item = bool(new_returning_item)
|
||||
returning_item_changed = True
|
||||
|
||||
# auto-update returning item
|
||||
if (not returning_item_changed and
|
||||
on_agenda and idinternal.agenda
|
||||
and new_telechat_date != idinternal.telechat_date):
|
||||
idinternal.returning_item = True
|
||||
|
||||
# update agenda
|
||||
doc = idinternal.document()
|
||||
if bool(idinternal.agenda) != on_agenda:
|
||||
if on_agenda:
|
||||
add_document_comment(request, doc,
|
||||
"Placed on agenda for telechat - %s" % new_telechat_date)
|
||||
idinternal.telechat_date = new_telechat_date
|
||||
else:
|
||||
add_document_comment(request, doc,
|
||||
"Removed from agenda for telechat")
|
||||
idinternal.agenda = on_agenda
|
||||
elif on_agenda and new_telechat_date != idinternal.telechat_date:
|
||||
add_document_comment(request, doc,
|
||||
"Telechat date has been changed to <b>%s</b> from <b>%s</b>" %
|
||||
(new_telechat_date,
|
||||
idinternal.telechat_date))
|
||||
idinternal.telechat_date = new_telechat_date
|
||||
|
||||
def update_telechatREDESIGN(request, doc, by, new_telechat_date, new_returning_item=None):
|
||||
def update_telechat(request, doc, by, new_telechat_date, new_returning_item=None):
|
||||
from ietf.doc.models import TelechatDocEvent
|
||||
|
||||
on_agenda = bool(new_telechat_date)
|
||||
|
@ -173,7 +101,3 @@ def update_telechatREDESIGN(request, doc, by, new_telechat_date, new_returning_i
|
|||
e.desc = "Removed telechat returning item indication"
|
||||
|
||||
e.save()
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
update_telechat = update_telechatREDESIGN
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# ballot management (voting, commenting, writeups, ...) for Area
|
||||
# Directors and Secretariat
|
||||
|
||||
import re, os
|
||||
from datetime import datetime, date, time, timedelta
|
||||
import re, os, datetime
|
||||
|
||||
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden, Http404
|
||||
from django.shortcuts import render_to_response, get_object_or_404
|
||||
from django.core.urlresolvers import reverse as urlreverse
|
||||
|
@ -16,11 +16,8 @@ from django.conf import settings
|
|||
import debug
|
||||
|
||||
from ietf.utils.mail import send_mail_text, send_mail_preformatted
|
||||
from ietf.ietfauth.decorators import group_required, role_required
|
||||
from ietf.idtracker.templatetags.ietf_filters import in_group
|
||||
from ietf.ietfauth.decorators import has_role, role_required
|
||||
from ietf.idtracker.models import *
|
||||
from ietf.iesg.models import *
|
||||
from ietf.iesg.models import TelechatDate
|
||||
from ietf.ipr.models import IprDetail
|
||||
from ietf.ipr.search import iprs_from_docs
|
||||
from ietf.idrfc.mails import *
|
||||
|
@ -54,7 +51,7 @@ def do_undefer_ballot(request, doc):
|
|||
logging, and the Document object.
|
||||
'''
|
||||
login = request.user.get_profile()
|
||||
telechat_date = TelechatDates.objects.all()[0].date1
|
||||
telechat_date = TelechatDate.objects.active().order_by("date")[0].date
|
||||
save_document_in_history(doc)
|
||||
|
||||
prev_state = doc.friendly_state()
|
||||
|
@ -96,15 +93,8 @@ def get_ballot_info(ballot, area_director):
|
|||
|
||||
return (pos, discuss, comment)
|
||||
|
||||
class EditPositionForm(forms.Form):
|
||||
pass
|
||||
|
||||
# -------------------------------------------------
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def edit_position(request, name):
|
||||
pass
|
||||
|
||||
class EditPositionFormREDESIGN(forms.Form):
|
||||
class EditPositionForm(forms.Form):
|
||||
position = forms.ModelChoiceField(queryset=BallotPositionName.objects.all(), widget=forms.RadioSelect, initial="norecord", required=True)
|
||||
discuss = forms.CharField(required=False, widget=forms.Textarea)
|
||||
comment = forms.CharField(required=False, widget=forms.Textarea)
|
||||
|
@ -123,7 +113,7 @@ class EditPositionFormREDESIGN(forms.Form):
|
|||
return entered_discuss
|
||||
|
||||
@role_required('Area Director','Secretariat')
|
||||
def edit_positionREDESIGN(request, name, ballot_id):
|
||||
def edit_position(request, name, ballot_id):
|
||||
"""Vote and edit discuss and comment on document as Area Director."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
ballot = get_object_or_404(BallotDocEvent, type="created_ballot", pk=ballot_id, doc=doc)
|
||||
|
@ -244,7 +234,7 @@ def edit_positionREDESIGN(request, name, ballot_id):
|
|||
|
||||
ballot_deferred = doc.active_defer_event()
|
||||
|
||||
return render_to_response('idrfc/edit_positionREDESIGN.html',
|
||||
return render_to_response('idrfc/edit_position.html',
|
||||
dict(doc=doc,
|
||||
form=form,
|
||||
ad=ad,
|
||||
|
@ -257,85 +247,9 @@ def edit_positionREDESIGN(request, name, ballot_id):
|
|||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
edit_position = edit_positionREDESIGN
|
||||
EditPositionForm = EditPositionFormREDESIGN
|
||||
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def send_ballot_comment(request, name):
|
||||
"""Email Internet Draft ballot discuss/comment for area director."""
|
||||
doc = get_object_or_404(InternetDraft, filename=name)
|
||||
if not doc.idinternal:
|
||||
raise Http404()
|
||||
|
||||
ad = login = IESGLogin.objects.get(login_name=request.user.username)
|
||||
|
||||
return_to_url = request.GET.get('return_to_url')
|
||||
if not return_to_url:
|
||||
return_to_url = doc.idinternal.get_absolute_url()
|
||||
|
||||
if 'HTTP_REFERER' in request.META:
|
||||
back_url = request.META['HTTP_REFERER']
|
||||
else:
|
||||
back_url = doc.idinternal.get_absolute_url()
|
||||
|
||||
|
||||
|
||||
# if we're in the Secretariat, we can select an AD to act as stand-in for
|
||||
if not in_group(request.user, "Area_Director"):
|
||||
ad_username = request.GET.get('ad')
|
||||
if not ad_username:
|
||||
raise Http404()
|
||||
ad = get_object_or_404(IESGLogin, login_name=ad_username)
|
||||
|
||||
pos, discuss, comment = get_ballot_info(doc.idinternal.ballot, ad)
|
||||
|
||||
subj = []
|
||||
d = ""
|
||||
if pos and pos.discuss == 1 and discuss and discuss.text:
|
||||
d = discuss.text
|
||||
subj.append("DISCUSS")
|
||||
c = ""
|
||||
if comment and comment.text:
|
||||
c = comment.text
|
||||
subj.append("COMMENT")
|
||||
|
||||
|
||||
ad_name = str(ad)
|
||||
ad_name_genitive = ad_name + "'" if ad_name.endswith('s') else ad_name + "'s"
|
||||
subject = "%s %s on %s" % (ad_name_genitive, pos.name() if pos else "No Position" , doc.filename + '-' + doc.revision_display())
|
||||
if subj:
|
||||
subject += ": (with "+" and ".join(subj)+")"
|
||||
|
||||
body = render_to_string("idrfc/ballot_comment_mail.txt",
|
||||
dict(discuss=d, comment=c, ad=ad, doc=doc, pos=pos, settings=settings))
|
||||
frm = u"%s <%s>" % ad.person.email()
|
||||
to = "The IESG <iesg@ietf.org>"
|
||||
|
||||
if request.method == 'POST':
|
||||
cc = [x.strip() for x in request.POST.get("cc", "").split(',') if x.strip()]
|
||||
if request.POST.get("cc_state_change") and doc.idinternal.state_change_notice_to:
|
||||
cc.extend(doc.idinternal.state_change_notice_to.split(','))
|
||||
|
||||
send_mail_text(request, to, frm, subject, body, cc=", ".join(cc))
|
||||
|
||||
return HttpResponseRedirect(return_to_url)
|
||||
|
||||
return render_to_response('idrfc/send_ballot_comment.html',
|
||||
dict(doc=doc,
|
||||
subject=subject,
|
||||
body=body,
|
||||
frm=frm,
|
||||
to=to,
|
||||
ad=ad,
|
||||
can_send=d or c,
|
||||
back_url=back_url,
|
||||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
@role_required('Area Director','Secretariat')
|
||||
def send_ballot_commentREDESIGN(request, name, ballot_id):
|
||||
def send_ballot_comment(request, name, ballot_id):
|
||||
"""Email document ballot position discuss/comment for Area Director."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
ballot = get_object_or_404(BallotDocEvent, type="created_ballot", pk=ballot_id, doc=doc)
|
||||
|
@ -399,7 +313,7 @@ def send_ballot_commentREDESIGN(request, name, ballot_id):
|
|||
|
||||
return HttpResponseRedirect(return_to_url)
|
||||
|
||||
return render_to_response('idrfc/send_ballot_commentREDESIGN.html',
|
||||
return render_to_response('idrfc/send_ballot_comment.html',
|
||||
dict(doc=doc,
|
||||
subject=subject,
|
||||
body=body,
|
||||
|
@ -411,10 +325,7 @@ def send_ballot_commentREDESIGN(request, name, ballot_id):
|
|||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
send_ballot_comment = send_ballot_commentREDESIGN
|
||||
|
||||
@group_required('Secretariat')
|
||||
@role_required('Secretariat')
|
||||
def clear_ballot(request, name):
|
||||
"""Clear all positions and discusses on every open ballot for a document."""
|
||||
doc = get_object_or_404(Document, name=name)
|
||||
|
@ -432,12 +343,8 @@ def clear_ballot(request, name):
|
|||
back_url=doc.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
@role_required('Area Director','Secretariat')
|
||||
def defer_ballot(request, name):
|
||||
pass
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def defer_ballotREDESIGN(request, name):
|
||||
"""Signal post-pone of ballot, notifying relevant parties."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
if doc.type_id not in ('draft','conflrev'):
|
||||
|
@ -446,7 +353,7 @@ def defer_ballotREDESIGN(request, name):
|
|||
raise Http404()
|
||||
|
||||
login = request.user.get_profile()
|
||||
telechat_date = TelechatDates.objects.all()[0].date2
|
||||
telechat_date = TelechatDate.objects.active().order_by("date")[1].date
|
||||
|
||||
if request.method == 'POST':
|
||||
save_document_in_history(doc)
|
||||
|
@ -479,15 +386,8 @@ def defer_ballotREDESIGN(request, name):
|
|||
back_url=doc.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
defer_ballot = defer_ballotREDESIGN
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
@role_required('Area Director','Secretariat')
|
||||
def undefer_ballot(request, name):
|
||||
pass
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def undefer_ballotREDESIGN(request, name):
|
||||
"""undo deferral of ballot ballot."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
if doc.type_id not in ('draft','conflrev'):
|
||||
|
@ -495,7 +395,7 @@ def undefer_ballotREDESIGN(request, name):
|
|||
if doc.type_id == 'draft' and not doc.get_state("draft-iesg"):
|
||||
raise Http404()
|
||||
|
||||
telechat_date = TelechatDates.objects.all()[0].date1
|
||||
telechat_date = TelechatDate.objects.active().order_by("date")[0].date
|
||||
|
||||
if request.method == 'POST':
|
||||
do_undefer_ballot(request,doc)
|
||||
|
@ -507,97 +407,7 @@ def undefer_ballotREDESIGN(request, name):
|
|||
back_url=doc.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
undefer_ballot = undefer_ballotREDESIGN
|
||||
|
||||
class LastCallTextForm(forms.ModelForm):
|
||||
def clean_last_call_text(self):
|
||||
lines = self.cleaned_data["last_call_text"].split("\r\n")
|
||||
for l, next in zip(lines, lines[1:]):
|
||||
if l.startswith('Subject:') and next.strip():
|
||||
raise forms.ValidationError("Subject line appears to have a line break, please make sure there is no line breaks in the subject line and that it is followed by an empty line.")
|
||||
|
||||
return self.cleaned_data["last_call_text"].replace("\r", "")
|
||||
|
||||
class Meta:
|
||||
model = BallotInfo
|
||||
fields = ["last_call_text"]
|
||||
|
||||
class BallotWriteupForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = BallotInfo
|
||||
fields = ["ballot_writeup"]
|
||||
|
||||
def clean_ballot_writeup(self):
|
||||
return self.cleaned_data["ballot_writeup"].replace("\r", "")
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def lastcalltext(request, name):
|
||||
"""Editing of the last call text"""
|
||||
doc = get_object_or_404(InternetDraft, filename=name)
|
||||
if not doc.idinternal:
|
||||
raise Http404()
|
||||
|
||||
login = IESGLogin.objects.get(login_name=request.user.username)
|
||||
|
||||
try:
|
||||
ballot = doc.idinternal.ballot
|
||||
except BallotInfo.DoesNotExist:
|
||||
ballot = generate_ballot(request, doc)
|
||||
|
||||
last_call_form = LastCallTextForm(instance=ballot)
|
||||
|
||||
if request.method == 'POST':
|
||||
if "save_last_call_text" in request.POST or "send_last_call_request" in request.POST:
|
||||
last_call_form = LastCallTextForm(request.POST, instance=ballot)
|
||||
if last_call_form.is_valid():
|
||||
ballot.last_call_text = last_call_form.cleaned_data["last_call_text"]
|
||||
add_document_comment(request, doc, "Last Call text changed")
|
||||
ballot.save()
|
||||
|
||||
if "send_last_call_request" in request.POST:
|
||||
doc.idinternal.change_state(IDState.objects.get(document_state_id=IDState.LAST_CALL_REQUESTED), None)
|
||||
|
||||
change = idrfcutil_log_state_changed(request, doc, login)
|
||||
email_owner(request, doc, doc.idinternal.job_owner, login, change)
|
||||
request_last_call(request, doc)
|
||||
|
||||
doc.idinternal.event_date = date.today()
|
||||
doc.idinternal.save()
|
||||
|
||||
return render_to_response('idrfc/last_call_requested.html',
|
||||
dict(doc=doc),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if "regenerate_last_call_text" in request.POST:
|
||||
ballot.last_call_text = generate_last_call_announcement(request, doc)
|
||||
ballot.save()
|
||||
|
||||
# make sure form has the updated text
|
||||
last_call_form = LastCallTextForm(instance=ballot)
|
||||
|
||||
doc.idinternal.event_date = date.today()
|
||||
doc.idinternal.save()
|
||||
|
||||
can_request_last_call = doc.idinternal.cur_state_id < 27
|
||||
can_make_last_call = doc.idinternal.cur_state_id < 20
|
||||
can_announce = doc.idinternal.cur_state_id > 19
|
||||
docs_with_invalid_status = [d.document().file_tag() for d in doc.idinternal.ballot_set() if "None" in d.document().intended_status.intended_status or "Request" in d.document().intended_status.intended_status]
|
||||
need_intended_status = ", ".join(docs_with_invalid_status)
|
||||
|
||||
return render_to_response('idrfc/ballot_lastcalltext.html',
|
||||
dict(doc=doc,
|
||||
back_url=doc.idinternal.get_absolute_url(),
|
||||
ballot=ballot,
|
||||
last_call_form=last_call_form,
|
||||
can_request_last_call=can_request_last_call,
|
||||
can_make_last_call=can_make_last_call,
|
||||
need_intended_status=need_intended_status,
|
||||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
|
||||
class LastCallTextFormREDESIGN(forms.Form):
|
||||
class LastCallTextForm(forms.Form):
|
||||
last_call_text = forms.CharField(widget=forms.Textarea, required=True)
|
||||
|
||||
def clean_last_call_text(self):
|
||||
|
@ -608,8 +418,9 @@ class LastCallTextFormREDESIGN(forms.Form):
|
|||
|
||||
return self.cleaned_data["last_call_text"].replace("\r", "")
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def lastcalltextREDESIGN(request, name):
|
||||
|
||||
@role_required('Area Director','Secretariat')
|
||||
def lastcalltext(request, name):
|
||||
"""Editing of the last call text"""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
if not doc.get_state("draft-iesg"):
|
||||
|
@ -653,7 +464,7 @@ def lastcalltextREDESIGN(request, name):
|
|||
doc.save()
|
||||
|
||||
email_state_changed(request, doc, e.desc)
|
||||
email_owner(request, doc, doc.ad, login, e.desc)
|
||||
email_ad(request, doc, doc.ad, login, e.desc)
|
||||
|
||||
request_last_call(request, doc)
|
||||
|
||||
|
@ -687,95 +498,14 @@ def lastcalltextREDESIGN(request, name):
|
|||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
LastCallTextForm = LastCallTextFormREDESIGN
|
||||
lastcalltext = lastcalltextREDESIGN
|
||||
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def ballot_writeupnotes(request, name):
|
||||
"""Editing of ballot write-up and notes"""
|
||||
doc = get_object_or_404(InternetDraft, filename=name)
|
||||
if not doc.idinternal:
|
||||
raise Http404()
|
||||
|
||||
login = IESGLogin.objects.get(login_name=request.user.username)
|
||||
|
||||
try:
|
||||
ballot = doc.idinternal.ballot
|
||||
except BallotInfo.DoesNotExist:
|
||||
ballot = generate_ballot(request, doc)
|
||||
|
||||
ballot_writeup_form = BallotWriteupForm(instance=ballot)
|
||||
|
||||
if request.method == 'POST':
|
||||
|
||||
if "save_ballot_writeup" in request.POST:
|
||||
ballot_writeup_form = BallotWriteupForm(request.POST, instance=ballot)
|
||||
if ballot_writeup_form.is_valid():
|
||||
ballot.ballot_writeup = ballot_writeup_form.cleaned_data["ballot_writeup"]
|
||||
add_document_comment(request, doc, "Ballot writeup text changed")
|
||||
ballot.save()
|
||||
|
||||
if "issue_ballot" in request.POST:
|
||||
ballot_writeup_form = BallotWriteupForm(request.POST, instance=ballot)
|
||||
approval_text_form = ApprovalTextForm(request.POST, instance=ballot)
|
||||
if ballot_writeup_form.is_valid() and approval_text_form.is_valid():
|
||||
ballot.ballot_writeup = ballot_writeup_form.cleaned_data["ballot_writeup"]
|
||||
ballot.approval_text = approval_text_form.cleaned_data["approval_text"]
|
||||
ballot.active = True
|
||||
ballot.ballot_issued = True
|
||||
ballot.save()
|
||||
|
||||
if not Position.objects.filter(ballot=ballot, ad=login):
|
||||
pos = Position()
|
||||
pos.ballot = ballot
|
||||
pos.ad = login
|
||||
pos.yes = 1
|
||||
pos.noobj = pos.abstain = pos.approve = pos.discuss = pos.recuse = 0
|
||||
pos.save()
|
||||
|
||||
msg = generate_issue_ballot_mail(request, doc)
|
||||
send_mail_preformatted(request, msg)
|
||||
|
||||
# email_iana(request, doc, 'drafts-eval@icann.org', msg)
|
||||
|
||||
doc.b_sent_date = date.today()
|
||||
doc.save()
|
||||
|
||||
add_document_comment(request, doc, "Ballot has been issued")
|
||||
|
||||
doc.idinternal.event_date = date.today()
|
||||
doc.idinternal.save()
|
||||
|
||||
return render_to_response('idrfc/ballot_issued.html',
|
||||
dict(doc=doc,
|
||||
back_url=doc.idinternal.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
|
||||
doc.idinternal.event_date = date.today()
|
||||
doc.idinternal.save()
|
||||
|
||||
docs_with_invalid_status = [d.document().file_tag() for d in doc.idinternal.ballot_set() if "None" in d.document().intended_status.intended_status or "Request" in d.document().intended_status.intended_status]
|
||||
need_intended_status = ", ".join(docs_with_invalid_status)
|
||||
|
||||
return render_to_response('idrfc/ballot_writeupnotes.html',
|
||||
dict(doc=doc,
|
||||
ballot=ballot,
|
||||
ballot_writeup_form=ballot_writeup_form,
|
||||
need_intended_status=need_intended_status,
|
||||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
class BallotWriteupFormREDESIGN(forms.Form):
|
||||
class BallotWriteupForm(forms.Form):
|
||||
ballot_writeup = forms.CharField(widget=forms.Textarea, required=True)
|
||||
|
||||
def clean_ballot_writeup(self):
|
||||
return self.cleaned_data["ballot_writeup"].replace("\r", "")
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def ballot_writeupnotesREDESIGN(request, name):
|
||||
@role_required('Area Director','Secretariat')
|
||||
def ballot_writeupnotes(request, name):
|
||||
"""Editing of ballot write-up and notes"""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
|
||||
|
@ -838,7 +568,7 @@ def ballot_writeupnotesREDESIGN(request, name):
|
|||
if not doc.intended_std_level:
|
||||
need_intended_status = doc.file_tag()
|
||||
|
||||
return render_to_response('idrfc/ballot_writeupnotesREDESIGN.html',
|
||||
return render_to_response('idrfc/ballot_writeupnotes.html',
|
||||
dict(doc=doc,
|
||||
back_url=doc.get_absolute_url(),
|
||||
ballot_issued=bool(doc.latest_event(type="sent_ballot_announcement")),
|
||||
|
@ -847,19 +577,13 @@ def ballot_writeupnotesREDESIGN(request, name):
|
|||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
BallotWriteupForm = BallotWriteupFormREDESIGN
|
||||
ballot_writeupnotes = ballot_writeupnotesREDESIGN
|
||||
|
||||
|
||||
|
||||
class ApprovalTextForm(forms.Form):
|
||||
approval_text = forms.CharField(widget=forms.Textarea, required=True)
|
||||
|
||||
def clean_approval_text(self):
|
||||
return self.cleaned_data["approval_text"].replace("\r", "")
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
@role_required('Area Director','Secretariat')
|
||||
def ballot_approvaltext(request, name):
|
||||
"""Editing of approval text"""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
|
@ -907,80 +631,8 @@ def ballot_approvaltext(request, name):
|
|||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
|
||||
@group_required('Secretariat')
|
||||
@role_required('Secretariat')
|
||||
def approve_ballot(request, name):
|
||||
"""Approve ballot, sending out announcement, changing state."""
|
||||
doc = get_object_or_404(InternetDraft, filename=name)
|
||||
if not doc.idinternal:
|
||||
raise Http404()
|
||||
|
||||
login = IESGLogin.objects.get(login_name=request.user.username)
|
||||
|
||||
ballot = doc.idinternal.ballot
|
||||
|
||||
if "To: RFC Editor" in ballot.approval_text:
|
||||
action = "to_rfc_editor"
|
||||
elif "NOT be published" in ballot.approval_text:
|
||||
action = "do_not_publish"
|
||||
else:
|
||||
action = "to_announcement_list"
|
||||
|
||||
announcement = ballot.approval_text + "\n\n" + ballot.ballot_writeup
|
||||
|
||||
if request.method == 'POST':
|
||||
for i in doc.idinternal.ballot_set():
|
||||
if action == "do_not_publish":
|
||||
new_state = IDState.DEAD
|
||||
else:
|
||||
new_state = IDState.APPROVED_ANNOUNCEMENT_SENT
|
||||
|
||||
i.change_state(IDState.objects.get(document_state_id=new_state), None)
|
||||
|
||||
if action == "do_not_publish":
|
||||
i.dnp = True
|
||||
i.dnp_date = date.today()
|
||||
i.noproblem = False
|
||||
|
||||
if action == "to_rfc_editor":
|
||||
i.noproblem = True
|
||||
|
||||
i.event_date = date.today()
|
||||
i.save()
|
||||
|
||||
i.document().b_approve_date = date.today()
|
||||
i.document().save()
|
||||
|
||||
if action == "do_not_publish":
|
||||
comment = "Do Not Publish note has been sent to RFC Editor"
|
||||
else:
|
||||
comment = "IESG has approved"
|
||||
|
||||
comment += " and state has been changed to %s" % i.cur_state.state
|
||||
add_document_comment(request, i.document(), comment)
|
||||
email_owner(request, i.document(), i.job_owner, login, comment)
|
||||
email_state_changed(request, i.document(), strip_tags(comment))
|
||||
|
||||
send_mail_preformatted(request, announcement)
|
||||
|
||||
ballot.an_sent = True
|
||||
ballot.an_sent_date = date.today()
|
||||
ballot.an_sent_by = login
|
||||
ballot.save()
|
||||
|
||||
if action == "to_announcement_list":
|
||||
email_iana(request, doc, "drafts-approval@icann.org", announcement)
|
||||
|
||||
return HttpResponseRedirect(doc.idinternal.get_absolute_url())
|
||||
|
||||
return render_to_response('idrfc/approve_ballot.html',
|
||||
dict(doc=doc,
|
||||
action=action,
|
||||
announcement=announcement),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
@group_required('Secretariat')
|
||||
def approve_ballotREDESIGN(request, name):
|
||||
"""Approve ballot, sending out announcement, changing state."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
if not doc.get_state("draft-iesg"):
|
||||
|
@ -1059,7 +711,7 @@ def approve_ballotREDESIGN(request, name):
|
|||
doc.save()
|
||||
|
||||
email_state_changed(request, doc, change_description)
|
||||
email_owner(request, doc, doc.ad, login, change_description)
|
||||
email_ad(request, doc, doc.ad, login, change_description)
|
||||
|
||||
# send announcement
|
||||
|
||||
|
@ -1082,15 +734,12 @@ def approve_ballotREDESIGN(request, name):
|
|||
announcement=announcement),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
approve_ballot = approve_ballotREDESIGN
|
||||
|
||||
|
||||
class MakeLastCallForm(forms.Form):
|
||||
last_call_sent_date = forms.DateField(required=True)
|
||||
last_call_expiration_date = forms.DateField(required=True)
|
||||
|
||||
@group_required('Secretariat')
|
||||
@role_required('Secretariat')
|
||||
def make_last_call(request, name):
|
||||
"""Make last call for Internet Draft, sending out announcement."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
|
@ -1145,7 +794,7 @@ def make_last_call(request, name):
|
|||
doc.save()
|
||||
|
||||
email_state_changed(request, doc, change_description)
|
||||
email_owner(request, doc, doc.ad, login, change_description)
|
||||
email_ad(request, doc, doc.ad, login, change_description)
|
||||
|
||||
e = LastCallDocEvent(doc=doc, by=login)
|
||||
e.type = "sent_last_call"
|
||||
|
@ -1168,18 +817,18 @@ def make_last_call(request, name):
|
|||
return HttpResponseRedirect(doc.get_absolute_url())
|
||||
else:
|
||||
initial = {}
|
||||
initial["last_call_sent_date"] = date.today()
|
||||
initial["last_call_sent_date"] = datetime.date.today()
|
||||
if doc.type.slug == 'draft':
|
||||
# This logic is repeated in the code that edits last call text - why?
|
||||
expire_days = 14
|
||||
if doc.group.type_id in ("individ", "area"):
|
||||
expire_days = 28
|
||||
templ = 'idrfc/make_last_callREDESIGN.html'
|
||||
templ = 'idrfc/make_last_call.html'
|
||||
else:
|
||||
expire_days=28
|
||||
templ = 'doc/status_change/make_last_call.html'
|
||||
|
||||
initial["last_call_expiration_date"] = date.today() + timedelta(days=expire_days)
|
||||
initial["last_call_expiration_date"] = datetime.date.today() + datetime.timedelta(days=expire_days)
|
||||
|
||||
form = MakeLastCallForm(initial=initial)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# changing state and metadata and commenting on Internet Drafts for
|
||||
# Area Directors and Secretariat
|
||||
|
||||
import re, os
|
||||
from datetime import datetime, date, time, timedelta
|
||||
import re, os, datetime
|
||||
|
||||
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden, Http404
|
||||
from django.shortcuts import render_to_response, get_object_or_404
|
||||
from django.core.urlresolvers import reverse as urlreverse
|
||||
|
@ -16,11 +16,9 @@ from django.forms.util import ErrorList
|
|||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
from ietf.utils.mail import send_mail_text, send_mail_message
|
||||
from ietf.ietfauth.decorators import group_required, has_role, role_required
|
||||
from ietf.ietfauth.decorators import has_role, role_required
|
||||
from ietf.ietfauth.utils import user_is_person
|
||||
from ietf.idtracker.templatetags.ietf_filters import in_group
|
||||
from ietf.idtracker.models import *
|
||||
from ietf.iesg.models import *
|
||||
from ietf.iesg.models import TelechatDate
|
||||
from ietf.idrfc.mails import *
|
||||
from ietf.idrfc.utils import *
|
||||
from ietf.idrfc.lastcall import request_last_call
|
||||
|
@ -41,13 +39,6 @@ from ietf.message.models import Message
|
|||
from ietf.idrfc.utils import log_state_changed
|
||||
|
||||
class ChangeStateForm(forms.Form):
|
||||
pass
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def change_state(request, name):
|
||||
pass
|
||||
|
||||
class ChangeStateFormREDESIGN(forms.Form):
|
||||
state = forms.ModelChoiceField(State.objects.filter(used=True, type="draft-iesg"), empty_label=None, required=True)
|
||||
substate = forms.ModelChoiceField(DocTagName.objects.filter(slug__in=IESG_SUBSTATE_TAGS), required=False)
|
||||
comment = forms.CharField(widget=forms.Textarea, required=False)
|
||||
|
@ -69,8 +60,8 @@ class ChangeStateFormREDESIGN(forms.Form):
|
|||
self._errors['comment'] = ErrorList([u'State not changed. Comments entered will be lost with no state change. Please go back and use the Add Comment feature on the history tab to add comments without changing state.'])
|
||||
return retclean
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def change_stateREDESIGN(request, name):
|
||||
@role_required('Area Director','Secretariat')
|
||||
def change_state(request, name):
|
||||
"""Change state of Internet Draft, notifying parties as necessary
|
||||
and logging the change as a comment."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
|
@ -120,7 +111,7 @@ def change_stateREDESIGN(request, name):
|
|||
doc.save()
|
||||
|
||||
email_state_changed(request, doc, e.desc)
|
||||
email_owner(request, doc, doc.ad, login, e.desc)
|
||||
email_ad(request, doc, doc.ad, login, e.desc)
|
||||
|
||||
|
||||
if prev_state and prev_state.slug in ("ann", "rfcqueue") and next_state.slug not in ("rfcqueue", "pub"):
|
||||
|
@ -161,7 +152,7 @@ def change_stateREDESIGN(request, name):
|
|||
to_iesg_eval = State.objects.get(used=True, type="draft-iesg", slug="iesg-eva")
|
||||
next_states = next_states.exclude(slug="iesg-eva")
|
||||
|
||||
return render_to_response('idrfc/change_stateREDESIGN.html',
|
||||
return render_to_response('idrfc/change_state.html',
|
||||
dict(form=form,
|
||||
doc=doc,
|
||||
state=state,
|
||||
|
@ -170,10 +161,6 @@ def change_stateREDESIGN(request, name):
|
|||
to_iesg_eval=to_iesg_eval),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
change_state = change_stateREDESIGN
|
||||
ChangeStateForm = ChangeStateFormREDESIGN
|
||||
|
||||
class ChangeIanaStateForm(forms.Form):
|
||||
state = forms.ModelChoiceField(State.objects.all(), required=False)
|
||||
|
||||
|
@ -327,7 +314,7 @@ def change_intention(request, name):
|
|||
doc.time = e.time
|
||||
doc.save()
|
||||
|
||||
email_owner(request, doc, doc.ad, login, email_desc)
|
||||
email_ad(request, doc, doc.ad, login, email_desc)
|
||||
|
||||
return HttpResponseRedirect(doc.get_absolute_url())
|
||||
|
||||
|
@ -341,39 +328,7 @@ def change_intention(request, name):
|
|||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
def dehtmlify_textarea_text(s):
|
||||
return s.replace("<br>", "\n").replace("<b>", "").replace("</b>", "").replace(" ", " ")
|
||||
|
||||
class EditInfoForm(forms.Form):
|
||||
pass
|
||||
|
||||
def get_initial_state_change_notice(doc):
|
||||
# set change state notice to something sensible
|
||||
receivers = []
|
||||
if doc.group_id == Acronym.INDIVIDUAL_SUBMITTER:
|
||||
for a in doc.authors.all():
|
||||
# maybe it would be more appropriate to use a.email() ?
|
||||
e = a.person.email()[1]
|
||||
if e:
|
||||
receivers.append(e)
|
||||
else:
|
||||
receivers.append("%s-chairs@%s" % (doc.group.acronym, settings.TOOLS_SERVER))
|
||||
for editor in doc.group.ietfwg.wgeditor_set.all():
|
||||
e = editor.person.email()[1]
|
||||
if e:
|
||||
receivers.append(e)
|
||||
|
||||
receivers.append("%s@%s" % (doc.filename, settings.TOOLS_SERVER))
|
||||
return ", ".join(receivers)
|
||||
|
||||
def get_new_ballot_id():
|
||||
return IDInternal.objects.aggregate(Max('ballot'))['ballot__max'] + 1
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def edit_info(request, name):
|
||||
pass
|
||||
|
||||
class EditInfoFormREDESIGN(forms.Form):
|
||||
intended_std_level = forms.ModelChoiceField(IntendedStdLevelName.objects.filter(used=True), empty_label="(None)", required=True, label="Intended RFC status")
|
||||
area = forms.ModelChoiceField(Group.objects.filter(type="area", state="active"), empty_label="(None - individual submission)", required=False, label="Assigned to area")
|
||||
ad = forms.ModelChoiceField(Person.objects.filter(role__name="ad", role__group__state="active").order_by('name'), label="Responsible AD", empty_label="(None)", required=True)
|
||||
|
@ -421,8 +376,8 @@ def get_initial_notify(doc):
|
|||
receivers.append("%s@%s" % (doc.name, settings.TOOLS_SERVER))
|
||||
return ", ".join(receivers)
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def edit_infoREDESIGN(request, name):
|
||||
@role_required('Area Director','Secretariat')
|
||||
def edit_info(request, name):
|
||||
"""Edit various Internet Draft attributes, notifying parties as
|
||||
necessary and logging changes as document events."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
|
@ -530,7 +485,7 @@ def edit_infoREDESIGN(request, name):
|
|||
doc.time = datetime.datetime.now()
|
||||
|
||||
if changes and not new_document:
|
||||
email_owner(request, doc, orig_ad, login, "\n".join(changes))
|
||||
email_ad(request, doc, orig_ad, login, "\n".join(changes))
|
||||
|
||||
doc.save()
|
||||
return HttpResponseRedirect(doc.get_absolute_url())
|
||||
|
@ -552,7 +507,7 @@ def edit_infoREDESIGN(request, name):
|
|||
if doc.group.type_id not in ("individ", "area"):
|
||||
form.standard_fields = [x for x in form.standard_fields if x.name != "area"]
|
||||
|
||||
return render_to_response('idrfc/edit_infoREDESIGN.html',
|
||||
return render_to_response('idrfc/edit_info.html',
|
||||
dict(doc=doc,
|
||||
form=form,
|
||||
user=request.user,
|
||||
|
@ -560,37 +515,8 @@ def edit_infoREDESIGN(request, name):
|
|||
ballot_issued=doc.latest_event(type="sent_ballot_announcement")),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
EditInfoForm = EditInfoFormREDESIGN
|
||||
edit_info = edit_infoREDESIGN
|
||||
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
@role_required('Area Director','Secretariat')
|
||||
def request_resurrect(request, name):
|
||||
"""Request resurrect of expired Internet Draft."""
|
||||
doc = get_object_or_404(InternetDraft, filename=name)
|
||||
if doc.status.status != "Expired":
|
||||
raise Http404()
|
||||
|
||||
if not doc.idinternal:
|
||||
doc.idinternal = IDInternal(draft=doc, rfc_flag=type(doc) == Rfc)
|
||||
|
||||
login = IESGLogin.objects.get(login_name=request.user.username)
|
||||
|
||||
if request.method == 'POST':
|
||||
email_resurrect_requested(request, doc, login)
|
||||
add_document_comment(request, doc, "Resurrection was requested")
|
||||
doc.idinternal.resurrect_requested_by = login
|
||||
doc.idinternal.save()
|
||||
return HttpResponseRedirect(doc.idinternal.get_absolute_url())
|
||||
|
||||
return render_to_response('idrfc/request_resurrect.html',
|
||||
dict(doc=doc,
|
||||
back_url=doc.idinternal.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
def request_resurrectREDESIGN(request, name):
|
||||
"""Request resurrect of expired Internet Draft."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
if doc.get_state_slug() != "expired":
|
||||
|
@ -613,39 +539,8 @@ def request_resurrectREDESIGN(request, name):
|
|||
back_url=doc.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
request_resurrect = request_resurrectREDESIGN
|
||||
|
||||
@group_required('Secretariat')
|
||||
@role_required('Secretariat')
|
||||
def resurrect(request, name):
|
||||
"""Resurrect expired Internet Draft."""
|
||||
doc = get_object_or_404(InternetDraft, filename=name)
|
||||
if doc.status.status != "Expired":
|
||||
raise Http404()
|
||||
|
||||
if not doc.idinternal:
|
||||
doc.idinternal = IDInternal(draft=doc, rfc_flag=type(doc) == Rfc)
|
||||
|
||||
login = IESGLogin.objects.get(login_name=request.user.username)
|
||||
|
||||
if request.method == 'POST':
|
||||
if doc.idinternal.resurrect_requested_by:
|
||||
email_resurrection_completed(request, doc)
|
||||
add_document_comment(request, doc, "Resurrection was completed")
|
||||
doc.idinternal.resurrect_requested_by = None
|
||||
doc.idinternal.event_date = date.today()
|
||||
doc.idinternal.save()
|
||||
doc.status = IDStatus.objects.get(status="Active")
|
||||
doc.save()
|
||||
return HttpResponseRedirect(doc.idinternal.get_absolute_url())
|
||||
|
||||
return render_to_response('idrfc/resurrect.html',
|
||||
dict(doc=doc,
|
||||
back_url=doc.idinternal.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
@group_required('Secretariat')
|
||||
def resurrectREDESIGN(request, name):
|
||||
"""Resurrect expired Internet Draft."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
if doc.get_state_slug() != "expired":
|
||||
|
@ -676,41 +571,11 @@ def resurrectREDESIGN(request, name):
|
|||
back_url=doc.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
resurrect = resurrectREDESIGN
|
||||
|
||||
|
||||
class AddCommentForm(forms.Form):
|
||||
comment = forms.CharField(required=True, widget=forms.Textarea)
|
||||
|
||||
@group_required('Area_Director','Secretariat', 'IANA')
|
||||
@role_required('Area Director', 'Secretariat', 'IANA', 'RFC Editor')
|
||||
def add_comment(request, name):
|
||||
"""Add comment to Internet Draft."""
|
||||
doc = get_object_or_404(InternetDraft, filename=name)
|
||||
if not doc.idinternal:
|
||||
raise Http404()
|
||||
|
||||
login = IESGLogin.objects.get(login_name=request.user.username)
|
||||
|
||||
if request.method == 'POST':
|
||||
form = AddCommentForm(request.POST)
|
||||
if form.is_valid():
|
||||
c = form.cleaned_data['comment']
|
||||
add_document_comment(request, doc, c)
|
||||
email_owner(request, doc, doc.idinternal.job_owner, login,
|
||||
"A new comment added by %s" % login)
|
||||
return HttpResponseRedirect(doc.idinternal.get_absolute_url())
|
||||
else:
|
||||
form = AddCommentForm()
|
||||
|
||||
return render_to_response('idrfc/add_comment.html',
|
||||
dict(doc=doc,
|
||||
form=form,
|
||||
back_url=doc.idinternal.get_absolute_url()),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
@group_required('Area_Director', 'Secretariat', 'IANA', 'RFC Editor')
|
||||
def add_commentREDESIGN(request, name):
|
||||
"""Add comment to history of document."""
|
||||
doc = get_object_or_404(Document, docalias__name=name)
|
||||
|
||||
|
@ -727,7 +592,7 @@ def add_commentREDESIGN(request, name):
|
|||
e.save()
|
||||
|
||||
if doc.type_id == "draft":
|
||||
email_owner(request, doc, doc.ad, login,
|
||||
email_ad(request, doc, doc.ad, login,
|
||||
"A new comment added by %s" % login.name)
|
||||
return HttpResponseRedirect(urlreverse("doc_history", kwargs=dict(name=doc.name)))
|
||||
else:
|
||||
|
@ -738,14 +603,11 @@ def add_commentREDESIGN(request, name):
|
|||
form=form),
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
add_comment = add_commentREDESIGN
|
||||
|
||||
class NotifyForm(forms.Form):
|
||||
notify = forms.CharField(max_length=255, label="Notice emails", help_text="Separate email addresses with commas", required=False)
|
||||
|
||||
|
||||
@group_required('Area_Director','Secretariat')
|
||||
@role_required('Area Director', 'Secretariat')
|
||||
def edit_notices(request, name):
|
||||
"""Change the set of email addresses document change notificaitions go to."""
|
||||
|
||||
|
@ -802,7 +664,7 @@ class TelechatForm(forms.Form):
|
|||
self.fields['telechat_date'].choices = [("", "(not on agenda)")] + [(d, d.strftime("%Y-%m-%d")) for d in dates]
|
||||
|
||||
|
||||
@group_required("Area Director", "Secretariat")
|
||||
@role_required("Area Director", "Secretariat")
|
||||
def telechat_date(request, name):
|
||||
doc = get_object_or_404(Document, type="draft", name=name)
|
||||
login = request.user.get_profile()
|
||||
|
@ -838,7 +700,7 @@ class IESGNoteForm(forms.Form):
|
|||
# that has caused a lot of pain in the past.
|
||||
return self.cleaned_data['note'].replace('\r', '').strip()
|
||||
|
||||
@group_required("Area Director", "Secretariat")
|
||||
@role_required("Area Director", "Secretariat")
|
||||
def edit_iesg_note(request, name):
|
||||
doc = get_object_or_404(Document, type="draft", name=name)
|
||||
login = request.user.get_profile()
|
||||
|
@ -1011,7 +873,7 @@ class AdForm(forms.Form):
|
|||
if ad_pk and ad_pk not in [pk for pk, name in choices]:
|
||||
self.fields['ad'].choices = list(choices) + [("", "-------"), (ad_pk, Person.objects.get(pk=ad_pk).plain_name())]
|
||||
|
||||
@group_required("Area Director", "Secretariat")
|
||||
@role_required("Area Director", "Secretariat")
|
||||
def edit_ad(request, name):
|
||||
"""Change the shepherding Area Director for this draft."""
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ from django.conf import settings
|
|||
|
||||
from pyquery import PyQuery
|
||||
|
||||
from ietf.idrfc.models import RfcIndex
|
||||
from ietf.idtracker.models import *
|
||||
from ietf.iesg.models import *
|
||||
from ietf.utils.test_utils import SimpleUrlTestCase, RealDatabaseTest, canonicalize_feed, login_testing_unauthorized
|
||||
|
|
|
@ -49,7 +49,6 @@ from django.utils import simplejson as json
|
|||
from django import forms
|
||||
from ietf.iesg.models import TelechatDates, TelechatAgendaItem, WGAction
|
||||
from ietf.idrfc.idrfc_wrapper import IdWrapper, RfcWrapper
|
||||
from ietf.idrfc.models import RfcIndex
|
||||
from ietf.idrfc.utils import update_telechat
|
||||
from ietf.ietfauth.decorators import group_required, role_required
|
||||
from ietf.idtracker.templatetags.ietf_filters import in_group
|
||||
|
@ -603,61 +602,27 @@ def telechat_docs_tarfile(request,year,month,day):
|
|||
return response
|
||||
|
||||
def discusses(request):
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
res = []
|
||||
|
||||
for d in IDInternal.objects.filter(states__type="draft-iesg", states__slug__in=("pub-req", "ad-eval", "review-e", "lc-req", "lc", "writeupw", "goaheadw", "iesg-eva", "defer", "watching"), docevent__ballotpositiondocevent__pos="discuss").distinct():
|
||||
found = False
|
||||
for p in d.positions.all():
|
||||
if p.discuss:
|
||||
found = True
|
||||
break
|
||||
|
||||
if not found:
|
||||
continue
|
||||
|
||||
if d.rfc_flag:
|
||||
doc = RfcWrapper(d)
|
||||
else:
|
||||
doc = IdWrapper(draft=d)
|
||||
|
||||
if doc.in_ietf_process() and doc.ietf_process.has_active_iesg_ballot():
|
||||
res.append(doc)
|
||||
|
||||
return direct_to_template(request, 'iesg/discusses.html', {'docs':res})
|
||||
|
||||
positions = Position.objects.filter(discuss=1)
|
||||
res = []
|
||||
try:
|
||||
ids = set()
|
||||
except NameError:
|
||||
# for Python 2.3
|
||||
from sets import Set as set
|
||||
ids = set()
|
||||
|
||||
for p in positions:
|
||||
try:
|
||||
draft = p.ballot.drafts.filter(primary_flag=1)
|
||||
if len(draft) > 0 and draft[0].rfc_flag:
|
||||
if not -draft[0].draft_id in ids:
|
||||
ids.add(-draft[0].draft_id)
|
||||
try:
|
||||
ri = RfcIndex.objects.get(rfc_number=draft[0].draft_id)
|
||||
doc = RfcWrapper(ri)
|
||||
if doc.in_ietf_process() and doc.ietf_process.has_active_iesg_ballot():
|
||||
res.append(doc)
|
||||
except RfcIndex.DoesNotExist:
|
||||
# NOT QUITE RIGHT, although this should never happen
|
||||
pass
|
||||
if len(draft) > 0 and not draft[0].rfc_flag and draft[0].draft.id_document_tag not in ids:
|
||||
ids.add(draft[0].draft.id_document_tag)
|
||||
doc = IdWrapper(draft=draft[0])
|
||||
if doc.in_ietf_process() and doc.ietf_process.has_active_iesg_ballot():
|
||||
res.append(doc)
|
||||
except IDInternal.DoesNotExist:
|
||||
pass
|
||||
return direct_to_template(request, 'iesg/discusses.html', {'docs':res})
|
||||
|
||||
for d in IDInternal.objects.filter(states__type="draft-iesg", states__slug__in=("pub-req", "ad-eval", "review-e", "lc-req", "lc", "writeupw", "goaheadw", "iesg-eva", "defer", "watching"), docevent__ballotpositiondocevent__pos="discuss").distinct():
|
||||
found = False
|
||||
for p in d.positions.all():
|
||||
if p.discuss:
|
||||
found = True
|
||||
break
|
||||
|
||||
if not found:
|
||||
continue
|
||||
|
||||
if d.rfc_flag:
|
||||
doc = RfcWrapper(d)
|
||||
else:
|
||||
doc = IdWrapper(draft=d)
|
||||
|
||||
if doc.in_ietf_process() and doc.ietf_process.has_active_iesg_ballot():
|
||||
res.append(doc)
|
||||
|
||||
return direct_to_template(request, 'iesg/discusses.html', {'docs':res})
|
||||
|
||||
@role_required('Area Director', 'Secretariat')
|
||||
def milestones_needing_review(request):
|
||||
|
|
|
@ -14,7 +14,7 @@ from ietf.group.models import Group
|
|||
from ietf.name.models import BallotPositionName
|
||||
from ietf.person.models import Person
|
||||
from ietf.idrfc.lastcall import request_last_call
|
||||
from ietf.idrfc.mails import email_owner, email_state_changed
|
||||
from ietf.idrfc.mails import email_ad, email_state_changed
|
||||
from ietf.idrfc.utils import add_document_comment
|
||||
from ietf.iesg.models import TelechatDate, TelechatAgendaItem, WGAction
|
||||
from ietf.iesg.views import _agenda_data
|
||||
|
@ -291,7 +291,7 @@ def doc_detail(request, date, name):
|
|||
doc.save()
|
||||
|
||||
email_state_changed(request, doc, e.desc)
|
||||
email_owner(request, doc, doc.ad, login, e.desc)
|
||||
email_ad(request, doc, doc.ad, login, e.desc)
|
||||
|
||||
if state.slug == "lc-req":
|
||||
request_last_call(request, doc)
|
||||
|
|
|
@ -6,7 +6,7 @@ from django.conf import settings
|
|||
from ietf.doc.models import *
|
||||
from ietf.doc.utils import add_state_change_event
|
||||
from ietf.person.models import *
|
||||
from ietf.idrfc.mails import email_owner, email_state_changed, email_authors
|
||||
from ietf.idrfc.mails import email_ad, email_state_changed, email_authors
|
||||
from ietf.utils.timezone import *
|
||||
|
||||
#PROTOCOLS_URL = "http://www.iana.org/protocols/"
|
||||
|
@ -200,7 +200,7 @@ def update_history_with_changes(changes, send_email=True):
|
|||
|
||||
if send_email and (state != prev_state):
|
||||
email_state_changed(None, doc, "IANA %s state changed to %s" % (kind, state.name))
|
||||
email_owner(None, doc, doc.ad, system, "IANA %s state changed to %s" % (kind, state.name))
|
||||
email_ad(None, doc, doc.ad, system, "IANA %s state changed to %s" % (kind, state.name))
|
||||
|
||||
if doc.time < timestamp:
|
||||
doc.time = timestamp
|
||||
|
|
|
@ -32,9 +32,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
{% endcomment %}
|
||||
{% for area in areas %}
|
||||
{% if area.area.active_wgs %}
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel">{{area.short_name }}</a><div id="wgs-{{area.area.area_acronym}}" class="yuimenu"><div class="bd"><ul>{% for wg in area.area.active_wgs %}
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="/wg/{{wg.group_acronym}}/">{{wg.group_acronym}} — {{wg.group_acronym.name}}</a></li>{% endfor %}
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel">{{ area.short_area_name }}</a><div id="wgs-{{ area.acronym }}" class="yuimenu"><div class="bd"><ul>{% for g in area.active_groups %}
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="/wg/{{ g.acronym }}/">{{ g.acronym }} — {{ g.name}}</a></li>{% endfor %}
|
||||
</ul></div></div></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
|
@ -24,9 +24,9 @@ form #id_ballot_writeup {
|
|||
{{ ballot_writeup_form.ballot_writeup }}
|
||||
|
||||
<div class="actions">
|
||||
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
|
||||
<a href="{{ back_url }}">Back</a>
|
||||
<input type="submit" name="save_ballot_writeup" value="Save Ballot Writeup" />
|
||||
<input style="margin-left: 8px" type="submit" name="issue_ballot" value="Save and {% if ballot.ballot_issued %}Re-{% endif %}Issue Ballot" />
|
||||
<input style="margin-left: 8px" type="submit" name="issue_ballot" value="Save and {% if ballot_issued %}Re-{% endif %}Issue Ballot" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Ballot writeup and notes for {{ doc }}{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
form #id_ballot_writeup {
|
||||
width: 700px;
|
||||
height: 600px;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Ballot writeup and notes for {{ doc }}</h1>
|
||||
|
||||
|
||||
<form action="" method="POST">
|
||||
|
||||
<p>(Technical Summary, Working Group Summary, Document Quality,
|
||||
Personnel, RFC Editor Note, IRTF Note, IESG Note, IANA Note)</p>
|
||||
|
||||
<p>This text will be appended to all announcements and messages to
|
||||
the IRTF or RFC Editor.</p>
|
||||
|
||||
{{ ballot_writeup_form.ballot_writeup }}
|
||||
|
||||
<div class="actions">
|
||||
<a href="{{ back_url }}">Back</a>
|
||||
<input type="submit" name="save_ballot_writeup" value="Save Ballot Writeup" />
|
||||
<input style="margin-left: 8px" type="submit" name="issue_ballot" value="Save and {% if ballot_issued %}Re-{% endif %}Issue Ballot" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock%}
|
|
@ -3,19 +3,17 @@
|
|||
{% block title %}Change state of {{ doc }}{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
form.change-state select {
|
||||
width: 22em;
|
||||
}
|
||||
form.change-state select { width: 22em; }
|
||||
form.change-state #id_comment { width: 30em; }
|
||||
form.change-state .cancel-pub-note { width: 30em; color: #a00; }
|
||||
form.change-state .actions {
|
||||
text-align: right;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.warn-states,
|
||||
.next-states,
|
||||
.prev-state {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.warn-states form,
|
||||
.next-states form,
|
||||
.prev-state form {
|
||||
display: inline;
|
||||
|
@ -26,14 +24,22 @@ form.change-state .actions {
|
|||
{% block content %}
|
||||
<h1>Change state of {{ doc }}</h1>
|
||||
|
||||
<p class="helptext">For help on the states, see the <a href="{% url help_states %}">state table</a>.</p>
|
||||
<p class="helptext">For help on the states, see the <a href="{% url state_help type="draft-iesg" %}">state table</a>.</p>
|
||||
|
||||
<form class="change-state" action="" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
{% if state and state.slug == "rfcqueue" %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="cancel-pub-note">Note: if you pull the draft out of the
|
||||
{{ state.name }} state, the RFC Editor and IANA will be notified
|
||||
by email with this comment so they can update their queues.</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="2" class="actions">
|
||||
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
|
||||
<a href="{{ doc.get_absolute_url }}">Back</a>
|
||||
<input type="submit" value="Save"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -46,9 +52,8 @@ form.change-state .actions {
|
|||
<div class="next-states">
|
||||
{% for n in next_states %}
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="state" value="{{ n.next_state.document_state_id }}" />
|
||||
<input type="hidden" name="substate" value="" />
|
||||
<input type="submit" value="{{ n.next_state.state }}" />
|
||||
<input type="hidden" name="state" value="{{ n.pk }}" />
|
||||
<input type="submit" value="{{ n.name }}" />
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -58,24 +63,24 @@ form.change-state .actions {
|
|||
<h3>You could also jump directly to</h3>
|
||||
<div class="warn-states">
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="state" value="{{ to_iesg_eval.next_state.document_state_id }}" />
|
||||
<input type="hidden" name="substate" value="" />
|
||||
<input type="submit" value="{{ to_iesg_eval.next_state.state }}" />
|
||||
<input type="hidden" name="state" value="{{ to_iesg_eval.pk }}" />
|
||||
<input type="submit" value="{{ to_iesg_eval.name }}" />
|
||||
</form>
|
||||
<p>
|
||||
But the ballot for this document has not yet been issued.
|
||||
<a href="{% url doc_ballot_writeupnotes name=doc.filename %}">Edit Ballot Text</a>
|
||||
<a href="{% url doc_ballot_writeupnotes name=doc.name %}">Edit Ballot Text</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if prev_state %}
|
||||
<h3>Or revert to previous state</h3>
|
||||
|
||||
<div class="prev-state">
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="state" value="{{ doc.idinternal.prev_state_id }}" />
|
||||
<input type="hidden" name="substate" value="{{ doc.idinternal.prev_sub_state_id|default_if_none:"" }}" />
|
||||
<input type="submit" value="Back to {{ prev_state_formatted }}" />
|
||||
<input type="hidden" name="state" value="{{ prev_state.pk }}" />
|
||||
<input type="submit" value="Back to {{ prev_state.name }}" />
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Change state of {{ doc }}{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
form.change-state select { width: 22em; }
|
||||
form.change-state #id_comment { width: 30em; }
|
||||
form.change-state .cancel-pub-note { width: 30em; color: #a00; }
|
||||
form.change-state .actions {
|
||||
text-align: right;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.next-states,
|
||||
.prev-state {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.next-states form,
|
||||
.prev-state form {
|
||||
display: inline;
|
||||
margin-right: 10px;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Change state of {{ doc }}</h1>
|
||||
|
||||
<p class="helptext">For help on the states, see the <a href="{% url state_help type="draft-iesg" %}">state table</a>.</p>
|
||||
|
||||
<form class="change-state" action="" method="post">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
{% if state and state.slug == "rfcqueue" %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="cancel-pub-note">Note: if you pull the draft out of the
|
||||
{{ state.name }} state, the RFC Editor and IANA will be notified
|
||||
by email with this comment so they can update their queues.</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="2" class="actions">
|
||||
<a href="{{ doc.get_absolute_url }}">Back</a>
|
||||
<input type="submit" value="Save"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
{% if next_states %}
|
||||
<h3>Or jump directly to</h3>
|
||||
|
||||
<div class="next-states">
|
||||
{% for n in next_states %}
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="state" value="{{ n.pk }}" />
|
||||
<input type="submit" value="{{ n.name }}" />
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if to_iesg_eval %}
|
||||
<h3>You could also jump directly to</h3>
|
||||
<div class="warn-states">
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="state" value="{{ to_iesg_eval.pk }}" />
|
||||
<input type="submit" value="{{ to_iesg_eval.name }}" />
|
||||
</form>
|
||||
<p>
|
||||
But the ballot for this document has not yet been issued.
|
||||
<a href="{% url doc_ballot_writeupnotes name=doc.name %}">Edit Ballot Text</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if prev_state %}
|
||||
<h3>Or revert to previous state</h3>
|
||||
|
||||
<div class="prev-state">
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="state" value="{{ prev_state.pk }}" />
|
||||
<input type="submit" value="Back to {{ prev_state.name }}" />
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -3,17 +3,15 @@
|
|||
{% block title %}Edit info on {{ doc }}{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
|
||||
function make_bold()
|
||||
{
|
||||
var e = document.getElementById("ballotwarn");
|
||||
e.setAttribute("class","warning");
|
||||
}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
form.edit-info #id_state_change_notice_to {
|
||||
form.edit-info #id_notify {
|
||||
width: 600px;
|
||||
}
|
||||
form.edit-info #id_note {
|
||||
|
@ -24,8 +22,8 @@ form.edit-info .actions {
|
|||
padding-top: 20px;
|
||||
}
|
||||
.warning {
|
||||
font-weight:bold;
|
||||
color:red;
|
||||
font-weight: bold;
|
||||
color: #a00;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -41,13 +39,13 @@ form.edit-info .actions {
|
|||
<td>{{ field }}
|
||||
{% ifequal field.name "telechat_date" %}
|
||||
{% if not ballot_issued %}
|
||||
<span id="ballotwarn"> A ballot for this document has not been issued: <a href="{% url doc_ballot_writeupnotes name=doc.filename %}">Edit Ballot Text</a></span>
|
||||
<span id="ballotwarn"> A ballot for this document has not been issued: <a href="{% url doc_ballot_writeupnotes name=doc.name %}">Edit Ballot Text</a></span>
|
||||
{% endif %}
|
||||
{{ form.returning_item }} {{ form.returning_item.label_tag }} {{ form.returning_item.errors }}
|
||||
{% endifequal %}
|
||||
{% ifequal field.name "job_owner" %}
|
||||
{% ifequal field.name "ad" %}
|
||||
{% if user|in_group:"Area_Director" %}
|
||||
<label><input type="checkbox" name="job_owner" value="{{ login.id }}" /> Assign to me</label>
|
||||
<label><input type="checkbox" name="ad" value="{{ login.pk }}" /> Assign to me</label>
|
||||
{% endif %}
|
||||
{% endifequal %}
|
||||
{% if field.help_text %}<div class="help">{{ field.help_text }}</div>{% endif %}
|
||||
|
@ -57,7 +55,7 @@ form.edit-info .actions {
|
|||
<tr>
|
||||
<td></td>
|
||||
<td class="actions">
|
||||
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
|
||||
<a href="{{ doc.get_absolute_url }}">Back</a>
|
||||
<input type="submit" value="Save"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Edit info on {{ doc }}{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
function make_bold()
|
||||
{
|
||||
var e = document.getElementById("ballotwarn");
|
||||
e.setAttribute("class","warning");
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
form.edit-info #id_notify {
|
||||
width: 600px;
|
||||
}
|
||||
form.edit-info #id_note {
|
||||
width: 600px;
|
||||
height: 150px;
|
||||
}
|
||||
form.edit-info .actions {
|
||||
padding-top: 20px;
|
||||
}
|
||||
.warning {
|
||||
font-weight: bold;
|
||||
color: #a00;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% load ietf_filters %}
|
||||
<h1>Edit info on {{ doc }}</h1>
|
||||
|
||||
<form class="edit-info" action="" method="POST">
|
||||
<table>
|
||||
{% for field in form.standard_fields %}
|
||||
<tr>
|
||||
<th>{{ field.label_tag }}:</th>
|
||||
<td>{{ field }}
|
||||
{% ifequal field.name "telechat_date" %}
|
||||
{% if not ballot_issued %}
|
||||
<span id="ballotwarn"> A ballot for this document has not been issued: <a href="{% url doc_ballot_writeupnotes name=doc.name %}">Edit Ballot Text</a></span>
|
||||
{% endif %}
|
||||
{{ form.returning_item }} {{ form.returning_item.label_tag }} {{ form.returning_item.errors }}
|
||||
{% endifequal %}
|
||||
{% ifequal field.name "ad" %}
|
||||
{% if user|in_group:"Area_Director" %}
|
||||
<label><input type="checkbox" name="ad" value="{{ login.pk }}" /> Assign to me</label>
|
||||
{% endif %}
|
||||
{% endifequal %}
|
||||
{% if field.help_text %}<div class="help">{{ field.help_text }}</div>{% endif %}
|
||||
{{ field.errors }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="actions">
|
||||
<a href="{{ doc.get_absolute_url }}">Back</a>
|
||||
<input type="submit" value="Save"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -1,8 +1,12 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Change position for {{ ad }} on {{ doc }}{% endblock %}
|
||||
{% block title %}Change position for {{ ad.plain_name }} on {{ doc }}{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
div.ballot-deferred {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
form.position-form .position ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
@ -18,60 +22,71 @@ form.position-form .last-edited {
|
|||
form.position-form .discuss-text {
|
||||
padding-top: 20px
|
||||
}
|
||||
form.position-form #id_discuss_text,
|
||||
form.position-form #id_comment_text {
|
||||
form.position-form #id_discuss,
|
||||
form.position-form #id_comment {
|
||||
width: 700px;
|
||||
height: 250px;
|
||||
}
|
||||
form.position-form .comment-text {
|
||||
margin-top: 20px;
|
||||
}
|
||||
div.question {
|
||||
font-size: 173%;
|
||||
padding-left: 5px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Change position for {{ ad }} on {{ doc }}</h1>
|
||||
<h1>Change position for {{ ad.plain_name }} on {{ doc }}</h1>
|
||||
|
||||
{% if ballot.was_deferred %}
|
||||
<div style="margin-top:8px; margin-bottom:8px;">Ballot deferred by {{ ballot.deferred_by }} on {{ ballot.deferred_date }}.</div>
|
||||
{% endif %}
|
||||
<div class="question">{{ ballot.ballot_type.question }}</div>
|
||||
|
||||
{% if ballot_deferred %}
|
||||
<div class="ballot-deferred">Ballot deferred by {{ ballot_deferred.by }} on {{ ballot_deferred.time|date:"Y-m-d" }}.</div>
|
||||
{% endif %}
|
||||
|
||||
<form class="position-form" action="" method="POST">
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<span class="position">{{ form.position }}</span>
|
||||
<span class="actions">
|
||||
<input type="submit" name="send_mail" value="Save and send email"/>
|
||||
<input type="submit" value="Save"/>
|
||||
{% if ballot.was_deferred %}<input type="submit" name="Undefer" value="Undefer"/>{% else %}<input type="submit" name="Defer" value="Defer"/>{% endif %}
|
||||
{% if doc.type_id == "draft" or doc.type_id == "conflrev" %}
|
||||
{% if ballot_deferred %}<input type="submit" name="Undefer" value="Undefer"/>{% else %}<input type="submit" name="Defer" value="Defer"/>{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="clear:left"></div>
|
||||
|
||||
<div class="discuss-widgets">
|
||||
|
||||
<div class="discuss-widgets"{% if not show_discuss_text %} style="display:none"{% endif %}>
|
||||
<div class="discuss-text">
|
||||
{{ form.discuss_text.label_tag }}:
|
||||
{% if discuss %}<span class="last-edited">(last edited {{ discuss.date }})</span>{% endif %}
|
||||
{{ form.discuss.label_tag }}:
|
||||
{% if old_pos and old_pos.discuss_time %}<span class="last-edited">(last edited {{ old_pos.discuss_time }})</span>{% endif %}
|
||||
</div>
|
||||
{{ form.discuss_text.errors }}
|
||||
{{ form.discuss_text }}
|
||||
{{ form.discuss.errors }}
|
||||
{{ form.discuss }}
|
||||
</div>
|
||||
|
||||
<div class="comment-text">
|
||||
{{ form.comment_text.label_tag }}:
|
||||
{% if comment %}<span class="last-edited">(last edited {{ comment.date }}){% endif %}</span>
|
||||
{{ form.comment.label_tag }}:
|
||||
{% if old_pos and old_pos.comment_time %}<span class="last-edited">(last edited {{ old_pos.comment_time }}){% endif %}</span>
|
||||
</div>
|
||||
{{ form.comment_text }}
|
||||
{{ form.comment }}
|
||||
|
||||
<div class="actions">
|
||||
<a href="{{ return_to_url }}">Back</a>
|
||||
</div>
|
||||
|
||||
{{ form.return_to_url }}
|
||||
|
||||
{{ form.return_to_url }}
|
||||
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block content_end %}
|
||||
<script>
|
||||
var blockingPositions = {{ blocking_positions|safe }};
|
||||
</script>
|
||||
<script type="text/javascript" src="/js/doc-edit-position.js"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Change position for {{ ad.plain_name }} on {{ doc }}{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
div.ballot-deferred {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
form.position-form .position ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
form.position-form .position li {
|
||||
list-style-type: none;
|
||||
float: left;
|
||||
padding-right: 10px;
|
||||
}
|
||||
form.position-form .last-edited {
|
||||
font-style: italic;
|
||||
}
|
||||
form.position-form .discuss-text {
|
||||
padding-top: 20px
|
||||
}
|
||||
form.position-form #id_discuss,
|
||||
form.position-form #id_comment {
|
||||
width: 700px;
|
||||
height: 250px;
|
||||
}
|
||||
form.position-form .comment-text {
|
||||
margin-top: 20px;
|
||||
}
|
||||
div.question {
|
||||
font-size: 173%;
|
||||
padding-left: 5px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Change position for {{ ad.plain_name }} on {{ doc }}</h1>
|
||||
|
||||
<div class="question">{{ ballot.ballot_type.question }}</div>
|
||||
|
||||
{% if ballot_deferred %}
|
||||
<div class="ballot-deferred">Ballot deferred by {{ ballot_deferred.by }} on {{ ballot_deferred.time|date:"Y-m-d" }}.</div>
|
||||
{% endif %}
|
||||
|
||||
<form class="position-form" action="" method="POST">
|
||||
<div>
|
||||
<span class="position">{{ form.position }}</span>
|
||||
<span class="actions">
|
||||
<input type="submit" name="send_mail" value="Save and send email"/>
|
||||
<input type="submit" value="Save"/>
|
||||
{% if doc.type_id == "draft" or doc.type_id == "conflrev" %}
|
||||
{% if ballot_deferred %}<input type="submit" name="Undefer" value="Undefer"/>{% else %}<input type="submit" name="Defer" value="Defer"/>{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div style="clear:left"></div>
|
||||
|
||||
<div class="discuss-widgets"{% if not show_discuss_text %} style="display:none"{% endif %}>
|
||||
<div class="discuss-text">
|
||||
{{ form.discuss.label_tag }}:
|
||||
{% if old_pos and old_pos.discuss_time %}<span class="last-edited">(last edited {{ old_pos.discuss_time }})</span>{% endif %}
|
||||
</div>
|
||||
{{ form.discuss.errors }}
|
||||
{{ form.discuss }}
|
||||
</div>
|
||||
|
||||
<div class="comment-text">
|
||||
{{ form.comment.label_tag }}:
|
||||
{% if old_pos and old_pos.comment_time %}<span class="last-edited">(last edited {{ old_pos.comment_time }}){% endif %}</span>
|
||||
</div>
|
||||
{{ form.comment }}
|
||||
|
||||
<div class="actions">
|
||||
<a href="{{ return_to_url }}">Back</a>
|
||||
</div>
|
||||
|
||||
{{ form.return_to_url }}
|
||||
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block content_end %}
|
||||
<script>
|
||||
var blockingPositions = {{ blocking_positions|safe }};
|
||||
</script>
|
||||
<script type="text/javascript" src="/js/doc-edit-position.js"></script>
|
||||
{% endblock %}
|
|
@ -1,20 +1,20 @@
|
|||
{% autoescape off %}To: Internet Engineering Steering Group <iesg@ietf.org>
|
||||
{% load mail_filters %}{% autoescape off %}To: Internet Engineering Steering Group <iesg@ietf.org>
|
||||
From: IESG Secretary <iesg-secretary@ietf.org>
|
||||
Reply-To: IESG Secretary <iesg-secretary@ietf.org>
|
||||
Subject: Evaluation: {{ doc.file_tag }} to {{ status }}
|
||||
Subject: Evaluation: {{ doc.file_tag }} to {{ doc|std_level_prompt }}
|
||||
|
||||
{% filter wordwrap:73 %}Evaluation for {{ doc.file_tag }} can be found at {{ doc_url }}
|
||||
|
||||
{% if doc.lc_expiration_date %}Last call to expire on: {{ doc.lc_expiration_date }}
|
||||
{% if last_call_expires %}Last call to expire on: {{ last_call_expires }}
|
||||
|
||||
{% endif %}{% endfilter %}
|
||||
Please return the full line with your position.
|
||||
|
||||
Yes No-Objection Discuss Abstain
|
||||
{% for ad, fmt in active_ad_positions %}{{ fmt }}
|
||||
{% for fmt in active_ad_positions %}{{ fmt }}
|
||||
{% endfor %}{% if inactive_ad_positions %}
|
||||
|
||||
{% for ad, fmt in inactive_ad_positions %}{{ fmt }}
|
||||
{% for fmt in inactive_ad_positions %}{{ fmt }}
|
||||
{% endfor %}{% endif %}
|
||||
|
||||
"Yes" or "No-Objection" positions from 2/3 of non-recused ADs,
|
||||
|
@ -22,19 +22,19 @@ with no "Discuss" positions, are needed for approval.
|
|||
|
||||
DISCUSSES AND COMMENTS
|
||||
======================
|
||||
{% filter wordwrap:79 %}{% for ad, d, c in ad_feedback %}{{ ad }}:
|
||||
{% filter wordwrap:79 %}{% for pos in ad_feedback %}{{ pos.ad }}:
|
||||
|
||||
{% if d %}Discuss [{{ d.date }}]:
|
||||
{{ d.text }}
|
||||
{% if pos.discuss %}Discuss [{{ pos.discuss_time|date:"Y-m-d" }}]:
|
||||
{{ pos.discuss }}
|
||||
|
||||
{% endif %}{% if c %}Comment [{{ c.date }}]:
|
||||
{{ c.text }}
|
||||
{% endif %}{% if pos.comment %}Comment [{{ pos.comment_time|date:"Y-m-d" }}]:
|
||||
{{ pos.comment }}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}{% endfilter %}
|
||||
---- following is a DRAFT of message to be sent AFTER approval ---
|
||||
{{ doc.idinternal.ballot.approval_text }}{% if doc.idinternal.ballot.ballot_writeup %}
|
||||
{{ approval_text }}{% if ballot_writeup %}
|
||||
|
||||
{{ doc.idinternal.ballot.ballot_writeup }}
|
||||
{{ ballot_writeup }}
|
||||
{% endif %}
|
||||
{% endautoescape%}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
{% load mail_filters %}{% autoescape off %}To: Internet Engineering Steering Group <iesg@ietf.org>
|
||||
From: IESG Secretary <iesg-secretary@ietf.org>
|
||||
Reply-To: IESG Secretary <iesg-secretary@ietf.org>
|
||||
Subject: Evaluation: {{ doc.file_tag }} to {{ doc|std_level_prompt }}
|
||||
|
||||
{% filter wordwrap:73 %}Evaluation for {{ doc.file_tag }} can be found at {{ doc_url }}
|
||||
|
||||
{% if last_call_expires %}Last call to expire on: {{ last_call_expires }}
|
||||
|
||||
{% endif %}{% endfilter %}
|
||||
Please return the full line with your position.
|
||||
|
||||
Yes No-Objection Discuss Abstain
|
||||
{% for fmt in active_ad_positions %}{{ fmt }}
|
||||
{% endfor %}{% if inactive_ad_positions %}
|
||||
|
||||
{% for fmt in inactive_ad_positions %}{{ fmt }}
|
||||
{% endfor %}{% endif %}
|
||||
|
||||
"Yes" or "No-Objection" positions from 2/3 of non-recused ADs,
|
||||
with no "Discuss" positions, are needed for approval.
|
||||
|
||||
DISCUSSES AND COMMENTS
|
||||
======================
|
||||
{% filter wordwrap:79 %}{% for pos in ad_feedback %}{{ pos.ad }}:
|
||||
|
||||
{% if pos.discuss %}Discuss [{{ pos.discuss_time|date:"Y-m-d" }}]:
|
||||
{{ pos.discuss }}
|
||||
|
||||
{% endif %}{% if pos.comment %}Comment [{{ pos.comment_time|date:"Y-m-d" }}]:
|
||||
{{ pos.comment }}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}{% endfilter %}
|
||||
---- following is a DRAFT of message to be sent AFTER approval ---
|
||||
{{ approval_text }}{% if ballot_writeup %}
|
||||
|
||||
{{ ballot_writeup }}
|
||||
{% endif %}
|
||||
{% endautoescape%}
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Make Last Call for Internet Draft{{ docs|pluralize }}{% endblock %}
|
||||
{% block title %}Make Last Call for {{ doc.name }}{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
form.approve-ballot pre {
|
||||
|
@ -19,13 +19,11 @@ form.approve-ballot .announcement {
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Make Last Call for Internet Draft{{ docs|pluralize }}</h1>
|
||||
<h1>Make Last Call for {{ doc.name }}</h1>
|
||||
|
||||
<p>Make last call for following draft{{ docs|pluralize }}:</p>
|
||||
<p>Make last call for following draft:</p>
|
||||
|
||||
{% for d in docs %}
|
||||
<div>{{ d.file_tag }} ({{ d.group.acronym }}) - {{ d.intended_status.intended_status }}</div>
|
||||
{% endfor %}
|
||||
<div>{{ doc.file_tag }} ({{ doc.group.acronym }}) - {{ doc.intended_std_level.name }}</div>
|
||||
|
||||
<form style="margin-top:20px" action="" method="POST">
|
||||
<table>
|
||||
|
@ -33,7 +31,7 @@ form.approve-ballot .announcement {
|
|||
</table>
|
||||
|
||||
<div class="actions">
|
||||
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
|
||||
<a href="{{ doc.get_absolute_url }}">Back</a>
|
||||
<input type="reset" value="Reset">
|
||||
<input type="submit" value="Make Last Call"/>
|
||||
</div>
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Make Last Call for {{ doc.name }}{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
form.approve-ballot pre {
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
border-top: 4px solid #eee;
|
||||
border-bottom: 4px solid #eee;
|
||||
}
|
||||
form.approve-ballot .announcement {
|
||||
overflow-x: auto;
|
||||
overflow-y: scroll;
|
||||
width: 800px;
|
||||
height: 400px;
|
||||
border: 1px solid #bbb;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Make Last Call for {{ doc.name }}</h1>
|
||||
|
||||
<p>Make last call for following draft:</p>
|
||||
|
||||
<div>{{ doc.file_tag }} ({{ doc.group.acronym }}) - {{ doc.intended_std_level.name }}</div>
|
||||
|
||||
<form style="margin-top:20px" action="" method="POST">
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
|
||||
<div class="actions">
|
||||
<a href="{{ doc.get_absolute_url }}">Back</a>
|
||||
<input type="reset" value="Reset">
|
||||
<input type="submit" value="Make Last Call"/>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -22,10 +22,10 @@ form.send-ballot pre {
|
|||
<th>Cc:<br/>
|
||||
<span class="help">separated<br/> by comma</span></th>
|
||||
<td><input type="text" name="cc" value="" size="75" /><br/>
|
||||
{% if doc.idinternal.state_change_notice_to %}
|
||||
{% if doc.notify %}
|
||||
<label>
|
||||
<input type="checkbox" name="cc_state_change" value="1" checked="yes" />
|
||||
{{ doc.idinternal.state_change_notice_to }}
|
||||
<input type="checkbox" name="cc_state_change" value="1" checked="checked" />
|
||||
{{ doc.notify }}
|
||||
</label>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
{% load ietf_filters %}
|
||||
{% block title %}Send ballot position email for {{ ad }}{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
form.send-ballot pre {
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
border-top: 4px solid #eee;
|
||||
border-bottom: 4px solid #eee;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Send ballot position email for {{ ad }}</h1>
|
||||
|
||||
<form class="send-ballot" action="" method="POST">
|
||||
<table>
|
||||
<tr><th>From:</th> <td>{{ frm }}</td></tr>
|
||||
<tr><th>To:</th> <td>{{ to }}</td></tr>
|
||||
<tr>
|
||||
<th>Cc:<br/>
|
||||
<span class="help">separated<br/> by comma</span></th>
|
||||
<td><input type="text" name="cc" value="" size="75" /><br/>
|
||||
{% if doc.notify %}
|
||||
<label>
|
||||
<input type="checkbox" name="cc_state_change" value="1" checked="checked" />
|
||||
{{ doc.notify }}
|
||||
</label>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><th>Subject:</th> <td>{{ subject }}</td></tr>
|
||||
<tr>
|
||||
<th>Body:</th>
|
||||
<td><pre>{{ body|wrap_text }}</pre></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="actions">
|
||||
<a href="{{ back_url }}">Back</a>
|
||||
<input type="submit" value="Send"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue