From: Guillaume Pellerin Date: Thu, 13 Oct 2016 16:16:06 +0000 (+0200) Subject: Prepare playlist templates X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3973c3951d6712c693d1490a88e2212a1b1f4a72;p=mezzo.git Prepare playlist templates --- diff --git a/app/templates/media/audio/inc/audio_card.html b/app/templates/media/audio/inc/audio_card.html deleted file mode 100644 index 38541296..00000000 --- a/app/templates/media/audio/inc/audio_card.html +++ /dev/null @@ -1,30 +0,0 @@ - -
    - - {% for audio in object %} - -
  1. - {{ audio.title }} -
  2. - - {% comment %} - - {# 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 #}
    - - - {% endcomment %} - - {% endfor %} - -
diff --git a/app/templates/media/inc/media_shutter.html b/app/templates/media/inc/media_shutter.html deleted file mode 100644 index 13835371..00000000 --- a/app/templates/media/inc/media_shutter.html +++ /dev/null @@ -1,19 +0,0 @@ -{% load mezzanine_tags keyword_tags i18n organization_tags %} -{% for media in home.dynamic_content_home_media.all|slice:":3" %} -
-
-

{{ media.content_object.title }}

- {% if media.content_object.description %} -

{{ media.content_object.description|truncatechars:100 }}

- {% endif %} - {% if media.content_object.poster_url %} - - {% endif %} - {% if media.content_type.model == 'video' %} - {% trans 'See the video' %} - {% elif media.content_type.model == 'audio' %} - {% trans 'Hear the sound' %} - {% endif %} -
-
-{% endfor %} diff --git a/app/templates/media/inc/playlist_audio_card.html b/app/templates/media/inc/playlist_audio_card.html new file mode 100644 index 00000000..96460dab --- /dev/null +++ b/app/templates/media/inc/playlist_audio_card.html @@ -0,0 +1,11 @@ + + +
    + {% for media in playlist %} +
  1. + {% for transcoded_media in media.transcoded.all %} + {{ media.title }} + {% endfor %} +
  2. + {% endfor %} +
diff --git a/app/templates/media/inc/playlist_audio_detail.html b/app/templates/media/inc/playlist_audio_detail.html new file mode 100644 index 00000000..23fdb87a --- /dev/null +++ b/app/templates/media/inc/playlist_audio_detail.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags %} + +{% block title %} +{{ playlist.title }} +{% endblock %} + +{% block main %} + +{% for media in playlist.medias.all %} + {% if forloop.first %} +
+ +
+ + {% endif %} +{% endfor %} + +
+ {{ playlist.content|safe }} +
+ +{% with playlist as object %} + {% include "includes/share_buttons.html" %} +{% endwith %} + +{% endblock %} diff --git a/app/templates/media/inc/playlist_shutter.html b/app/templates/media/inc/playlist_shutter.html new file mode 100644 index 00000000..13835371 --- /dev/null +++ b/app/templates/media/inc/playlist_shutter.html @@ -0,0 +1,19 @@ +{% load mezzanine_tags keyword_tags i18n organization_tags %} +{% for media in home.dynamic_content_home_media.all|slice:":3" %} +
+
+

{{ media.content_object.title }}

+ {% if media.content_object.description %} +

{{ media.content_object.description|truncatechars:100 }}

+ {% endif %} + {% if media.content_object.poster_url %} + + {% endif %} + {% if media.content_type.model == 'video' %} + {% trans 'See the video' %} + {% elif media.content_type.model == 'audio' %} + {% trans 'Hear the sound' %} + {% endif %} +
+
+{% endfor %} diff --git a/app/templates/media/inc/playlist_video_card.html b/app/templates/media/inc/playlist_video_card.html new file mode 100644 index 00000000..2246e8a1 --- /dev/null +++ b/app/templates/media/inc/playlist_video_card.html @@ -0,0 +1,11 @@ + + +
    + {% for media in playlist %} +
  1. + {% for transcoded_media in media.transcoded.all %} + {{ media.title }} + {% endfor %} +
  2. + {% endfor %} +
diff --git a/app/templates/media/inc/playlist_video_detail.html b/app/templates/media/inc/playlist_video_detail.html new file mode 100644 index 00000000..8529df19 --- /dev/null +++ b/app/templates/media/inc/playlist_video_detail.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags %} + +{% block title %} +{{ playlist.title }} +{% endblock %} + +{% block main %} + +{% for media in playlist.medias.all %} + {% if forloop.first %} +
+ +
+
    + {% else %} +
  1. {{ media.title }}
  2. + {% endif %} + {% if forloop.last %} +
