From 762064236eb8800c20723a77c3396ce5f9e35f3f Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Thu, 4 Feb 2021 18:14:01 +0000 Subject: [PATCH] Add proper folding for static content in the DESCRIPTION in the important-dates ics feed. Remove important-dates from the upcoming meetings ics. - Legacy-Id: 18821 --- ietf/meeting/tests_views.py | 4 +-- .../meeting/important_dates_for_meeting.ics | 29 ++++++++++--------- ietf/templates/meeting/upcoming.html | 1 + ietf/templates/meeting/upcoming.ics | 2 +- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/ietf/meeting/tests_views.py b/ietf/meeting/tests_views.py index dd0d8ac6b..43d71c5f9 100644 --- a/ietf/meeting/tests_views.py +++ b/ietf/meeting/tests_views.py @@ -2297,14 +2297,14 @@ class InterimTests(TestCase): r = self.client.get(url) self.assertEqual(r.status_code, 200) - # Expect events for important dates plus 3 - one for each WG and one for the IETF meeting + # Expect events 3 sessions - one for each WG and one for the IETF meeting assert_ical_response_is_valid(self, r, expected_event_summaries=[ 'ames - Asteroid Mining Equipment Standardization Group', 'mars - Martian Special Interest Group', 'IETF 72', ], - expected_event_count=3 + meeting.importantdate_set.count()) + expected_event_count=3) def test_upcoming_ical_filter(self): # Just a quick check of functionality - details tested by test_js.InterimTests diff --git a/ietf/templates/meeting/important_dates_for_meeting.ics b/ietf/templates/meeting/important_dates_for_meeting.ics index 572852df0..2cbcf4f53 100644 --- a/ietf/templates/meeting/important_dates_for_meeting.ics +++ b/ietf/templates/meeting/important_dates_for_meeting.ics @@ -4,19 +4,20 @@ SUMMARY:IETF {{ meeting.number }}: {{ d.name.name }} CLASS:PUBLIC DTSTART{% if not d.midnight_cutoff %};VALUE=DATE{% endif %}:{{ d.date|date:"Ymd" }}{% if d.midnight_cutoff %}235900Z{% endif %} DTSTAMP:{{ meeting.cached_updated|date:"Ymd" }}T{{ meeting.cached_updated|date:"His" }}Z -DESCRIPTION:{{ d.name.desc }} {% if first and d.name.slug == 'openreg' or first and d.name.slug == 'earlybird' %} -Register here: https://www.ietf.org/how/meetings/register/{% endif %}{% if d.name.slug == 'opensched' %} -To request a Working Group session, use the IETF Meeting Session Request Tool: -{{ request.scheme }}://{{ request.get_host}}{% url 'ietf.secr.sreq.views.main' %} -If you are working on a BoF request, it is highly recommended to tell the IESG -now by sending an email to iesg@ietf.org to get advance help with the request.{% endif %}{% if d.name.slug == 'cutoffwgreq' %} -To request a Working Group session, use the IETF Meeting Session Request Tool: -{{ request.scheme }}://{{ request.get_host }}{% url 'ietf.secr.sreq.views.main' %}{% endif %}{% if d.name.slug == 'cutoffbofreq' %} -To request a BOF, please see instructions on Requesting a BOF: -https://www.ietf.org/how/bofs/bof-procedures/{% endif %}{% if d.name.slug == 'idcutoff' %} -Upload using the ID Submission Tool: -{{ request.scheme }}://{{ request.get_host }}{% url 'ietf.submit.views.upload_submission' %}{% endif %}{% if d.name.slug == 'draftwgagenda' or d.name.slug == 'revwgagenda' or d.name.slug == 'procsub' or d.name.slug == 'revslug' %} -Upload using the Meeting Materials Management Tool: -{{ request.scheme }}://{{ request.get_host }}{% url 'ietf.meeting.views.materials' num=meeting.number %}{% endif %} +TRANSP:TRANSPARENT +DESCRIPTION:{{ d.name.desc }}{% if first and d.name.slug == 'openreg' or first and d.name.slug == 'earlybird' %}\n + Register here: https://www.ietf.org/how/meetings/register/{% endif %}{% if d.name.slug == 'opensched' %}\n + To request a Working Group session, use the IETF Meeting Session Request Tool:\n + {{ request.scheme }}://{{ request.get_host}}{% url 'ietf.secr.sreq.views.main' %}\n + If you are working on a BoF request, it is highly recommended to tell the IESG\n + now by sending an email to iesg@ietf.org to get advance help with the request.{% endif %}{% if d.name.slug == 'cutoffwgreq' %}\n + To request a Working Group session, use the IETF Meeting Session Request Tool:\n + {{ request.scheme }}://{{ request.get_host }}{% url 'ietf.secr.sreq.views.main' %}{% endif %}{% if d.name.slug == 'cutoffbofreq' %}\n + To request a BOF, please see instructions on Requesting a BOF:\n + https://www.ietf.org/how/bofs/bof-procedures/{% endif %}{% if d.name.slug == 'idcutoff' %}\n + Upload using the ID Submission Tool:\n + {{ request.scheme }}://{{ request.get_host }}{% url 'ietf.submit.views.upload_submission' %}{% endif %}{% if d.name.slug == 'draftwgagenda' or d.name.slug == 'revwgagenda' or d.name.slug == 'procsub' or d.name.slug == 'revslug' %}\n + Upload using the Meeting Materials Management Tool:\n + {{ request.scheme }}://{{ request.get_host }}{% url 'ietf.meeting.views.materials' num=meeting.number %}{% endif %} END:VEVENT {% endfor %} \ No newline at end of file diff --git a/ietf/templates/meeting/upcoming.html b/ietf/templates/meeting/upcoming.html index 9be988a12..4adfda813 100644 --- a/ietf/templates/meeting/upcoming.html +++ b/ietf/templates/meeting/upcoming.html @@ -30,6 +30,7 @@

For more on regular IETF meetings see here

+

Meeting important dates are not included in upcoming meeting calendars. They have their own calendar

{% include 'meeting/agenda_filter.html' with filter_categories=filter_categories customize_button_text="Customize the meeting list..." only%} diff --git a/ietf/templates/meeting/upcoming.ics b/ietf/templates/meeting/upcoming.ics index c20f31859..5e032a458 100644 --- a/ietf/templates/meeting/upcoming.ics +++ b/ietf/templates/meeting/upcoming.ics @@ -28,4 +28,4 @@ DTEND;VALUE=DATE{% if meeting.time_zone %};TZID={{ meeting.time_zone|ics_esc }}{ DTSTAMP:{{ meeting.cached_updated|date:"Ymd" }}T{{ meeting.cached_updated|date:"His" }}Z URL:{{ request.scheme }}://{{ request.get_host }}{% url 'ietf.meeting.views.agenda' num=meeting.number %} END:VEVENT -{% include "meeting/important_dates_for_meeting.ics" %}{% endfor %}END:VCALENDAR{% endautoescape %} +{% endfor %}END:VCALENDAR{% endautoescape %}