Commit b9241031 authored by Simon Daron's avatar Simon Daron
Browse files

show only first months in episodes list

parent c0eeeab6
...@@ -31,13 +31,18 @@ ...@@ -31,13 +31,18 @@
</div> </div>
{% if episodes %} {% if episodes %}
<div data-tabbed="true" id="Emission-tabs-episodes" class="episodes"> <div data-tabbed="true" id="Emission-tabs-episodes" class="episodes">
{% with episodes|slice:"1:11" as episodes %} {% with episodes as episodes %}
{% regroup episodes by first_diffusion|date:"F Y"|capfirst as month_list %} {% regroup episodes by first_diffusion|date:"F Y"|capfirst as month_list %}
<div> <div>
{% for month in month_list %} {% for month in month_list %}
<div class="monthGroup {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}"> <div class="monthGroup {% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}">
<div class="legend">{{ month.grouper }}</div> <div
<ul class="custom list"> class="legend button"
onclick="$('#{{ month.grouper|slugify }}').toggle();"
>{{ month.grouper }}</div>
<ul class="custom list" id="{{ month.grouper|slugify }}"
{% if forloop.counter >= 3 %}style="display:none;"{% endif %}
>
{% for episode in month.list %} {% for episode in month.list %}
<li>{% episode_resume model="inline" date="daytime" %}</li> <li>{% episode_resume model="inline" date="daytime" %}</li>
{% endfor %} {% endfor %}
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</li> </li>
<li> <li>
<button data-tab="#Emission-tabs-episodes"> <button data-tab="#Emission-tabs-episodes">
<span class="iconLabel">Episodes</span> <span class="iconLabel">Episodes ({{ episodes.count }})</span>
</button > </button >
</li> </li>
</ul> </ul>
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
{% if episode.image %} {% if episode.image %}
<div class="logo right"> <div class="logo right">
{% if model = "inline" %} {% if model = "inline" %}
<img width="50" height="50" src="{{ episode.image|thumbnail:'50x50' }}"/> <img src="{{ episode.image|thumbnail:'75x75' }}"/>
{% else %} {% else %}
<img width="100" height="100" src="{{ episode.image|thumbnail:'100x100' }}"/> <img src="{{ episode.image|thumbnail:'150x150' }}"/>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
......
Supports Markdown
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