]> git.parisson.com Git - mezzo.git/commitdiff
mv templates, add project app, add top header placeholer
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 21 Jun 2016 21:32:56 +0000 (23:32 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 21 Jun 2016 21:32:56 +0000 (23:32 +0200)
22 files changed:
app/festival/templates/festival/artist_detail.html [deleted file]
app/festival/templates/festival/artist_list.html [deleted file]
app/festival/templates/festival/inc/artist_card.html [deleted file]
app/festival/templates/festival/inc/audio_playlist.html [deleted file]
app/festival/templates/festival/inc/video_card.html [deleted file]
app/festival/templates/festival/video_detail.html [deleted file]
app/festival/templates/festival/video_list.html [deleted file]
app/project/__init__.py [new file with mode: 0644]
app/project/admin.py [new file with mode: 0644]
app/project/apps.py [new file with mode: 0644]
app/project/migrations/__init__.py [new file with mode: 0644]
app/project/models.py [new file with mode: 0644]
app/project/tests.py [new file with mode: 0644]
app/project/views.py [new file with mode: 0644]
app/settings.py
app/templates/templates/festival/artist_detail.html [new file with mode: 0644]
app/templates/templates/festival/artist_list.html [new file with mode: 0644]
app/templates/templates/festival/inc/artist_card.html [new file with mode: 0644]
app/templates/templates/festival/inc/audio_playlist.html [new file with mode: 0644]
app/templates/templates/festival/inc/video_card.html [new file with mode: 0644]
app/templates/templates/festival/video_detail.html [new file with mode: 0644]
app/templates/templates/festival/video_list.html [new file with mode: 0644]

diff --git a/app/festival/templates/festival/artist_detail.html b/app/festival/templates/festival/artist_detail.html
deleted file mode 100644 (file)
index 5e1087c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags festival_tags %}
-
-{% block title %}
-{{ artist.name }}
-{% endblock %}
-
-{% block main %}
-<div class="artist__detail">
-    <p>
-    {% if artist.photo %}
-    <figure class="artist__figure img__align{% if artist.photo_alignment == 'left' %}--left{% elif artist.photo_alignment == 'right' %}--right{% else %}--center{% endif %}">
-        <img src="{% if artist.photo_featured %}{{ artist.photo_featured.url }}{% else %}{{ artist.photo.url }}{% endif %}" />
-        <figcaption class="artist__figure__copyright">
-           {{ artist.photo_credits }}
-        </figcaption>
-    </figure>
-    {% endif %}
-    {{ artist.bio|safe }}
-    <br style="clear: both;" />
-    </p>
-</div>
-
-<hr style="margin-top: 3rem;">
-{% if artist.events.all %}
-<h2 class="section__title">{% trans "Also discover" %}</h2> <br>
-<div class="msry__container">
- <div class="msry__sizer"></div>
- {% for event in artist.events.all|no_parents %}
-    {% include 'agenda/includes/event_card.html' %}
- {% endfor %}
- {% for video in artist.videos.all %}
-    {% include 'festival/inc/video_card.html' %}
- {% endfor %}
- {% with artist.events.all|unique_posts as posts %}
-    {% for post in posts %}
-        {% include 'blog/includes/post_card.html' %}
-    {% endfor %}
- {% endwith %}
-</div>
-{% endif %}
-{% endblock %}
diff --git a/app/festival/templates/festival/artist_list.html b/app/festival/templates/festival/artist_list.html
deleted file mode 100644 (file)
index ba6e6a6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags %}
-
-{% block title %}
- {% trans "Artists" %}
-{% endblock %}
-
-{% block main %}
-<div class="artist__list msry__container">
-    <div class="msry__sizer"></div>
-     {% for artist in object_list %}
-        {% include "festival/inc/artist_card.html" %}
-     {% endfor %}
-</div>
-{% endblock %}
diff --git a/app/festival/templates/festival/inc/artist_card.html b/app/festival/templates/festival/inc/artist_card.html
deleted file mode 100644 (file)
index 21c3bab..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{% load i18n pages_tags mezzanine_tags %}
-
-<div class="artist__item {% if not on_home %}msry__item {% endif %}">
-    <div class="artist__item__inner">
-        <a href="{% url 'festival-artist-detail' artist.slug %}" class="artist__item__inner">
-            <figure class="artist__item__img">
-                <img src="{{ MEDIA_URL }}{% thumbnail artist.featured_image 500 0 %}" alt="Portrait {{ artist.name }}">
-            </figure>
-            <h3 class="artist__item__name">
-                <span>
-                    {{ artist.name }}
-                </span>
-            </h3>
-        </a>
-    </div>
-</div>
diff --git a/app/festival/templates/festival/inc/audio_playlist.html b/app/festival/templates/festival/inc/audio_playlist.html
deleted file mode 100644 (file)
index 8347873..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{% load staticfiles %}
-
-<div class="audio__block">
-    {% for audio in playlist.audios.all %}
-    {% if forloop.first %}
-    <div class="audio__player">
-        <audio id="audio" preload="auto" tabindex="0" controls="">
-            <source id="primarysrc" src="{{ audio.closed_source_url }}">
-            <source id="secondarysrc" src="{{ audio.open_source_url }}">
-        </audio>
-        <span class="audio__title">
-            {{ audio.title }}
-        </span>
-    </div>
-    <ul id="playlist" class="audio__playlist">
-    {% endif %}
-        <li>
-            <a href="{{ audio.closed_source_url }}" class="audio__playlist__item" data-altsrc="{{ audio.open_source_url }}">
-                {{ audio.title }}
-            </a>
-        </li>
-    {% endfor %}
-    {% if forloop.first %}
-    </ul>
-    {% endif %}
-</div>
diff --git a/app/festival/templates/festival/inc/video_card.html b/app/festival/templates/festival/inc/video_card.html
deleted file mode 100644 (file)
index 3d5bb2e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-{% load i18n %}
-
-<div class="video__card  {% if not on_home %}msry__item {% endif %}">
-    <div class="video__card__thumbnail">
-        <img src="{{ video.poster_url }}" alt="">
-    </div>
-    <div class="video__card__info">
-        <h3 class="video__card__name">{{ video.title }}</h3>
-    </div>
-    <a href="{% url 'festival-video-detail' video.slug %}" class="video__card__link">{% trans "Play the video" %}</a>
-</div>
diff --git a/app/festival/templates/festival/video_detail.html b/app/festival/templates/festival/video_detail.html
deleted file mode 100644 (file)
index b954cc1..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags %}
-
-{% block title %}
-{{ video.title }}
-{% endblock %}
-
-{% block main %}
-
-<div class="video-html">
-    {{ video.content|safe }}
-</div>
-
-<div class="embed-responsive">
-       <video width="100%" poster="{{ video.poster_url }}" controls data-title="{{ video.title }}" preload="none">
-         <source src="{{ video.open_source_url }}" type="{{ video.open_source_mime_type }}" />
-      <source src="{{ video.closed_source_url }}" type="{{ video.closed_source_mime_type }}" />
-         </video>
-</div>
-
-{% with video as object %}
-  {% include "includes/share_buttons.html" %}
-{% endwith %}
-
-{% if video.event %}
-<div class="video-event">
- <h2 class="section__title">{% trans 'Also discover' %}</h2>
-  <div class="msry__container">
-   <div class="msry__sizer"></div>
-    {% with video.event as event %}
-        {% include 'agenda/includes/event_card.html' %}
-    {% for artist in video.artists.all %}
-        {% include "festival/inc/artist_card.html" %}
-    {% endfor %}
-    {% for v in event.videos.all %}
-      {% if v != video %}
-       {% with v as video %}
-        {% include 'festival/inc/video_card.html' %}
-       {% endwith %}
-      {% endif %}
-    {% endfor %}
-    {% for post in event.blog_posts.all %}
-        {% include 'blog/includes/post_card.html' %}
-    {% endfor %}
-    {% endwith %}
-
-</div>
-</div>
-{% endif %}
-
-{% endblock %}
diff --git a/app/festival/templates/festival/video_list.html b/app/festival/templates/festival/video_list.html
deleted file mode 100644 (file)
index dcb45e6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags festival_tags %}
-
-{% block title %}
- {% trans "Videos" %}
-{% endblock %}
-
-{% block main %}
-
-{% if categories %}
-<ul class="list-inline tag-cloud">
-{% for cat in categories %}
- <li>
-  <a href="{% url "festival-video-list-category" cat.slug %}" {% if category == cat %}class="is-active"{% endif %}>{{ cat }}</a> ({{ cat.count }})
- </li>
-{% endfor %}
-</ul>
-<br/>
-{% endif %}
-
-<div class="video__list  msry__container">
-    <div class="msry__sizer"></div>
-    {% for video in object_list %}
-     {% if video.status == 2 %}
-      {% include 'festival/inc/video_card.html' %}
-     {% endif %}
-    {% endfor %}
-</div>
-{% endblock %}
diff --git a/app/project/__init__.py b/app/project/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/project/admin.py b/app/project/admin.py
new file mode 100644 (file)
index 0000000..8c38f3f
--- /dev/null
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/app/project/apps.py b/app/project/apps.py
new file mode 100644 (file)
index 0000000..6b7b799
--- /dev/null
@@ -0,0 +1,7 @@
+from __future__ import unicode_literals
+
+from django.apps import AppConfig
+
+
+class ProjectConfig(AppConfig):
+    name = 'project'
diff --git a/app/project/migrations/__init__.py b/app/project/migrations/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/project/models.py b/app/project/models.py
new file mode 100644 (file)
index 0000000..bd4b2ab
--- /dev/null
@@ -0,0 +1,5 @@
+from __future__ import unicode_literals
+
+from django.db import models
+
+# Create your models here.
diff --git a/app/project/tests.py b/app/project/tests.py
new file mode 100644 (file)
index 0000000..7ce503c
--- /dev/null
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/app/project/views.py b/app/project/views.py
new file mode 100644 (file)
index 0000000..91ea44a
--- /dev/null
@@ -0,0 +1,3 @@
+from django.shortcuts import render
+
+# Create your views here.
index 3cc9822b4cee8fa7cef7ef52bd2fb1821eff2a14..4460d6a8277b38dc2ad9cf29586dc4f090b227e9 100644 (file)
@@ -42,9 +42,9 @@ from django.utils.translation import ugettext_lazy as _
 # that doesn't appear in this setting, all pages will appear in it.
 
 PAGE_MENU_TEMPLATES = (
-    (1, _("Top navigation bar"), "pages/menus/dropdown.html"),
-    # (2, _("Left-hand tree"), "pages/menus/tree.html"),
-    (2, _("Footer"), "pages/menus/footer.html"),
+    (1, _("Top header"), "pages/menus/header.html"),
+    (2, _("Top navigation bar"), "pages/menus/dropdown.html"),
+    (3, _("Footer"), "pages/menus/footer.html"),
 )
 
 # A sequence of fields that will be injected into Mezzanine's (or any
