add sound item in diffusions; move programs.Sound's attribute 'remove' into the type + update its public attribute based on diffusion publication

This commit is contained in:
bkfox
2016-07-28 16:21:01 +02:00
parent 502af1dba0
commit 801a89e503
9 changed files with 123 additions and 31 deletions

View File

@ -30,6 +30,17 @@
</ul>
</div>
{% with podcasts=self.get_podcasts %}
{% if podcasts %}
<div class="podcasts list">
<h2>{% trans "Podcasts" %}</h2>
{% for item in podcasts %}
{% include 'cms/snippets/sound_list_item.html' %}
{% endfor %}
</div>
{% endif %}
{% endwith %}
{# TODO: podcasts #}
{% endblock %}

View File

@ -0,0 +1,13 @@
{% load static %}
{# TODO: complete archive podcast -> info #}
<a class="list_item sound" onclick="player.playlist.add(new Sound(
title='{{ item.name|escape }}',
detail='{{ item.detail_url }}',
stream='{% static item.path %}'));">
<h3>{{ item.name }}</h3>
<span class="info">
{{ duration.date|date:'H:i:s' }}
</span>
</a>