]> git.parisson.com Git - mezzo.git/commitdiff
Task #109 : creating video templates
authorEmilie <zawadzki@ircam.fr>
Wed, 31 Aug 2016 10:11:40 +0000 (12:11 +0200)
committerEmilie <zawadzki@ircam.fr>
Wed, 31 Aug 2016 10:11:40 +0000 (12:11 +0200)
app/templates/core/inc/video.html [new file with mode: 0644]
app/templates/pages/custompage.html
app/templates/pages/departmentpage.html
app/templates/pages/page.html
app/templates/pages/teampage.html

diff --git a/app/templates/core/inc/video.html b/app/templates/core/inc/video.html
new file mode 100644 (file)
index 0000000..b2b52dd
--- /dev/null
@@ -0,0 +1,16 @@
+{% for video in videos %}
+  {# video.title #}<br>
+  {# video.open_source_mime_type #}<br>
+  {# video.closed_source_mime_type #}<br>
+  {# video.category #}<br>
+  {# video.media_id #}<br>
+  {# video.open_source_url #}<br>
+  {# video.closed_source_url #}<br>
+  {# video.poster_url #}<br>
+
+  <video width="905" height="520" controls>
+    <source src="{{ video.closed_source_url }}" type="{{ video.closed_source_mime_type }}">
+    <source src="{{ video.open_source_url }}" type="{{ video.open_source_mime_type }}">
+    Your browser does not support the video tag.
+  </video>
+{% endfor %}
index c2674c9350ecc9f29dd519a23622583d840c27bd..ae934665eca195df7839d308103ce37f8fe9df63 100644 (file)
 
 {% endblock %}
 
+{% block page_slider %}
+  {% with page.custompage.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.custompage.videos.all as videos %}
+      {% if videos %}
+        {% include 'core/inc/video.html' %}
+      {% endif %}
+    {% endwith %}
+{% endblock %}
+{% block page_audio %}
+{% endblock %}
+
 {% block page_sub_content %}
    {% with page.custompage.blocks.all as blocks %}
      {% include "core/inc/block.html" %}
index 6f3b242fb08d0cfe25198a1129f2333c35a31576..16007f80a7fbdb2e4c1de4f4cdcf8b5b7056d840 100644 (file)
 {% endwith %}
 {% endblock %}
 
+{% block page_video %}
+    {% with page.departmentpage.videos.all as videos %}
+      {% if videos %}
+        {% include 'core/inc/video.html' %}
+      {% endif %}
+    {% endwith %}
+{% endblock %}
+{% block page_audio %}
+{% endblock %}
+
 {% block page_sub_content %}
     {% with page.departmentpage.blocks.all as blocks %}
       {% include "core/inc/block.html" %}
index 775c4fad97b995e1bbcf32aa5064988d637eb611..e4ee8ddc137ebfb39a68a5ae53a72ba4c29b7c0c 100644 (file)
@@ -62,6 +62,8 @@
 
         {% block page_slider %}
         {% endblock %}
+        {% block page_video %}
+        {% endblock %}
         {% block page_sub_content %}
         {% endblock %}
         {% block page_related_content %}
index 424e135ae578c444c3be5a302e61ac2f97e97cce..5aeb0648a12daba945832a2384970823c6061bdc 100644 (file)
     {% 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 %}