changes to official proceedings generation code to support new agenda schema
- Legacy-Id: 7073
This commit is contained in:
parent
77ab20dd2b
commit
35a94362a1
|
@ -7,7 +7,8 @@ from django.conf import settings
|
|||
from django.shortcuts import render_to_response
|
||||
from ietf.group.models import Group, Role
|
||||
from ietf.group.utils import get_charter_text
|
||||
from ietf.meeting.models import Session, TimeSlot, Meeting
|
||||
from ietf.meeting.helpers import get_schedule, meeting_updated
|
||||
from ietf.meeting.models import Session, TimeSlot, Meeting, ScheduledSession
|
||||
from ietf.doc.models import Document, RelatedDocument, DocEvent
|
||||
from itertools import chain
|
||||
from ietf.secr.proceedings.models import Registration
|
||||
|
@ -248,9 +249,12 @@ def create_proceedings(meeting, group, is_final=False):
|
|||
|
||||
if not os.path.exists(target):
|
||||
os.makedirs(target)
|
||||
shutil.copy(source,target)
|
||||
try:
|
||||
shutil.copy(source,target)
|
||||
rfc.bytes = os.path.getsize(source)
|
||||
except IOError:
|
||||
pass
|
||||
rfc.url = url_root + "rfc/%s" % filename
|
||||
rfc.bytes = os.path.getsize(source)
|
||||
rfc.num = "RFC %s" % rfc_num
|
||||
# check related documents
|
||||
# check obsoletes
|
||||
|
@ -372,16 +376,12 @@ def gen_acknowledgement(context):
|
|||
|
||||
def gen_agenda(context):
|
||||
meeting = context['meeting']
|
||||
|
||||
timeslots = TimeSlot.objects.filter(meeting=meeting)
|
||||
|
||||
# sort by area:group then time
|
||||
sort1 = sorted(timeslots, key = mycomp)
|
||||
sort2 = sorted(sort1, key = lambda a: a.time)
|
||||
schedule = get_schedule(meeting)
|
||||
scheduledsessions = ScheduledSession.objects.filter(schedule=schedule).exclude(session__isnull=True)
|
||||
|
||||
html = render_to_response('proceedings/agenda.html',{
|
||||
'meeting': meeting,
|
||||
'timeslots': sort2}
|
||||
'scheduledsessions': scheduledsessions}
|
||||
)
|
||||
|
||||
path = os.path.join(settings.SECR_PROCEEDINGS_DIR,meeting.number,'agenda.html')
|
||||
|
|
|
@ -20,7 +20,7 @@ from ietf.secr.sreq.forms import GroupSelectForm
|
|||
from ietf.secr.utils.decorators import check_permissions, sec_only
|
||||
from ietf.secr.utils.document import get_rfc_num, get_full_path
|
||||
from ietf.secr.utils.group import get_my_groups, groups_by_session
|
||||
from ietf.secr.utils.meeting import get_upload_root, get_proceedings_path, get_material
|
||||
from ietf.secr.utils.meeting import get_upload_root, get_proceedings_path, get_material, get_timeslot
|
||||
|
||||
from ietf.doc.models import Document, DocAlias, DocEvent, State, NewRevisionDocEvent, RelatedDocument
|
||||
from ietf.group.models import Group
|
||||
|
@ -83,9 +83,9 @@ def get_extras(meeting):
|
|||
Gather "extras" which are one off groups. ie iab-wcit(86)
|
||||
'''
|
||||
groups = []
|
||||
sessions = Session.objects.filter(meeting=meeting).exclude(group__parent__acronym__in=('app','gen','int','ops','rai','rtg','sec','tsv','irtf')).filter(timeslot__type='session')
|
||||
sessions = Session.objects.filter(meeting=meeting).exclude(group__parent__acronym__in=('app','gen','int','ops','rai','rtg','sec','tsv','irtf'))
|
||||
for session in sessions:
|
||||
if session.materials.all():
|
||||
if get_timeslot(session).type.slug == 'session' and session.materials.all():
|
||||
groups.append(session.group)
|
||||
return groups
|
||||
|
||||
|
@ -227,7 +227,8 @@ def ajax_generate_proceedings(request, meeting_num):
|
|||
context = {'meeting':meeting,
|
||||
'areas':areas,
|
||||
'others':others,
|
||||
'extras':extras}
|
||||
'extras':extras,
|
||||
'request':request}
|
||||
proceedings_url = get_proceedings_url(meeting)
|
||||
|
||||
# the acknowledgement page can be edited manually so only produce if it doesn't already exist
|
||||
|
|
|
@ -11,50 +11,50 @@
|
|||
*** Click on a name of the group to get a meeting agenda ***</p>
|
||||
|
||||
<table id="agenda">
|
||||
{% for slot in timeslots %}
|
||||
{% for ss in scheduledsessions %}
|
||||
{% ifchanged %}
|
||||
<tr class="meeting-date">
|
||||
<td colspan="6">
|
||||
<h2 class="ietf-divider">{{ slot.time|date:"l"|upper }}, {{ slot.time|date:"F j, Y" }}</h2>
|
||||
<h2 class="ietf-divider">{{ ss.timeslot.time|date:"l"|upper }}, {{ ss.timeslot.time|date:"F j, Y" }}</h2>
|
||||
</td>
|
||||
</tr>
|
||||
{% endifchanged %}
|
||||
{% ifchanged %}
|
||||
<tr class="time-title">
|
||||
<td colspan="1">
|
||||
<b>{{slot.time|date:"Hi"}}-{{slot.end_time|date:"Hi"}}</b>
|
||||
<b>{{ss.timeslot.time|date:"Hi"}}-{{ss.timeslot.end_time|date:"Hi"}}</b>
|
||||
</td>
|
||||
<td colspan="5">
|
||||
<b>{{slot.name}}</b>
|
||||
{% if slot.type.name != 'Session' %}
|
||||
{% if slot.show_location %} - {{slot.get_location|escape}}{% endif %}
|
||||
<b>{{ss.timeslot.name}}</b>
|
||||
{% if ss.timeslot.type.name != 'Session' %}
|
||||
{% if ss.timeslot.show_location %} - {{ss.timeslot.get_location|escape}}{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endifchanged %}
|
||||
{% if slot.type.name = 'Session' %} {% if slot.session.group %}
|
||||
<tr id="{{meeting.number}}-{{slot.time|date:"D-Hi"|lower}}-{{slot.session.group.parent.acronym|upper}}-{{slot.session.group.acronym|lower}}" class="grouprow">
|
||||
<td style="width:200px">{% if slot.show_location %}{{slot.get_location|escape}}{% endif %}</td>
|
||||
<td style="width:50px">{{slot.session.group.parent.acronym|upper}}</td>
|
||||
{% if ss.timeslot.type.name = 'Session' %} {% if ss.session.group %}
|
||||
<tr id="{{meeting.number}}-{{ss.timeslot.time|date:"D-Hi"|lower}}-{{ss.session.group.parent.acronym|upper}}-{{ss.session.group.acronym|lower}}" class="grouprow">
|
||||
<td style="width:200px">{% if ss.timeslot.show_location %}{{ss.timeslot.get_location|escape}}{% endif %}</td>
|
||||
<td style="width:50px">{{ss.session.group.parent.acronym|upper}}</td>
|
||||
<td style="width:100px">
|
||||
{% if slot.session.group.charter %}<a href="{{slot.session.group.charter.get_absolute_url}}">{{slot.session.group.acronym}}</a>
|
||||
{% else %}{{slot.session.group.acronym}}{% endif %}</td>
|
||||
{% if ss.session.group.charter %}<a href="http://datatracker.ietf.org{{ss.session.group.charter.get_absolute_url}}">{{ss.session.group.acronym}}</a>
|
||||
{% else %}{{ss.session.group.acronym}}{% endif %}</td>
|
||||
<td>
|
||||
{% if slot.session.agenda %}<a href="/meeting/{{ meeting.number }}/agenda/{{ slot.session.group.acronym }}/">{{slot.session.group.name}}</a>
|
||||
{% else %}{{slot.session.group.name}}{% endif %}
|
||||
{% if slot.session.group.state.name = "BOF" %} BOF {% endif %}
|
||||
{% if slot.session.agenda_note %}
|
||||
<br/><span class="note">{{slot.session.agenda_note}}</span>{% endif %}</td>
|
||||
{% if ss.session.agenda %}<a href="http://datatracker.ietf.org/meeting/{{ meeting.number }}/agenda/{{ ss.session.group.acronym }}/">{{ss.session.group.name}}</a>
|
||||
{% else %}{{ss.session.group.name}}{% endif %}
|
||||
{% if ss.session.group.state.name = "BOF" %} BOF {% endif %}
|
||||
{% if ss.session.agenda_note %}
|
||||
<br/><span class="note">{{ss.session.agenda_note}}</span>{% endif %}</td>
|
||||
</tr>
|
||||
|
||||
{% endif %} {% endif %}
|
||||
{% if slot.type.name = 'Plenary' %}
|
||||
{% if ss.timeslot.type.name = 'Plenary' %}
|
||||
<tr class="grouprow">
|
||||
<td style="width:200px">{% if slot.show_location %}{{slot.get_location|escape}}{% endif %}</td>
|
||||
<td style="width:200px">{% if ss.timeslot.show_location %}{{ss.timeslot.get_location|escape}}{% endif %}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{% if slot.session.agenda %}<a href="{{ slot.session.agenda.get_absolute_url }}">Agenda</a>
|
||||
{% else %}{{slot.session.group.name}}{% endif %}
|
||||
<td>{% if ss.session.agenda %}<a href="http://datatracker.ietf.org{{ ss.session.agenda.get_absolute_url }}">Agenda</a>
|
||||
{% else %}{{ss.session.group.name}}{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
|
|
@ -96,11 +96,11 @@ Fremont, California.The IETF Executive Director is Alexa Morris
|
|||
</tr>
|
||||
<tr>
|
||||
<td valign="Top" width="264">Project Manager</td>
|
||||
<td valign="Top" width="180">Wanda Lo </td>
|
||||
<td valign="Top" width="180">Stephanie McCammon</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="Top" width="264">Meeting Registrar</td>
|
||||
<td valign="Top" width="180">Stephanie McCammon</td>
|
||||
<td valign="Top" width="180">Maddy Conner</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="Top" width="264">Project Manager</td>
|
||||
|
|
Loading…
Reference in a new issue