From bb148003b50f66cec9d3c434f28b69e58d330114 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Tue, 8 Oct 2013 06:42:53 +0000 Subject: [PATCH] Fixed the plenary display code for the text agenda to use the non-proxy plenary information to identify the plenaries, matching other previous changes from the agenda branch. - Legacy-Id: 6383 --- ietf/meeting/helpers.py | 6 ++---- ietf/meeting/models.py | 3 +-- ietf/templates/meeting/agenda.txt | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ietf/meeting/helpers.py b/ietf/meeting/helpers.py index 9a83c1301..46b94a116 100644 --- a/ietf/meeting/helpers.py +++ b/ietf/meeting/helpers.py @@ -81,13 +81,11 @@ class NamedTimeSlot(object): def is_plenary(self): return self.timeslot.is_plenary - @property def is_plenaryw(self): - return self.timeslot.is_plenary_type("plenaryw") + return self.timeslot.is_plenary_type("opsplenary") - @property def is_plenaryt(self): - return self.timeslot.is_plenary_type("plenaryt") + return self.timeslot.is_plenary_type("techplenary") @property def tzname(self): diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index 04b716e20..fb3cd432d 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -355,9 +355,8 @@ class TimeSlot(models.Model): def is_plenary(self): return self.type_id == "plenary" - @property def is_plenary_type(self, name, agenda=None): - return self.scheduledsessions_at_same_time(agenda)[0].acronym == name + return self.type_id == "plenary" and self.sessions.all()[0].short == name @property def slot_decor(self): diff --git a/ietf/templates/meeting/agenda.txt b/ietf/templates/meeting/agenda.txt index f83539fe4..2cf6a01ec 100644 --- a/ietf/templates/meeting/agenda.txt +++ b/ietf/templates/meeting/agenda.txt @@ -14,9 +14,9 @@ {{ slot.meeting_date|date:"l"|upper }}, {{ slot.meeting_date|date:"F j, Y" }}{% if slot.reg_info %} {{ slot.registration.time_desc }} {{ slot.registration.name }}{% if venue.reg_area_name %} - {{ venue.reg_area_name }}{% endif %}{% endif %} {% endifchanged %}{% if slot.session_name %}{% if slot.break_info %}{{ slot.break_info.time_desc }} {{ slot.break_info.name }}{% if venue.break_area_name and slot.break_info.show_location %} - {{ venue.break_area_name }}{% endif %} -{% endif %}{{ slot.time_desc }} {{ slot.session_name }}{% if slot.is_plenary %} - {{ slot.room_name }}{% endif %}{% if slot.has_plenaryw %} +{% endif %}{{ slot.time_desc }} {{ slot.session_name }}{% if slot.is_plenary %} - {{ slot.room_name }}{% endif %}{% if slot.is_plenaryw %} -{{ plenaryw_agenda }}{% endif %}{% if slot.has_plenaryt %} +{{ plenaryw_agenda }}{% endif %}{% if slot.is_plenaryt %} {{ plenaryt_agenda }}{% endif %}{% if not slot.is_plenary %}{% for ss in slot.scheduledsessions_by_area|dictsort:"area" %}{% if ss.info.session %} {{ ss.info.room_name|ljust:14 }} {% if ss.info.area %}{{ ss.info.area|upper|ljust:4 }} {{ ss.info.acronym|ljust:10 }} {% endif %}{{ ss.info.acronym_name }} {{ ss.info.group_type_str }}{% if ss.info.special_agenda_note %} - {{ ss.info.special_agenda_note }}{% endif %}{% endif %}{% endfor %}{% endif %}