From e301ff8f291c122c80010eff0d97e3c1e2b2ea63 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 21 Feb 2023 11:27:38 -0400 Subject: [PATCH 1/2] fix: Order rooms by ascending capacity in schedule editor --- ietf/meeting/views.py | 4 ++-- ietf/templates/meeting/upcoming.ics | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ietf/meeting/views.py b/ietf/meeting/views.py index 0ba61d3faf..80006792d3 100644 --- a/ietf/meeting/views.py +++ b/ietf/meeting/views.py @@ -665,8 +665,8 @@ def prepare_timeslots_for_display(timeslots, rooms): sorted_rooms = sorted( rooms_with_timeslots, key=lambda room: ( - # Sort higher capacity rooms first. - -room.capacity if room.capacity is not None else 1, # sort rooms with capacity = None at end + # Sort lower capacity rooms first. + room.capacity if room.capacity is not None else math.inf, # sort rooms with capacity = None at end # Sort regular session rooms ahead of others - these will usually # have more timeslots than other room types. 0 if room_data[room.pk]['timeslot_count'] == max_timeslots else 1, diff --git a/ietf/templates/meeting/upcoming.ics b/ietf/templates/meeting/upcoming.ics index 74105a054a..3b8db60ac4 100644 --- a/ietf/templates/meeting/upcoming.ics +++ b/ietf/templates/meeting/upcoming.ics @@ -1,4 +1,4 @@ -{% load humanize tz %}{% autoescape off %}{% load ietf_filters %}BEGIN:VCALENDAR +{% load humanize tz %}{% autoescape off %}{% load ietf_filters textfilters %}BEGIN:VCALENDAR VERSION:2.0 METHOD:PUBLISH PRODID:-//IETF//datatracker.ietf.org ical upcoming//EN @@ -10,14 +10,16 @@ SUMMARY:{% if item.session.name %}{{item.session.group.acronym|lower}} - {{item. CLASS:PUBLIC DTSTART{% ics_date_time item.timeslot.local_start_time item.schedule.meeting.time_zone %} DTEND{% ics_date_time item.timeslot.local_end_time item.schedule.meeting.time_zone %} -DTSTAMP{% ics_date_time item.timeslot.modified|utc 'utc' %} -{% if item.session.agenda %}URL:{{item.session.agenda.get_href}} -DESCRIPTION:{{item.timeslot.name|ics_esc}}\n{% if item.session.agenda_note %} +DTSTAMP{% ics_date_time item.timeslot.modified|utc 'utc' %}{% if item.session.agenda %} +URL:{{item.session.agenda.get_href}}{% endif %} +DESCRIPTION:{% if item.timeslot.name %}{{item.timeslot.name|ics_esc}}\n{% endif %}{% if item.session.agenda_note %} Note: {{item.session.agenda_note|ics_esc}}\n{% endif %}{% for material in item.session.materials.all %} \n{{material.type}}{% if material.type.name != "Agenda" %} ({{material.title|ics_esc}}){% endif %}: - {{material.get_href}}\n{% endfor %} -{% endif %}END:VEVENT + {{material.get_href}}\n{% endfor %}{% if item.timeslot.location.webex_url %} + Webex: {{ item.timeslot.location.webex_url }}\n{% endif %}{% if item.timeslot.location.video_stream_url %} + Meetecho: {{ item.timeslot.location.video_stream_url|format:item.session }}\n{% endif %} +END:VEVENT {% endfor %}{% for meeting in ietfs %}BEGIN:VEVENT UID:ietf-{{ meeting.number }} SUMMARY:IETF {{ meeting.number }}{% if meeting.city %} From 90700daccb50ea45d757bdf468746f7059ce71e5 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 21 Feb 2023 11:39:24 -0400 Subject: [PATCH 2/2] chore: Revert unrelated changes accidentally included in commit --- ietf/templates/meeting/upcoming.ics | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ietf/templates/meeting/upcoming.ics b/ietf/templates/meeting/upcoming.ics index 3b8db60ac4..74105a054a 100644 --- a/ietf/templates/meeting/upcoming.ics +++ b/ietf/templates/meeting/upcoming.ics @@ -1,4 +1,4 @@ -{% load humanize tz %}{% autoescape off %}{% load ietf_filters textfilters %}BEGIN:VCALENDAR +{% load humanize tz %}{% autoescape off %}{% load ietf_filters %}BEGIN:VCALENDAR VERSION:2.0 METHOD:PUBLISH PRODID:-//IETF//datatracker.ietf.org ical upcoming//EN @@ -10,16 +10,14 @@ SUMMARY:{% if item.session.name %}{{item.session.group.acronym|lower}} - {{item. CLASS:PUBLIC DTSTART{% ics_date_time item.timeslot.local_start_time item.schedule.meeting.time_zone %} DTEND{% ics_date_time item.timeslot.local_end_time item.schedule.meeting.time_zone %} -DTSTAMP{% ics_date_time item.timeslot.modified|utc 'utc' %}{% if item.session.agenda %} -URL:{{item.session.agenda.get_href}}{% endif %} -DESCRIPTION:{% if item.timeslot.name %}{{item.timeslot.name|ics_esc}}\n{% endif %}{% if item.session.agenda_note %} +DTSTAMP{% ics_date_time item.timeslot.modified|utc 'utc' %} +{% if item.session.agenda %}URL:{{item.session.agenda.get_href}} +DESCRIPTION:{{item.timeslot.name|ics_esc}}\n{% if item.session.agenda_note %} Note: {{item.session.agenda_note|ics_esc}}\n{% endif %}{% for material in item.session.materials.all %} \n{{material.type}}{% if material.type.name != "Agenda" %} ({{material.title|ics_esc}}){% endif %}: - {{material.get_href}}\n{% endfor %}{% if item.timeslot.location.webex_url %} - Webex: {{ item.timeslot.location.webex_url }}\n{% endif %}{% if item.timeslot.location.video_stream_url %} - Meetecho: {{ item.timeslot.location.video_stream_url|format:item.session }}\n{% endif %} -END:VEVENT + {{material.get_href}}\n{% endfor %} +{% endif %}END:VEVENT {% endfor %}{% for meeting in ietfs %}BEGIN:VEVENT UID:ietf-{{ meeting.number }} SUMMARY:IETF {{ meeting.number }}{% if meeting.city %}