Merged in [11690] from housley@vigilsec.com:

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.
 - Legacy-Id: 11704
Note: SVN reference [11690] has been migrated to Git commit cbf7daddcc
This commit is contained in:
Henrik Levkowetz 2016-07-18 10:39:29 +00:00
commit f4cbe6c294
3 changed files with 7 additions and 7 deletions

View file

@ -1157,12 +1157,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'):

View file

@ -265,10 +265,14 @@
</a>
{% endif %}
{% if item.session.historic_group.state_id = "bof" %}
{% if item.session.historic_group.state_id == "bof" %}
<span class="label label-success pull-right">BOF</span>
{% endif %}
{% if item.session.status.slug == 'canceled' %}
<span class="label label-danger pull-right">CANCELLED</span>
{% endif %}
{% if item.session.agenda_note %}
<br><span class="text-danger">{{item.session.agenda_note}}</span>
{% endif %}

View file

@ -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 %}