From: Jérémy Fabre Date: Mon, 12 Sep 2016 11:49:05 +0000 (+0200) Subject: Move the videos in a different slider than the images X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=525644ddc212234c664c6f7633ff8d7edb5d6255;p=mezzo.git Move the videos in a different slider than the images --- diff --git a/app/templates/core/inc/slider.html b/app/templates/core/inc/slider.html index 39993ce5..4b101319 100644 --- a/app/templates/core/inc/slider.html +++ b/app/templates/core/inc/slider.html @@ -17,21 +17,5 @@ {% endfor %} - {% for video in videos %} -
  • -
    -
    - -
    -
    - {{ video.title }} -
    -
    -
  • - {% endfor %} diff --git a/app/templates/core/inc/slider_video.html b/app/templates/core/inc/slider_video.html new file mode 100644 index 00000000..30ebaad2 --- /dev/null +++ b/app/templates/core/inc/slider_video.html @@ -0,0 +1,21 @@ +{% load mezzanine_tags %} +
    + +
    diff --git a/app/templates/pages/custompage.html b/app/templates/pages/custompage.html index de79eb92..8820e006 100644 --- a/app/templates/pages/custompage.html +++ b/app/templates/pages/custompage.html @@ -68,11 +68,17 @@ {% block page_slider %} {% with page.custompage.images.all|get_type:'page_slider' as slider_images %} - {% with page.custompage.videos.all as videos %} {% if slider_images %} {% include 'core/inc/slider.html' %} {% endif %} {% endwith %} +{% endblock %} + +{% block page_video %} + {% with page.custompage.videos.all as videos %} + {% if videos %} + {% include 'core/inc/slider_video.html' %} + {% endif %} {% endwith %} {% endblock %} diff --git a/app/templates/pages/departmentpage.html b/app/templates/pages/departmentpage.html index 1715a7e6..ee2a6926 100644 --- a/app/templates/pages/departmentpage.html +++ b/app/templates/pages/departmentpage.html @@ -58,15 +58,20 @@ {% endwith %} {% endblock %} - {% block page_slider %} {% with page.departmentpage.images.all|get_type:'page_slider' as slider_images %} -{% with page.departmentpage.videos.all as videos %} {% if slider_images %} {% include 'core/inc/slider.html' %} {% endif %} {% endwith %} -{% endwith %} +{% endblock %} + +{% block page_video %} + {% with page.departmentpage.videos.all as videos %} + {% if videos %} + {% include 'core/inc/slider_video.html' %} + {% endif %} + {% endwith %} {% endblock %} {% block page_sub_content %} diff --git a/app/templates/pages/page.html b/app/templates/pages/page.html index f353fbda..0c6c0f48 100644 --- a/app/templates/pages/page.html +++ b/app/templates/pages/page.html @@ -61,6 +61,8 @@ {% block page_slider %} {% endblock %} + {% block page_video %} + {% endblock %} {% block page_audio %} {% endblock %} {% block page_sub_content %} diff --git a/app/templates/pages/teampage.html b/app/templates/pages/teampage.html index da260abb..7560e1ba 100644 --- a/app/templates/pages/teampage.html +++ b/app/templates/pages/teampage.html @@ -70,14 +70,21 @@ {% block page_slider %} {% with page.teampage.images.all|get_type:'page_slider' as slider_images %} - {% with page.teampage.videos.all as videos %} {% if slider_images %} {% include 'core/inc/slider.html' %} {% endif %} {% endwith %} - {% endwith %} {% endblock %} +{% block page_video %} + {% with page.teampage.videos.all as videos %} + {% if videos %} + {% include 'core/inc/slider_video.html' %} + {% endif %} + {% endwith %} +{% endblock %} + + {% block page_sub_content %} {% with page.teampage.blocks.all as blocks %} {% include "core/inc/block.html" %}