Commit 799b4ec6 authored by fred's avatar fred

include nonstop playlist links in week view

parent 2c191c6d
......@@ -143,9 +143,13 @@ class NonstopPlaylistView(TemplateView):
def get_context_data(self, **kwargs):
context = super(NonstopPlaylistView, self).get_context_data(**kwargs)
context['emission'] = Emission.objects.get(slug=kwargs.get('slug'))
try:
context['emission'] = Emission.objects.get(slug=kwargs.get('slug'))
except Emission.DoesNotExist:
raise Http404()
context['date'] = date(int(kwargs.get('year')),
int(kwargs.get('month')), int(kwargs.get('day')))
context['future'] = (context['date'] >= date.today())
nonstop_object = Nonstop.objects.get(slug=kwargs.get('slug'))
start = datetime(
......
......@@ -1995,3 +1995,7 @@ div#chat.moderation .msg-in span.from:hover::after {
content: "\f056";
font-size: 80%;
}
div.programCell a.playlist {
font-size: 80%;
}
......@@ -13,7 +13,7 @@
{% elif cell.emission %}
{% with cell.emission as emission %}{% emission_resume %}{% endwith %}
{% else %}
<a href="{% url 'emission-view' slug=cell.slug %}" class="nonstop"><em>{{ cell.label }}</em></a> - <span class="smooth categories category">Musique en continu</span>
<a href="{% url 'emission-view' slug=cell.slug %}" class="nonstop"><em>{{ cell.label }}</em></a> - <span class="smooth categories category">Musique en continu</span> - <a class="playlist" href="{% url 'nonstop-playlist' slug=cell.slug year=cell.datetime.year month=cell.datetime.month day=cell.datetime.day %}">playlist</a>
{% endif %}
</div>
</li>
......
......@@ -28,6 +28,12 @@
{% endfor %}
</table>
{% if not tracks|length %}
<p>
{% if future %}Pas encore de playlist connue, à plus tard ?{% else %}Pas de playlist connue.{% endif %}
</p>
{% endif %}
<p class="playlist-disclaimer">
N.B. Débordements d'émissions et autres manifestations
radiophoniques spontanées peuvent amener cette liste à ne pas être
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment