From: Guillaume Pellerin Date: Tue, 10 May 2016 15:21:23 +0000 (+0200) Subject: add all related contents to all contents X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7bc11595e48a85785b8a4dc2e7bcab855d87804e;p=mezzo.git add all related contents to all contents --- diff --git a/app/festival/templates/festival/artist_detail.html b/app/festival/templates/festival/artist_detail.html index e7b7f707..b0fa36f3 100644 --- a/app/festival/templates/festival/artist_detail.html +++ b/app/festival/templates/festival/artist_detail.html @@ -25,20 +25,17 @@
{% if artist.events.all %}

{% trans "Also discover" %}


-
- -{% for event in artist.events.all %} - {% include 'agenda/includes/event_card.html' %} -{% endfor %} - -{% for event in artist.events.all %} + {% for event in artist.events.all %} + {% include 'agenda/includes/event_card.html' %} {% for video in event.videos.all %} {% include 'festival/inc/video_card.html' %} {% endfor %} + {% for post in event.blog_posts.all %} + {% include 'blog/includes/post_card.html' %} {% endfor %} - + {% endfor %}
{% endif %} {% endblock %} diff --git a/app/festival/templates/festival/video_detail.html b/app/festival/templates/festival/video_detail.html index 330a2184..43bb7712 100644 --- a/app/festival/templates/festival/video_detail.html +++ b/app/festival/templates/festival/video_detail.html @@ -29,8 +29,18 @@
{% with video.event as event %} - {% include 'agenda/includes/event_card.html' %} + {% include 'agenda/includes/event_card.html' %} + {% for artist in event.artists.all %} + {% include "festival/inc/artist_card.html" %} + {% endfor %} + {% for video in event.videos.all %} + {% include 'festival/inc/video_card.html' %} + {% endfor %} + {% for post in event.blog_posts.all %} + {% include 'blog/includes/post_card.html' %} + {% endfor %} {% endwith %} +
{% endif %} diff --git a/app/templates/agenda/event_detail.html b/app/templates/agenda/event_detail.html index 00056fdb..4eb5e14a 100644 --- a/app/templates/agenda/event_detail.html +++ b/app/templates/agenda/event_detail.html @@ -159,7 +159,7 @@ {% endblock %} {% block event_related %} -{% if event.artists.all or event.videos.all %} +{% if event.artists.all or event.videos.all or event.blog_posts.all %}

{% trans "Also discover" %}

@@ -173,6 +173,11 @@ {% include 'festival/inc/video_card.html' %} {% endfor %} {% endif %} +{% if event.blog_posts.all %} + {% for post in event.blog_posts.all %} + {% include 'blog/includes/post_card.html' %} + {% endfor %} +{% endif %}
{% endif %} {% endblock %} diff --git a/app/templates/blog/blog_post_detail.html b/app/templates/blog/blog_post_detail.html index 5868e45c..c76c387a 100644 --- a/app/templates/blog/blog_post_detail.html +++ b/app/templates/blog/blog_post_detail.html @@ -113,15 +113,27 @@ {% endblock %} + {% block blog_post_detail_related_posts %} -{% if related_posts %} +{% if related_posts or blog_post.events.all %} {% endif %}