From cbf7daddcc5dd62a464be9241243b0c55417d3be Mon Sep 17 00:00:00 2001 From: Russ Housley Date: Sat, 16 Jul 2016 18:05:44 +0000 Subject: [PATCH] When the Secretariat marks a session as cancelled, the HTML agenda shows a red CANCELLED box, the text shows *** CANCELLED ***, and (as before) the .ics file includes STATUS:CANCELLED. Fixes issue #1639. Commit ready for merge. - Legacy-Id: 11690 --- ietf/meeting/models.py | 6 +----- ietf/templates/meeting/agenda.html | 6 +++++- ietf/templates/meeting/agenda.txt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index 43d6df0b8..86875299e 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -1137,12 +1137,8 @@ class Session(models.Model): def ical_status(self): if self.status.slug == 'canceled': # sic return "CANCELLED" - elif (datetime.date.today() - self.meeting.date) > datetime.timedelta(days=5): - # this is a bit simpleminded, better would be to look at the - # time(s) of the timeslot(s) of the official meeting schedule. - return "CONFIRMED" else: - return "TENTATIVE" + return "CONFIRMED" def agenda_file(self): if not hasattr(self, '_agenda_file'): diff --git a/ietf/templates/meeting/agenda.html b/ietf/templates/meeting/agenda.html index dde876ccf..7062a9bf3 100644 --- a/ietf/templates/meeting/agenda.html +++ b/ietf/templates/meeting/agenda.html @@ -265,10 +265,14 @@ {% endif %} - {% if item.session.historic_group.state_id = "bof" %} + {% if item.session.historic_group.state_id == "bof" %} BOF {% endif %} + {% if item.session.status.slug == 'canceled' %} + CANCELLED + {% endif %} + {% if item.session.agenda_note %}
{{item.session.agenda_note}} {% endif %} diff --git a/ietf/templates/meeting/agenda.txt b/ietf/templates/meeting/agenda.txt index 5a7ebeb2b..9c29ad550 100644 --- a/ietf/templates/meeting/agenda.txt +++ b/ietf/templates/meeting/agenda.txt @@ -20,7 +20,7 @@ {% endif %}{% if item.timeslot.type.slug == "session" %}{% if item.session.historic_group %}{% ifchanged %} {{ item.timeslot.time_desc }} {{ item.timeslot.name }} -{% endifchanged %}{{ item.timeslot.location.name|ljust:14 }} {{ item.session.historic_group.historic_parent.acronym|upper|ljust:4 }} {{ item.session.historic_group.acronym|ljust:10 }} {{ item.session.historic_group.name }} {% if item.session.historic_group.state_id == "bof" %}BOF{% elif item.session.historic_group.type_id == "wg" %}WG{% endif %}{% if item.session.agenda_note %} - {{ item.session.agenda_note }}{% endif %} +{% endifchanged %}{{ item.timeslot.location.name|ljust:14 }} {{ item.session.historic_group.historic_parent.acronym|upper|ljust:4 }} {{ item.session.historic_group.acronym|ljust:10 }} {{ item.session.historic_group.name }} {% if item.session.historic_group.state_id == "bof" %}BOF{% elif item.session.historic_group.type_id == "wg" %}WG{% endif %}{% if item.session.agenda_note %} - {{ item.session.agenda_note }}{% endif %}{% if item.session.status.slug == 'canceled' %} *** CANCELLED ***{% endif %} {% endif %}{% endif %}{% if item.timeslot.type.slug == "break" %} {{ item.timeslot.time_desc }} {{ item.timeslot.name }}{% if schedule.meeting.break_area and item.timeslot.show_location %} - {{ schedule.meeting.break_area }}{% endif %}{% endif %}{% if item.timeslot.type.slug == "other" %} {{ item.timeslot.time_desc }} {{ item.timeslot.name }} - {{ item.timeslot.location.name }}{% endif %}{% endfor %}