diff --git a/app/templates/templates/festival/artist_detail.html b/app/templates/templates/festival/artist_detail.html
new file mode 100644 (file)
index 0000000..5e1087c
--- /dev/null
@@ -0,0 +1,43 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags festival_tags %}
+
+{% block title %}
+{{ artist.name }}
+{% endblock %}
+
+{% block main %}
+<div class="artist__detail">
+    <p>
+    {% if artist.photo %}
+    <figure class="artist__figure img__align{% if artist.photo_alignment == 'left' %}--left{% elif artist.photo_alignment == 'right' %}--right{% else %}--center{% endif %}">
+        <img src="{% if artist.photo_featured %}{{ artist.photo_featured.url }}{% else %}{{ artist.photo.url }}{% endif %}" />
+        <figcaption class="artist__figure__copyright">
+           {{ artist.photo_credits }}
+        </figcaption>
+    </figure>
+    {% endif %}
+    {{ artist.bio|safe }}
+    <br style="clear: both;" />
+    </p>
+</div>
+
+<hr style="margin-top: 3rem;">
+{% if artist.events.all %}
+<h2 class="section__title">{% trans "Also discover" %}</h2> <br>
+<div class="msry__container">
+ <div class="msry__sizer"></div>
+ {% for event in artist.events.all|no_parents %}
+    {% include 'agenda/includes/event_card.html' %}
+ {% endfor %}
+ {% for video in artist.videos.all %}
+    {% include 'festival/inc/video_card.html' %}
+ {% endfor %}
+ {% with artist.events.all|unique_posts as posts %}
+    {% for post in posts %}
+        {% include 'blog/includes/post_card.html' %}
+    {% endfor %}
+ {% endwith %}
+</div>
+{% endif %}
+{% endblock %}
diff --git a/app/templates/templates/festival/artist_list.html b/app/templates/templates/festival/artist_list.html
new file mode 100644 (file)
index 0000000..ba6e6a6
--- /dev/null
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags %}
+
+{% block title %}
+ {% trans "Artists" %}
+{% endblock %}
+
+{% block main %}
+<div class="artist__list msry__container">
+    <div class="msry__sizer"></div>
+     {% for artist in object_list %}
+        {% include "festival/inc/artist_card.html" %}
+     {% endfor %}
+</div>
+{% endblock %}
diff --git a/app/templates/templates/festival/inc/artist_card.html b/app/templates/templates/festival/inc/artist_card.html
new file mode 100644 (file)
index 0000000..21c3bab
--- /dev/null
@@ -0,0 +1,16 @@
+{% load i18n pages_tags mezzanine_tags %}
+
+<div class="artist__item {% if not on_home %}msry__item {% endif %}">
+    <div class="artist__item__inner">
+        <a href="{% url 'festival-artist-detail' artist.slug %}" class="artist__item__inner">
+            <figure class="artist__item__img">
+                <img src="{{ MEDIA_URL }}{% thumbnail artist.featured_image 500 0 %}" alt="Portrait {{ artist.name }}">
+            </figure>
+            <h3 class="artist__item__name">
+                <span>
+                    {{ artist.name }}
+                </span>
+            </h3>
+        </a>
+    </div>
+</div>
diff --git a/app/templates/templates/festival/inc/audio_playlist.html b/app/templates/templates/festival/inc/audio_playlist.html
new file mode 100644 (file)
index 0000000..8347873
--- /dev/null
@@ -0,0 +1,26 @@
+{% load staticfiles %}
+
+<div class="audio__block">
+    {% for audio in playlist.audios.all %}
+    {% if forloop.first %}
+    <div class="audio__player">
+        <audio id="audio" preload="auto" tabindex="0" controls="">
+            <source id="primarysrc" src="{{ audio.closed_source_url }}">
+            <source id="secondarysrc" src="{{ audio.open_source_url }}">
+        </audio>
+        <span class="audio__title">
+            {{ audio.title }}
+        </span>
+    </div>
+    <ul id="playlist" class="audio__playlist">
+    {% endif %}
+        <li>
+            <a href="{{ audio.closed_source_url }}" class="audio__playlist__item" data-altsrc="{{ audio.open_source_url }}">
+                {{ audio.title }}
+            </a>
+        </li>
+    {% endfor %}
+    {% if forloop.first %}
+    </ul>
+    {% endif %}
+</div>
diff --git a/app/templates/templates/festival/inc/video_card.html b/app/templates/templates/festival/inc/video_card.html
new file mode 100644 (file)
index 0000000..3d5bb2e
--- /dev/null
@@ -0,0 +1,11 @@
+{% load i18n %}
+
+<div class="video__card  {% if not on_home %}msry__item {% endif %}">
+    <div class="video__card__thumbnail">
+        <img src="{{ video.poster_url }}" alt="">
+    </div>
+    <div class="video__card__info">
+        <h3 class="video__card__name">{{ video.title }}</h3>
+    </div>
+    <a href="{% url 'festival-video-detail' video.slug %}" class="video__card__link">{% trans "Play the video" %}</a>
+</div>
diff --git a/app/templates/templates/festival/video_detail.html b/app/templates/templates/festival/video_detail.html
new file mode 100644 (file)
index 0000000..b954cc1
--- /dev/null
@@ -0,0 +1,52 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags %}
+
+{% block title %}
+{{ video.title }}
+{% endblock %}
+
+{% block main %}
+
+<div class="video-html">
+    {{ video.content|safe }}
+</div>
+
+<div class="embed-responsive">
+       <video width="100%" poster="{{ video.poster_url }}" controls data-title="{{ video.title }}" preload="none">
+         <source src="{{ video.open_source_url }}" type="{{ video.open_source_mime_type }}" />
+      <source src="{{ video.closed_source_url }}" type="{{ video.closed_source_mime_type }}" />
+         </video>
+</div>
+
+{% with video as object %}
+  {% include "includes/share_buttons.html" %}
+{% endwith %}
+
+{% if video.event %}
+<div class="video-event">
+ <h2 class="section__title">{% trans 'Also discover' %}</h2>
+  <div class="msry__container">
+   <div class="msry__sizer"></div>
+    {% with video.event as event %}
+        {% include 'agenda/includes/event_card.html' %}
+    {% for artist in video.artists.all %}
+        {% include "festival/inc/artist_card.html" %}
+    {% endfor %}
+    {% for v in event.videos.all %}
+      {% if v != video %}
+       {% with v as video %}
+        {% include 'festival/inc/video_card.html' %}
+       {% endwith %}
+      {% endif %}
+    {% endfor %}
+    {% for post in event.blog_posts.all %}
+        {% include 'blog/includes/post_card.html' %}
+    {% endfor %}
+    {% endwith %}
+
+</div>
+</div>
+{% endif %}
+
+{% endblock %}
diff --git a/app/templates/templates/festival/video_list.html b/app/templates/templates/festival/video_list.html
new file mode 100644 (file)
index 0000000..dcb45e6
--- /dev/null
@@ -0,0 +1,30 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags festival_tags %}
+
+{% block title %}
+ {% trans "Videos" %}
+{% endblock %}
+
+{% block main %}
+
+{% if categories %}
+<ul class="list-inline tag-cloud">
+{% for cat in categories %}
+ <li>
+  <a href="{% url "festival-video-list-category" cat.slug %}" {% if category == cat %}class="is-active"{% endif %}>{{ cat }}</a> ({{ cat.count }})
+ </li>
+{% endfor %}
+</ul>
+<br/>
+{% endif %}
+
+<div class="video__list  msry__container">
+    <div class="msry__sizer"></div>
+    {% for video in object_list %}
+     {% if video.status == 2 %}
+      {% include 'festival/inc/video_card.html' %}
+     {% endif %}
+    {% endfor %}
+</div>
+{% endblock %}