]> git.parisson.com Git - mezzo.git/commitdiff
Task #74 #84: Article list and detail view
authorEmilie <zawadzki@ircam.fr>
Fri, 8 Jul 2016 09:57:28 +0000 (11:57 +0200)
committerEmilie <zawadzki@ircam.fr>
Fri, 8 Jul 2016 09:57:28 +0000 (11:57 +0200)
22 files changed:
app/local_settings.py
app/organization/magazine/models.py
app/organization/magazine/urls.py
app/organization/magazine/views.py
app/templates/festival/artist_detail.html [new file with mode: 0644]
app/templates/festival/artist_list.html [new file with mode: 0644]
app/templates/festival/inc/artist_card.html [new file with mode: 0644]
app/templates/festival/inc/audio_playlist.html [new file with mode: 0644]
app/templates/festival/inc/video_card.html [new file with mode: 0644]
app/templates/festival/video_detail.html [new file with mode: 0644]
app/templates/festival/video_list.html [new file with mode: 0644]
app/templates/magazine/article/article_detail.html [new file with mode: 0644]
app/templates/magazine/article/article_list.html [new file with mode: 0644]
app/templates/magazine/article/includes/post_card.html [new file with mode: 0644]
app/templates/templates/festival/artist_detail.html [deleted file]
app/templates/templates/festival/artist_list.html [deleted file]
app/templates/templates/festival/inc/artist_card.html [deleted file]
app/templates/templates/festival/inc/audio_playlist.html [deleted file]
app/templates/templates/festival/inc/video_card.html [deleted file]
app/templates/templates/festival/video_detail.html [deleted file]
app/templates/templates/festival/video_list.html [deleted file]
app/templates/templates/magazine/article/article_detail.html [deleted file]

index 96e92ada86c9634ed541abb151ea12b4a77d8aa2..4b3d83c97c87a2532aced75e657264d16824e4f9 100644 (file)
@@ -137,6 +137,3 @@ DEBUG_TOOLBAR_PANELS = [
     'debug_toolbar.panels.logging.LoggingPanel',
     'debug_toolbar.panels.redirects.RedirectsPanel',
 ]
-
-# slug
-BLOG_SLUG = 'article'
index 412eaf01ebd619b3419f449355cd98106d3f7f38..1e952fb0d45733f9da4144c0aacedc0d91221995 100644 (file)
@@ -16,9 +16,17 @@ class Article(BlogPost):
 
     sub_title = models.CharField(_('sub title'), blank=True, max_length=1000)
 
+    def get_absolute_url(self):
+        return reverse("magazine-article-detail", kwargs={"slug": self.slug})
+
     class Meta:
         verbose_name = _('article')
 
+    class Meta:
+        verbose_name = _("article")
+        verbose_name_plural = _("article")
+        ordering = ("-publish_date",)    
+
 
 class Category(Named):
     """(Category description)"""
index 08d9963b403384b7e24938b2ab67852e58d185f1..b61c0bf9125f12e12f0b7ccd6e0ab0f2e8db0522 100644 (file)
@@ -1,28 +1,20 @@
 from __future__ import unicode_literals
 
-<<<<<<< HEAD
 from django.conf.urls import patterns, include, url
 from django.conf.urls.i18n import i18n_patterns
 from django.contrib import admin
-=======
-import django.views.i18n
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
->>>>>>> 0f089a57b9482bec7a88f169e5d5fe2688c538c4
 
 from mezzanine.core.views import direct_to_template
 from mezzanine.conf import settings
 
-<<<<<<< HEAD
 from organization.magazine.views import *
 
+_slash = "/" if settings.APPEND_SLASH else ""
 
 urlpatterns = [
-    url(r'^article/$', ArticleListView.as_view(), name="magazine-article-list"),
-    url(r'^article/detail/(?P<slug>.*)/$', ArticleDetailView.as_view(), name="magazine-article-detail"),
-=======
-
-urlpatterns = [
+    # url(r'^article/$', ArticleListView.as_view(), name="magazine-article-list"),
+    # url(r'^article/detail/(?P<slug>.*)/$', ArticleDetailView.as_view(), name="magazine-article-detail"),
 
->>>>>>> 0f089a57b9482bec7a88f169e5d5fe2688c538c4
+    url("^article/$", ArticleListView.as_view(), name="magazine-article-list"),
+    url("^article/detail/(?P<slug>.*)%s$" % _slash, ArticleDetailView.as_view(), name="magazine-article-detail"),
 ]
index c3dc0f4637aa4dfbd6c7790ee6b25487a2c0e537..aa7d6ec2bcbd926090a0bb9fd93c8c5d9a49f330 100644 (file)
@@ -1,4 +1,7 @@
 from django.shortcuts import render
+from django.utils import timezone
+from django.views.generic import DetailView, ListView, TemplateView
+
 from organization.magazine.models import Article
 from organization.core.views import SlugMixin
 
@@ -13,20 +16,30 @@ class ArticleDetailView(SlugMixin, DetailView):
         context = super(ArticleDetailView, self).get_context_data(**kwargs)
         return context
 
+class ArticleListView(SlugMixin, ListView):
+
+    model = Article
+    template_name='magazine/article/article_list.html'
+    # context_object_name = 'article'
+
+    def get_context_data(self, **kwargs):
+        context = super(ArticleListView, self).get_context_data(**kwargs)
+        return context
+
 
-def blog_post_detail(request, slug, year=None, month=None, day=None,
-                     template="blog/blog_post_detail.html",
-                     extra_context=None):
-    """. Custom templates are checked for using the name
-    ``blog/blog_post_detail_XXX.html`` where ``XXX`` is the blog
-    posts's slug.
-    """
-    blog_posts = BlogPost.objects.published(
-                                     for_user=request.user).select_related()
-    blog_post = get_object_or_404(blog_posts, slug=slug)
-    related_posts = blog_post.related_posts.published(for_user=request.user)
-    context = {"blog_post": blog_post, "editable_obj": blog_post,
-               "related_posts": related_posts}
-    context.update(extra_context or {})
-    templates = [u"blog/blog_post_detail_%s.html" % str(slug), template]
-    return TemplateResponse(request, templates, context)
+def blog_post_detail(request, slug, year=None, month=None, day=None,
+                     template="blog/blog_post_detail.html",
+                     extra_context=None):
+    """. Custom templates are checked for using the name
+    ``blog/blog_post_detail_XXX.html`` where ``XXX`` is the blog
+    posts's slug.
+    """
+    blog_posts = BlogPost.objects.published(
+                                     for_user=request.user).select_related()
+    blog_post = get_object_or_404(blog_posts, slug=slug)
+    related_posts = blog_post.related_posts.published(for_user=request.user)
+    context = {"blog_post": blog_post, "editable_obj": blog_post,
+               "related_posts": related_posts}
+    context.update(extra_context or {})
+    templates = [u"blog/blog_post_detail_%s.html" % str(slug), template]
+    return TemplateResponse(request, templates, context)
diff --git a/app/templates/festival/artist_detail.html b/app/templates/festival/artist_detail.html
new file mode 100644 (file)
index 0000000..95ca5cd
--- /dev/null
@@ -0,0 +1,43 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags featured_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/festival/artist_list.html b/app/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/festival/inc/artist_card.html b/app/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/festival/inc/audio_playlist.html b/app/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/festival/inc/video_card.html b/app/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/festival/video_detail.html b/app/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/festival/video_list.html b/app/templates/festival/video_list.html
new file mode 100644 (file)
index 0000000..f951aa2
--- /dev/null
@@ -0,0 +1,30 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags featured_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/templates/magazine/article/article_detail.html b/app/templates/magazine/article/article_detail.html
new file mode 100644 (file)
index 0000000..66ad853
--- /dev/null
@@ -0,0 +1,147 @@
+{% extends "magazine/article/article_list.html" %}
+{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n disqus_tags featured_tags %}
+
+{% block meta_title %}{{ article.meta_title }}{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% keywords_for article as tags %}
+{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block meta_description %}{% metablock %}
+{{ article.description }}
+{% endmetablock %}{% endblock %}
+
+{% block title %}
+{% editable article.title %}{{ article.title }}{% endeditable %}
+{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+<li class="active">{{ article.title }}</li>
+{% endblock %}
+
+{% block main %}
+{% block blog_post_detail_postedby %}
+{% editable article.publish_date %}
+<h6 class="post-meta">
+    {% trans "published on" %} {{ article.publish_date|date:"DATE_FORMAT" }}
+</h6>
+{% endeditable %}
+{% endblock %}
+{% block blog_post_detail_commentlink %}
+<p>
+    {% if article.allow_comments %}
+        {% if settings.COMMENTS_DISQUS_SHORTNAME %}
+            (<a href="{{ article.get_absolute_url }}#disqus_thread"
+                data-disqus-identifier="{% disqus_id_for article %}">{% spaceless %}
+                {% trans "Comments" %}
+            {% endspaceless %}</a>)
+        {% else %}(<a href="#comments">{% spaceless %}
+            {% blocktrans count comments_count=article.comments_count %}{{ comments_count }} comment{% plural %}{{ comments_count }} comments{% endblocktrans %}
+            {% endspaceless %}</a>)
+        {% endif %}
+    {% endif %}
+</p>
+{% endblock %}
+
+{% comment %}
+{% block blog_post_detail_featured_image %}
+{% if settings.BLOG_USE_FEATURED_IMAGE and article.featured_image %}
+<p><img class="img-responsive" src="{{ MEDIA_URL }}{% thumbnail article.featured_image 600 0 %}"></p>
+{% endif %}
+{% endblock %}
+{% endcomment %}
+
+{% if settings.COMMENTS_DISQUS_SHORTNAME %}
+{% include "generic/includes/disqus_counts.html" %}
+{% endif %}
+
+{% block blog_post_detail_content %}
+{% editable article.content %}
+{{ article.content|richtext_filters|safe }}
+{% endeditable %}
+{% endblock %}
+
+{% block blog_post_detail_keywords %}
+{% keywords_for article as tags %}
+{% if tags %}
+{% spaceless %}
+<ul class="list-inline tags">
+    <li>{% trans "Tags" %}:</li>
+    {% for tag in tags %}
+    <li><a href="{% url "blog_post_list_tag" tag.slug %}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}</li>
+    {% endfor %}
+</ul>
+{% endspaceless %}
+{% endif %}
+{% endblock %}
+
+{% comment %}
+{% block blog_post_detail_rating %}
+<div class="panel panel-default rating">
+    <div class="panel-body">
+    {% rating_for article %}
+    </div>
+</div>
+{% endblock %}
+{% endcomment %}
+
+{% block event_detail_sharebuttons %}
+  {% with article as object %}
+    {% include "includes/share_buttons.html" %}
+  {% endwith %}
+{% endblock %}
+
+{% block blog_post_previous_next %}
+<ul class="pager">
+{% with article.get_previous_by_publish_date as previous %}
+{% if previous %}
+<li class="previous">
+    <a href="{{ previous.get_absolute_url }}">&larr; {{ previous }}</a>
+</li>
+{% endif %}
+{% endwith %}
+{% with article.get_next_by_publish_date as next %}
+{% if next %}
+<li class="next">
+    <a href="{{ next.get_absolute_url }}">{{ next }} &rarr;</a>
+</li>
+{% endif %}
+{% endwith %}
+</ul>
+{% endblock %}
+
+
+{% block blog_post_detail_related_posts %}
+{% if related_posts or article.events.all %}
+<div id="related-posts">
+<h3>{% trans "Also discover" %}</h3>
+ <div class="msry__container">
+    <div class="msry__sizer"></div>
+    {% for post in related_posts %}
+        {% include 'blog/includes/post_card.html' %}
+    {% endfor %}
+    {% for event in article.events.all|no_parents %}
+        {% for artist in event.artists.all %}
+            {% include "festival/inc/artist_card.html" %}
+        {% endfor %}
+        {% for video in event.videos.all %}
+            {% include 'festival/inc/video_card.html' %}
+        {% endfor %}
+        {% for post in event.blog_posts.all %}
+          {% if post != article %}
+            {% include 'blog/includes/post_card.html' %}
+          {% endif %}
+        {% endfor %}
+    {% endfor %}
+ </div>
+</div>
+{% endif %}
+{% endblock %}
+
+{% block blog_post_detail_comments %}
+{% if article.allow_comments %}{% comments_for article %}{% endif %}
+{% endblock %}
+
+{% endblock %}
diff --git a/app/templates/magazine/article/article_list.html b/app/templates/magazine/article/article_list.html
new file mode 100644 (file)
index 0000000..c9db077
--- /dev/null
@@ -0,0 +1,106 @@
+{% extends "base.html" %}
+{% load i18n mezzanine_tags blog_tags keyword_tags disqus_tags %}
+
+{% block meta_title %}{% if page %}{{ page.meta_title }}{% else %}{% trans "Articles" %}{% endif %}{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% keywords_for page as keywords %}
+{% for keyword in keywords %}
+    {% if not forloop.first %}, {% endif %}
+    {{ keyword }}
+{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block meta_description %}{% metablock %}
+{{ page.description }}
+{% endmetablock %}{% endblock %}
+
+{% block title %}
+{% if page %}
+{% editable page.title %}{{ page.title }}{% endeditable %}
+{% else %}
+{% trans "Articles" %}
+{% endif %}
+{% endblock %}
+
+{% block breadcrumb_menu %}
+{{ block.super }}
+{% if tag or category or year or month or author %}
+<li>{% spaceless %}
+{% if tag %}
+    {% trans "Tag:" %} {{ tag }}
+{% else %}{% if category %}
+    {% trans "Category:" %} {{ category }}
+{% else %}{% if year or month %}
+    {% if month %}{{ month }}, {% endif %}{{ year }}
+{% else %}{% if author %}
+    {% trans "Author:" %} {{ author.get_full_name|default:author.username }}
+{% endif %}{% endif %}{% endif %}{% endif %}
+{% endspaceless %}
+</li>
+{% endif %}
+{% endblock %}
+
+{% block main %}
+
+{% comment %}
+{% if tag or category or year or month or author %}
+    {% block blog_post_list_filterinfo %}
+    <p>
+    {% if tag %}
+        {% trans "Viewing posts tagged" %} {{ tag }}
+    {% else %}{% if category %}
+        {% trans "Viewing posts for the category" %} <a href="{% url "blog_post_list_category" category.slug %}">{{ category }}</a>
+    {% else %}{% if year or month %}
+        {% trans "Viewing posts from" %} {% if month %}{{ month }}, {% endif %}
+        {{ year }}
+    {% else %}{% if author %}
+        {% trans "Viewing posts by" %}
+        {{ author.get_full_name|default:author.username }}
+    {% endif %}{% endif %}{% endif %}{% endif %}
+    {% endblock %}
+    </p>
+{% else %}
+{% endcomment %}
+{% if page %}
+{% if page.get_content_model.content %}
+    {% editable page.get_content_model.content %}
+    {{ page.get_content_model.content|richtext_filters|safe }}
+    {% endeditable %}
+{% endif %}
+{% else %}
+    {% blog_categories as categories %}
+    {% if categories %}
+    <ul class="list-inline tag-cloud">
+    {% for cat in categories %}
+     <li>
+      <a href="{% url "blog_post_list_category" cat.slug %}" {% if category == cat %}class="is-active"{% endif %}>{{ cat }}</a> ({{ cat.post_count }})
+     </li>
+    {% endfor %}
+    </ul>
+    <br/>
+    {% endif %}
+{# {% endif %}#}
+
+{% endif %}
+
+<div class="msry__container">
+  <div class="msry__sizer"></div>
+
+  {% for article in article_list %}
+  {% with article as post %}
+       {# <span>{% trans "Article" %}</span>#}
+       {% include 'magazine/article/includes/post_card.html' %}
+  {% endwith %}
+  {% endfor %}
+</div>
+
+{% if settings.COMMENTS_DISQUS_SHORTNAME %}
+{% include "generic/includes/disqus_counts.html" %}
+{% endif %}
+
+{% endblock %}
+
+{% block right_panel %}
+{% include "blog/includes/filter_panel.html" %}
+{% endblock %}
diff --git a/app/templates/magazine/article/includes/post_card.html b/app/templates/magazine/article/includes/post_card.html
new file mode 100644 (file)
index 0000000..a920575
--- /dev/null
@@ -0,0 +1,19 @@
+{% load i18n pages_tags mezzanine_tags %}
+
+<div class="article__item {% if not on_home %}msry__item {% endif %}">
+    <div class="article__item__inner">
+        <a {% if article.content|removetags:"p"|slice:"4" == 'http' %}href="{{ article.content|removetags:'p' }}" target="_blank"{% else %}href="{% url 'magazine-article-detail' article.slug %}"{% endif %} class="article__item__inner">
+            {% if article.featured_image %}
+            <figure class="article__item__img">
+                <img src="{{ MEDIA_URL }}{% thumbnail article.featured_image 500 0 %}" alt="Article: {{ article.title }}">
+            </figure>
+            {% endif %}
+            <h3 class="article__item__name">
+                <span>
+                    {{ article.title }}
+                </span>
+            </h3>
+            {# <span class="article__item__date">{% trans "published on" %} {{ article.publish_date|date:"DATE_FORMAT" }}</span>#}
+        </a>
+    </div>
+</div>
diff --git a/app/templates/templates/festival/artist_detail.html b/app/templates/templates/festival/artist_detail.html
deleted file mode 100644 (file)
index 95ca5cd..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags featured_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
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/templates/templates/festival/inc/artist_card.html b/app/templates/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/templates/templates/festival/inc/audio_playlist.html b/app/templates/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/templates/templates/festival/inc/video_card.html b/app/templates/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/templates/templates/festival/video_detail.html b/app/templates/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/templates/templates/festival/video_list.html b/app/templates/templates/festival/video_list.html
deleted file mode 100644 (file)
index f951aa2..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags featured_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/templates/templates/magazine/article/article_detail.html b/app/templates/templates/magazine/article/article_detail.html
deleted file mode 100644 (file)
index 038899f..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-{% extends "blog/blog_post_list.html" %}
-{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n disqus_tags featured_tags %}
-
-{% block meta_title %}{{ blog_post.meta_title }}{% endblock %}
-
-{% block meta_keywords %}{% metablock %}
-{% keywords_for blog_post as tags %}
-{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %}
-{% endmetablock %}{% endblock %}
-
-{% block meta_description %}{% metablock %}
-{{ blog_post.description }}
-{% endmetablock %}{% endblock %}
-
-{% block title %}
-{% editable blog_post.title %}{{ blog_post.title }}{% endeditable %}
-{% endblock %}
-
-{% block breadcrumb_menu %}
-{{ block.super }}
-<li class="active">{{ blog_post.title }}</li>
-{% endblock %}
-
-{% block main %}
-coucou
-{% block blog_post_detail_postedby %}
-{% editable blog_post.publish_date %}
-<h6 class="post-meta">
-    {% trans "published on" %} {{ blog_post.publish_date|date:"DATE_FORMAT" }}
-</h6>
-{% endeditable %}
-{% endblock %}
-{% block blog_post_detail_commentlink %}
-<p>
-    {% if blog_post.allow_comments %}
-        {% if settings.COMMENTS_DISQUS_SHORTNAME %}
-            (<a href="{{ blog_post.get_absolute_url }}#disqus_thread"
-                data-disqus-identifier="{% disqus_id_for blog_post %}">{% spaceless %}
-                {% trans "Comments" %}
-            {% endspaceless %}</a>)
-        {% else %}(<a href="#comments">{% spaceless %}
-            {% blocktrans count comments_count=blog_post.comments_count %}{{ comments_count }} comment{% plural %}{{ comments_count }} comments{% endblocktrans %}
-            {% endspaceless %}</a>)
-        {% endif %}
-    {% endif %}
-</p>
-{% endblock %}
-
-{% comment %}
-{% block blog_post_detail_featured_image %}
-{% if settings.BLOG_USE_FEATURED_IMAGE and blog_post.featured_image %}
-<p><img class="img-responsive" src="{{ MEDIA_URL }}{% thumbnail blog_post.featured_image 600 0 %}"></p>
-{% endif %}
-{% endblock %}
-{% endcomment %}
-
-{% if settings.COMMENTS_DISQUS_SHORTNAME %}
-{% include "generic/includes/disqus_counts.html" %}
-{% endif %}
-
-{% block blog_post_detail_content %}
-{% editable blog_post.content %}
-{{ blog_post.content|richtext_filters|safe }}
-{% endeditable %}
-{% endblock %}
-
-{% block blog_post_detail_keywords %}
-{% keywords_for blog_post as tags %}
-{% if tags %}
-{% spaceless %}
-<ul class="list-inline tags">
-    <li>{% trans "Tags" %}:</li>
-    {% for tag in tags %}
-    <li><a href="{% url "blog_post_list_tag" tag.slug %}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}</li>
-    {% endfor %}
-</ul>
-{% endspaceless %}
-{% endif %}
-{% endblock %}
-
-{% comment %}
-{% block blog_post_detail_rating %}
-<div class="panel panel-default rating">
-    <div class="panel-body">
-    {% rating_for blog_post %}
-    </div>
-</div>
-{% endblock %}
-{% endcomment %}
-
-{% block event_detail_sharebuttons %}
-  {% with blog_post as object %}
-    {% include "includes/share_buttons.html" %}
-  {% endwith %}
-{% endblock %}
-
-{% block blog_post_previous_next %}
-<ul class="pager">
-{% with blog_post.get_previous_by_publish_date as previous %}
-{% if previous %}
-<li class="previous">
-    <a href="{{ previous.get_absolute_url }}">&larr; {{ previous }}</a>
-</li>
-{% endif %}
-{% endwith %}
-{% with blog_post.get_next_by_publish_date as next %}
-{% if next %}
-<li class="next">
-    <a href="{{ next.get_absolute_url }}">{{ next }} &rarr;</a>
-</li>
-{% endif %}
-{% endwith %}
-</ul>
-{% endblock %}
-
-
-{% block blog_post_detail_related_posts %}
-{% if related_posts or blog_post.events.all %}
-<div id="related-posts">
-<h3>{% trans "Also discover" %}</h3>
- <div class="msry__container">
-    <div class="msry__sizer"></div>
-    {% for post in related_posts %}
-        {% include 'blog/includes/post_card.html' %}
-    {% endfor %}
-    {% for event in blog_post.events.all|no_parents %}
-        {% for artist in event.artists.all %}
-            {% include "festival/inc/artist_card.html" %}
-        {% endfor %}
-        {% for video in event.videos.all %}
-            {% include 'festival/inc/video_card.html' %}
-        {% endfor %}
-        {% for post in event.blog_posts.all %}
-          {% if post != blog_post %}
-            {% include 'blog/includes/post_card.html' %}
-          {% endif %}
-        {% endfor %}
-    {% endfor %}
- </div>
-</div>
-{% endif %}
-{% endblock %}
-
-{% block blog_post_detail_comments %}
-{% if blog_post.allow_comments %}{% comments_for blog_post %}{% endif %}
-{% endblock %}
-
-{% endblock %}