From: Emilie Date: Wed, 31 Aug 2016 10:58:59 +0000 (+0200) Subject: Task #109 : creating audio templates X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8d4eecae035a1317c0c6d006a9f06c15feb74bcb;p=mezzo.git Task #109 : creating audio templates --- diff --git a/app/templates/core/inc/audio.html b/app/templates/core/inc/audio.html new file mode 100644 index 00000000..d75db913 --- /dev/null +++ b/app/templates/core/inc/audio.html @@ -0,0 +1,16 @@ +{% for audio in audios %} + {# audio.title #}
+ {# audio.open_source_mime_type #}
+ {# audio.closed_source_mime_type #}
+ {# audio.category #}
+ {# audio.media_id #}
+ {# audio.open_source_url #}
+ {# audio.closed_source_url #}
+ {# audio.poster_url #}
+ + +{% endfor %} diff --git a/app/templates/pages/custompage.html b/app/templates/pages/custompage.html index ae934665..0791cd7f 100644 --- a/app/templates/pages/custompage.html +++ b/app/templates/pages/custompage.html @@ -58,6 +58,14 @@ {% endblock %} +{% block page_audio %} + {% with page.custompage.audios.all as audios %} + {% if audios %} + {% include 'core/inc/audio.html' %} + {% endif %} + {% endwith %} +{% endblock %} + {% block page_slider %} {% with page.custompage.images.all|get_type:'page_slider' as slider_images %} {% if slider_images %} @@ -73,8 +81,6 @@ {% endif %} {% endwith %} {% endblock %} -{% block page_audio %} -{% endblock %} {% block page_sub_content %} {% with page.custompage.blocks.all as blocks %} diff --git a/app/templates/pages/departmentpage.html b/app/templates/pages/departmentpage.html index 16007f80..8b856ff2 100644 --- a/app/templates/pages/departmentpage.html +++ b/app/templates/pages/departmentpage.html @@ -50,6 +50,15 @@ {% endblock %} +{% block page_audio %} + {% with page.departmentpage.audios.all as audios %} + {% if audios %} + {% include 'core/inc/audio.html' %} + {% endif %} + {% endwith %} +{% endblock %} + + {% block page_slider %} {% with page.departmentpage.images.all|get_type:'page_slider' as slider_images %} {% if slider_images %} @@ -65,8 +74,6 @@ {% endif %} {% endwith %} {% endblock %} -{% block page_audio %} -{% endblock %} {% block page_sub_content %} {% with page.departmentpage.blocks.all as blocks %} diff --git a/app/templates/pages/page.html b/app/templates/pages/page.html index e4ee8ddc..84088997 100644 --- a/app/templates/pages/page.html +++ b/app/templates/pages/page.html @@ -59,7 +59,8 @@ - + {% block page_audio %} + {% endblock %} {% block page_slider %} {% endblock %} {% block page_video %} diff --git a/app/templates/pages/teampage.html b/app/templates/pages/teampage.html index 5aeb0648..f8b1b984 100644 --- a/app/templates/pages/teampage.html +++ b/app/templates/pages/teampage.html @@ -27,24 +27,6 @@ {% endblock %} -{% block page_slider %} - {% with page.teampage.images.all|get_type:'page_slider' as slider_images %} - {% if slider_images %} - {% include 'core/inc/slider.html' %} - {% endif %} - {% endwith %} -{% endblock %} - -{% block page_video %} - {% with page.teampage.videos.all as videos %} - {% if videos %} - {% include 'core/inc/video.html' %} - {% endif %} - {% endwith %} -{% endblock %} -{% block page_audio %} -{% endblock %} - {% block page_content %} {% if page.teampage.sub_title %} @@ -78,6 +60,30 @@ {% endblock %} +{% block page_audio %} + {% with page.teampage.audios.all as audios %} + {% if audios %} + {% include 'core/inc/audio.html' %} + {% endif %} + {% endwith %} +{% endblock %} + +{% block page_slider %} + {% with page.teampage.images.all|get_type:'page_slider' as slider_images %} + {% if slider_images %} + {% include 'core/inc/slider.html' %} + {% endif %} + {% endwith %} +{% endblock %} + +{% block page_video %} + {% with page.teampage.videos.all as videos %} + {% if videos %} + {% include 'core/inc/video.html' %} + {% endif %} + {% endwith %} +{% endblock %} + {% block page_sub_content %} {% with page.teampage.blocks.all as blocks %} {% include "core/inc/block.html" %}