From 7c968139d0068d54a2de10013f62afe0a51522b3 Mon Sep 17 00:00:00 2001 From: Peter Yee Date: Tue, 22 Jul 2025 09:37:47 +0200 Subject: [PATCH] feat: Add calendar buttons for future group meetings (#9182) The buttons appear when there are future meetings for a group, on https://datatracker.ietf.org/wg/GROUPNAME/meetings/ The buttons are basically the same two calendar buttons that are on https://datatracker.ietf.org/meeting/upcoming?show=GROUPNAME This change addresses issue #7524. (Separately, the description of #7526 might need to be updated to refer to the new buttons.) --- ietf/group/views.py | 14 ++++++++++++++ ietf/templates/group/meetings.html | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ietf/group/views.py b/ietf/group/views.py index f30569d230..f59b270a08 100644 --- a/ietf/group/views.py +++ b/ietf/group/views.py @@ -58,6 +58,7 @@ from django.utils import timezone from django.utils.html import escape from django.views.decorators.cache import cache_page, cache_control +from django.urls import reverse import debug # pyflakes:ignore @@ -898,6 +899,18 @@ def meetings(request, acronym, group_type=None): far_past.append(s) past = recent_past + # Add calendar actions + cal_actions = [] + + cal_actions.append(dict( + label='Download as .ics', + url=reverse('ietf.meeting.views.upcoming_ical')+"?show="+group.acronym) + ) + cal_actions.append(dict( + label='Subscribe with webcal', + url='webcal://'+request.get_host()+reverse('ietf.meeting.views.upcoming_ical')+"?show="+group.acronym) + ) + return render( request, "group/meetings.html", @@ -915,6 +928,7 @@ def meetings(request, acronym, group_type=None): "far_past": far_past, "can_edit": can_edit, "can_always_edit": can_always_edit, + "cal_actions": cal_actions, }, ), ) diff --git a/ietf/templates/group/meetings.html b/ietf/templates/group/meetings.html index deaea1e675..bee8111025 100644 --- a/ietf/templates/group/meetings.html +++ b/ietf/templates/group/meetings.html @@ -40,12 +40,12 @@

Meetings in progress

{% if future %}

Future Meetings - - - + {% for cal_action in cal_actions %} + + {{ cal_action.label }} + + {% endfor %}