Commit 5861e6bb authored by Simon Daron's avatar Simon Daron

Make unique episode resume with inline & resume

parent 23c77766
......@@ -25,14 +25,6 @@ def episode_resume(context, date=None, model=None, klass=None):
'date': date,
}
@register.inclusion_tag('episodes/inline.html', takes_context=True)
def episode_inline(context, date=None, klass=None):
return {
'class': klass,
'episode': context.get('episode'),
'date': date,
}
@register.inclusion_tag('emissions/detail.html', takes_context=True)
def emission_detail(context, date=None):
return {
......
{% load thumbnails %}
{% load paniktags %}
<div class="episode episode-inline inline cf ellipsis ">
<div class="date dateBloc left small {{ class }}">
<div class="day">
{{ episode.first_diffusion|date:"D"|slice:":2"}}
</div>
<div class="number">
{{ episode.first_diffusion|date:"d" }}
</div>
{% if date != "daytime" %}
<div class="month">
{{ episode.first_diffusion|date:"M Y" }}
</div>
{% endif %}
<div class="time">
{{ episode.first_diffusion|date:"H:i" }}
</div>
</div>
{% if episode.image %}
<div class="logo right">
<img width="50" height="50" src="{{ episode.image|thumbnail:'50x50' }}"/>
</div>
{% endif %}
<div class="content">
<a class="block" href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">
{% if class = "standalone" %}
<h5 class="title ellipsis smooth">{{ episode.emission.title }}</h5>
{% endif %}
<h5 class="title ellipsis">{{ episode.title }}</h5>
{% if episode.description %}
<div class="description ellipsis">
{{ episode.description|safe|striptags }}
</div>
{% elif episode.text %}
<div class="description ellipsis">
{{ episode.text|safe|striptags|truncatewords:20}}
</div>
{% endif %}
</a>
{% if episode.tagList %}
<ul class="custom inline">
{% for tag in episode.tagList %}
<li><button class="tag">{{ tag }}</button></li>
{% endfor %}
</ul>
{% endif %}
{% if episode.main_sound %}
<div class="sound">
{% audio sound=episode.main_sound %}
</div>
{% endif %}
</div>
</div>
......@@ -6,7 +6,7 @@
<ul class="custom columns list">
{% for episode in episodes %}
<li class="item">
{% episode_inline klass="standalone"%}
{% episode_resume model="inline" klass="standalone"%}
</li>
{% endfor %}
</ul>
......
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