Skip to content

Commit

Permalink
To resolve ticket #237
Browse files Browse the repository at this point in the history
 * view.py passes two queries for sessions: one with day_id <= 0 (pre session) and the other with day_id > 0 (regular sessions) to the meeting agenda templates
 - Legacy-Id: 965
  • Loading branch information
Michael Lee committed Oct 31, 2007
1 parent 8d22d4b commit c92da0e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 14 deletions.
8 changes: 3 additions & 5 deletions ietf/meeting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def show_html_materials(request, meeting_num=None):
def show_html_agenda(request, meeting_num=None, html_or_txt=None):
if html_or_txt == 'txt':
return HttpResponsePermanentRedirect('http://www.ietf.org/meetings/agenda_%d.txt' % int(meeting_num))
queryset_list=MeetingTime.objects.filter(meeting=meeting_num).exclude(day_id=0).order_by("day_id","time_desc")
queryset_list=MeetingTime.objects.filter(meeting=meeting_num,day_id__gt='0').order_by("day_id","time_desc")
queryset_list_pre_session=MeetingTime.objects.filter(meeting=meeting_num,day_id__lte='0').order_by("day_id","time_desc")
meeting_info=get_object_or_404(Meeting, meeting_num=meeting_num)
nonsession_info=NonSession.objects.filter(meeting=meeting_num,day_id__gte='0').order_by("day_id")
meetingvenue_info=get_object_or_404(MeetingVenue, meeting_num=meeting_num)
Expand Down Expand Up @@ -73,10 +74,7 @@ def show_html_agenda(request, meeting_num=None, html_or_txt=None):
# [133] is broken because it requires a patched Django to run. Work
# around this instead. Later: FIXME (revert to the straightforward code
# when this bug has been fixed in the Django release we're running.)
## queryset_list_sun=WgMeetingSession.objects.filter(meeting=meeting_num, sched_time_id1__day_id=0).order_by('sched_time_id1__time_desc')
queryset_list_sun=list(WgMeetingSession.objects.filter(meeting=meeting_num, sched_time_id1__day_id=0))
queryset_list_sun.sort(key=(lambda item: item.sched_time_id1.time_desc))
queryset_list_ads = list(IESGHistory.objects.filter(meeting=meeting_num))
queryset_list_ads.sort(key=(lambda item: item.area.area_acronym.acronym))
return object_list(request,queryset=queryset_list, template_name=template_file,allow_empty=True, extra_context={'qs_sun':queryset_list_sun, 'meeting_info':meeting_info, 'meeting_num':meeting_num, 'nonsession_info':nonsession_info, 'meetingvenue_info':meetingvenue_info, 'plenaryw_agenda':plenaryw_agenda, 'plenaryt_agenda':plenaryt_agenda, 'qs_ads':queryset_list_ads,'last_update_info':last_update_info})
return object_list(request,queryset=queryset_list, template_name=template_file,allow_empty=True, extra_context={'queryset_list_pre_session':queryset_list_pre_session, 'meeting_info':meeting_info, 'meeting_num':meeting_num, 'nonsession_info':nonsession_info, 'meetingvenue_info':meetingvenue_info, 'plenaryw_agenda':plenaryw_agenda, 'plenaryt_agenda':plenaryt_agenda, 'qs_ads':queryset_list_ads,'last_update_info':last_update_info})

19 changes: 14 additions & 5 deletions ietf/templates/meeting/agenda.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,22 @@
*** Click on an acronym of the group to get a charter page *** <br />
*** Click on a name of the group to get a meeting agenda *** <br />
</P>
<p><b>{{ meeting_info.start_date|date:"l"|upper }}, {{ meeting_info.start_date|date:"F j, Y" }}</b><br>
{{ nonsession_info.0.time_desc }} {{ nonsession_info.0.non_session_ref }} - {{ meetingvenue_info.reg_area_name }}
<!-- Update to include Saturday Session -->
{% regroup queryset_list_pre_session by day_id as pre_days %}
{% for pre_day in pre_days %}
<b>{{ pre_day.list.0.meeting_date|date:"l"|upper }}, {{ pre_day.list.0.meeting_date|date:"F j, Y" }} </b><br>
{% ifequal pre_day.list.0.day_id 0 %}
{{ nonsession_info.0.time_desc }} {{ nonsession_info.0.non_session_ref }} - {{ meetingvenue_info.reg_area_name }}
<br>
{% for item in qs_sun %}
{{ item.sched_time_id1.time_desc }} {{ item.acronym_name }} - {{ item.sched_room_id1.room_name }}<br>
{% endifequal %}
{% for item in pre_day.list %}
{% for session in item.sessions %}
{{ item.time_desc }} {{ session.acronym_name }} - {{ session.sched_room_id1.room_name }}<br>
{% endfor %}
{% endfor %}
<br>
{% endfor %}
<br>
<!-- End Update -->
{% regroup object_list by day_id as days %}
{% for day in days %}
<b>{{ day.list.0.meeting_date|date:"l"|upper }}, {{ day.list.0.meeting_date|date:"F j, Y" }} </b><br>
Expand Down
22 changes: 18 additions & 4 deletions ietf/templates/meeting/agenda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,25 @@ xml:lang="en-US"><head><title>Agenda of the {{ meeting_num|ordinal }} IETF Meeti

Updated as of {{ last_update_info.updated_date }} {{ last_update_info.updated_time }} (ET)

{{ meeting_info.start_date|date:"l"|upper }}, {{ meeting_info.start_date|date:"F j, Y" }}
{{ nonsession_info.0.time_desc }} {{ nonsession_info.0.non_session_ref }} - {{ meetingvenue_info.reg_area_name }}
{% for item in qs_sun %}{{ item.sched_time_id1.time_desc }} {{ item.acronym_name }} - {{ item.sched_room_id1.room_name }}
<!-- Update to include Saturday Session -->
{% regroup queryset_list_pre_session by day_id as pre_days %}
{% for pre_day in pre_days %}
<b>{{ pre_day.list.0.meeting_date|date:"l"|upper }}, {{
pre_day.list.0.meeting_date|date:"F j, Y" }} </b><br>
{% ifequal pre_day.list.0.day_id 0 %}
{{ nonsession_info.0.time_desc }} {{ nonsession_info.0.non_session_ref }}
- {{ meetingvenue_info.reg_area_name }}
<br>
{% endifequal %}
{% for item in pre_day.list %}
{% for session in item.sessions %}
{{ item.time_desc }} {{ session.acronym_name }} - {{
session.sched_room_id1.room_name }}<br>
{% endfor %}
{% endfor %}
<br>
{% endfor %}

<!-- End Update -->
{% regroup object_list by day_id as days %}{% for day in days %}
{{ day.list.0.meeting_date|date:"l"|upper }}, {{ day.list.0.meeting_date|date:"F j, Y" }}
{% if day.list.0.reg_info %}{{ day.list.0.reg_info }} - {{ meetingvenue_info.reg_area_name }}
Expand Down

0 comments on commit c92da0e

Please sign in to comment.