From a0b0116cc8f9a168cd1ac75bd94fb434ffb14ef5 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Wed, 2 Jun 2021 14:55:17 +0200 Subject: [PATCH] Add sharing options to widget #189 --- project/templates/_macros.html | 15 ++++++++++++++- project/templates/widget/event_date/read.html | 2 +- project/views/widget.py | 9 +++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/project/templates/_macros.html b/project/templates/_macros.html index a3e9166..ea55e38 100644 --- a/project/templates/_macros.html +++ b/project/templates/_macros.html @@ -365,7 +365,7 @@ {{ render_int_prop(event.expected_participants, 'fa-users', 'Expected number of participants') }} {% endmacro %} -{% macro render_event_props(event, start, end, dates = None, show_rating = False, show_admin_unit = True) %} +{% macro render_event_props(event, start, end, dates = None, show_rating = False, show_admin_unit = True, share_links=None, calendar_links=None) %}
{{ _('Event') }} @@ -407,6 +407,19 @@
{{ render_event_add_props(event) }}
+ + {% if share_links or calendar_links %} +
+ {% if share_links %} + + {{ render_share_modal(share_links) }} + {% endif %} + {% if calendar_links %} + + {{ render_calendar_export_modal(calendar_links) }} + {% endif %} +
+ {% endif %}