From 373ff827ca96cdad723071c6ce8a189a4dfa3139 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 4 Apr 2016 18:57:13 +0200 Subject: [PATCH] generic share button (use 'object' in the context) --- app/festival/templates/festival/video_detail.html | 4 ++++ app/templates/agenda/event_detail.html | 2 ++ app/templates/includes/share_buttons.html | 8 ++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/festival/templates/festival/video_detail.html b/app/festival/templates/festival/video_detail.html index 404a80e6..14f1f893 100644 --- a/app/festival/templates/festival/video_detail.html +++ b/app/festival/templates/festival/video_detail.html @@ -20,6 +20,10 @@ +{% with video as object %} + {% include "includes/share_buttons.html" %} +{% endwith %} +

{% trans 'Related event' %}

{% with video.event as event %} diff --git a/app/templates/agenda/event_detail.html b/app/templates/agenda/event_detail.html index 767ea5f9..3cef8fc5 100644 --- a/app/templates/agenda/event_detail.html +++ b/app/templates/agenda/event_detail.html @@ -71,7 +71,9 @@ {% block event_detail_sharebuttons %} {% set_short_url_for event %} + {% with event as object %} {% include "includes/share_buttons.html" %} + {% endwith %} {% endblock %} {% if event.location %} diff --git a/app/templates/includes/share_buttons.html b/app/templates/includes/share_buttons.html index 7f4c4419..4d124d14 100644 --- a/app/templates/includes/share_buttons.html +++ b/app/templates/includes/share_buttons.html @@ -1,8 +1,8 @@ {% load i18n %} \ No newline at end of file +
-- 2.39.5