+ {% endif %} +{% endfor %} + +
+ {{ playlist.content|safe }} +
+ +{% with playlist as object %} + {% include "includes/share_buttons.html" %} +{% endwith %} + +{% endblock %} diff --git a/app/templates/media/media_list.html b/app/templates/media/media_list.html deleted file mode 100644 index 89718dcf..00000000 --- a/app/templates/media/media_list.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "pages/page.html" %} -{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} - -{% block meta_title %}{% trans "Media" %}{% endblock %} - -{% block meta_keywords %}{% metablock %} -{% keywords_for person as keywords %} -{% for keyword in keywords %} - {% if not forloop.first %}, {% endif %} - {{ keyword }} -{% endfor %} -{% endmetablock %}{% endblock %} - -{% block page_class %} - person -{% endblock %} - -{% block breadcrumb_menu %} - {{ block.super }} - -{% endblock %} - -{% block page_title %} - {% editable person.title %} -

{% trans "Media" %}

- {% endeditable %} -{% endblock %} - -{% block page_content %} - {# not working for audio for the moment... #} - {% for object in media %} - {% with object|classname|lower as class_name %} - {% with "media/"|add:class_name|add:"/inc/"|add:class_name|add:"_card.html" as template %} - {% include template %} - {% endwith %} - {% endwith %} - {{ object|classname }} : {{ object.created_at }} : {{ object.title }} -
- {% endfor %} - -{% endblock %} diff --git a/app/templates/media/playlist_detail.html b/app/templates/media/playlist_detail.html new file mode 100644 index 00000000..4f5e0c50 --- /dev/null +++ b/app/templates/media/playlist_detail.html @@ -0,0 +1,39 @@ +{% extends "pages/page.html" %} +{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} + +{% block meta_title %}{% trans "Media" %}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for person as keywords %} +{% for keyword in keywords %} + {% if not forloop.first %}, {% endif %} + {{ keyword }} +{% endfor %} +{% endmetablock %}{% endblock %} + +{% block page_class %} + person +{% endblock %} + +{% block breadcrumb_menu %} + {{ block.super }} + +{% endblock %} + +{% block page_title %} + {% editable person.title %} +

{% trans "Media" %}

+ {% endeditable %} +{% endblock %} + +{% block page_content %} + {% for object in media %} + {% with object|classname|lower as class_name %} + {% with "media/"|add:class_name|add:"/inc/"|add:class_name|add:"_card.html" as template %} + {% include template %} + {% endwith %} + {% endwith %} + {{ object|classname }} : {{ object.created_at }} : {{ object.title }} +
+ {% endfor %} +{% endblock %} diff --git a/app/templates/media/playlist_list.html b/app/templates/media/playlist_list.html new file mode 100644 index 00000000..9a56fcb8 --- /dev/null +++ b/app/templates/media/playlist_list.html @@ -0,0 +1,41 @@ +{% extends "pages/page.html" %} +{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %} + +{% block meta_title %}{% trans "Media" %}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for person as keywords %} +{% for keyword in keywords %} + {% if not forloop.first %}, {% endif %} + {{ keyword }} +{% endfor %} +{% endmetablock %}{% endblock %} + +{% block page_class %} + person +{% endblock %} + +{% block breadcrumb_menu %} + {{ block.super }} + +{% endblock %} + +{% block page_title %} + {% editable person.title %} +

{% trans "Media" %}

+ {% endeditable %} +{% endblock %} + +{% block page_content %} + {# not working for audio for the moment... #} + {% for playlist in playlists %} + {% with playlist.type as type %} + {% with "media/inc/playlist_"|add:type|add:"_card.html" as template %} + {% include template %} + {% endwith %} + {% endwith %} + {{ playlist|classname }} : {{ playlist.created }} : {{ playlist.title }} +
+ {% endfor %} + +{% endblock %} diff --git a/app/templates/media/video/inc/video_card.html b/app/templates/media/video/inc/video_card.html deleted file mode 100644 index 0f2df011..00000000 --- a/app/templates/media/video/inc/video_card.html +++ /dev/null @@ -1,18 +0,0 @@ -{% for video in videos %} - {% comment %} - {# video.title #}
- {# video.open_source_mime_type #}
- {# video.closed_source_mime_type #}
- {# video.category #}
- {# video.media_id #}
- {# video.open_source_url #}
- {# video.closed_source_url #}
- {# video.poster_url #}
- {% endcomment %} - - -{% endfor %} diff --git a/app/templates/media/video/video_detail.html b/app/templates/media/video/video_detail.html deleted file mode 100644 index 014c7b0c..00000000 --- a/app/templates/media/video/video_detail.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load mezzanine_tags keyword_tags %} - -{% block title %} -{{ video.title }} -{% endblock %} - -{% block main %} - -
- {{ video.content|safe }} -
- -
- -
- -{% with video as object %} - {% include "includes/share_buttons.html" %} -{% endwith %} - -{% endblock %}