Commit 799b4ec6 authored by fred's avatar fred

include nonstop playlist links in week view

parent 2c191c6d
...@@ -143,9 +143,13 @@ class NonstopPlaylistView(TemplateView): ...@@ -143,9 +143,13 @@ class NonstopPlaylistView(TemplateView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(NonstopPlaylistView, self).get_context_data(**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')), context['date'] = date(int(kwargs.get('year')),
int(kwargs.get('month')), int(kwargs.get('day'))) int(kwargs.get('month')), int(kwargs.get('day')))
context['future'] = (context['date'] >= date.today())
nonstop_object = Nonstop.objects.get(slug=kwargs.get('slug')) nonstop_object = Nonstop.objects.get(slug=kwargs.get('slug'))
start = datetime( start = datetime(
......
...@@ -1995,3 +1995,7 @@ div#chat.moderation .msg-in span.from:hover::after { ...@@ -1995,3 +1995,7 @@ div#chat.moderation .msg-in span.from:hover::after {
content: "\f056"; content: "\f056";
font-size: 80%; font-size: 80%;
} }
div.programCell a.playlist {
font-size: 80%;
}
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
{% elif cell.emission %} {% elif cell.emission %}
{% with cell.emission as emission %}{% emission_resume %}{% endwith %} {% with cell.emission as emission %}{% emission_resume %}{% endwith %}
{% else %} {% 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 %} {% endif %}
</div> </div>
</li> </li>
......
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
{% endfor %} {% endfor %}
</table> </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"> <p class="playlist-disclaimer">
N.B. Débordements d'émissions et autres manifestations N.B. Débordements d'émissions et autres manifestations
radiophoniques spontanées peuvent amener cette liste à ne pas être 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