url(r'^newsletter/', include('newsletter.urls')),
+ url(r'^archives/$', 'panikweb.views.archives', name='espe-archives'),
+
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
)
template_name = 'chat.html'
chat = cache_control(max_age=15)(Chat.as_view())
+
+
+
+class ArchivesView(TemplateView):
+ template_name = 'archives.html'
+
+ def get_context_data(self, **kwargs):
+ context = super(ArchivesView, self).get_context_data(**kwargs)
+ context['diffusions'] = Diffusion.objects.all().order_by('-datetime')
+ return context
+
+archives = ArchivesView.as_view()
a:hover img {
display: none;
}
+
+ &.archives {
+ width: 100%;
+ a {
+ width: 12.5%;
+ height: 12.5vw;
+ }
+ }
+}
+
+h2.archives {
+ text-align: center;
+}
+
+div.emission-episodes.archive::after {
+ content: "";
+ display: block;
+}
+
+p.archives-sorry {
+ clear: both;
+ padding: 3rem;
+ text-align: center;
}
div#Playlist {
--- /dev/null
+{% extends "base.html" %}
+{% load thumbnail %}
+
+{% block title %}Archives{% endblock %}
+
+{% block toptitle %}
+<h1 class="top">Archives</h1>
+{% endblock %}
+
+{% block main %}
+
+{% regroup diffusions by datetime|date:"Y" as diffusions_by_year %}
+{% for diffusion_group in diffusions_by_year %}
+<h2 class="archives">{{ diffusion_group.grouper }}</h2>
+ <div class="archives emission-episodes">
+{% for diffusion in diffusion_group.list %}
+ <a href="{% url 'episode-view' emission_slug=diffusion.episode.emission.slug slug=diffusion.episode.slug %}">
+ <div class="image">
+ {% thumbnail diffusion.episode.image "400x400" crop="50% 50%" as im %}
+ <img src="{{im.url}}">
+ {% endthumbnail %}
+ </div>
+ <div class="name"><span>{{ diffusion.episode.title }}</span></div>
+ </a>
+{% endfor %}
+ </div>
+{% endfor %}
+
+<p class="archives-sorry">
+Malheureusement les archives des années antérieures ne sont pour le moment plus
+disponibles, on espère bientôt pouvoir au moins remonter jusque 2010…
+</p>
+
+{% endblock %}
</p>
<p><a href="{% url 'podcasts-feed' %}">S'abonner aux podcasts</a></p>
<p>
- Éditions précédentes :
- <a href="http://radio.esperanzah.be/e/2016">2016</a> •
- <a href="http://radio.esperanzah.be/e/2015">2015</a> •
- <a href="http://radio.esperanzah.be/e/2014">2014</a> •
- <a href="http://radio.esperanzah.be/e/2013">2013</a> •
- <a href="http://radio.esperanzah.be/e/2012">2012</a> •
- <a href="http://radio.esperanzah.be/e/2011">2011</a> •
- <a href="http://radio.esperanzah.be/e/2010">2010</a>
+ <a href="{% url 'espe-archives' %}">Archives des éditions précédentes</a>
</p>
<p>
<a href="mailto:radio@esperanzah.be">Contact</a>