--- /dev/null
+{% load i18n paniktags %}
+ <h3 class="sectionLabel right">
+ <a href="{% url 'listenArchives' %}"><span class="iconLabel">Tous</span></a>
+ </h3>
+ <h3 class="sectionLabel">{% trans 'Latest Sounds' %} <a
+ class="button icon-rss inBlock" href="{% url 'podcasts-feed' %}"></a></h3>
+
+ {% if include_search_input %}
+ <form action="{% url 'listenArchives' %}" id="search-form">
+ <input id="id_q" name="q" type="text" {% if search_query %}value="{{ search_query }}"{% endif %}>
+ <button class="icon-search"><span class="sr-only">{% trans "Search" %}</span></button>
+ </form>
+ {% endif %}
+
+ <ul class="custom list">
+ {% with count_s=count|stringformat:"s" %}
+ {% with slice_count=":"|add:count_s %}
+ {% for soundfile in soundfiles|slice:slice_count %}
+ <li class="item">
+ {% soundfile_resume soundfile=soundfile date=soundfile.first_diffusion %}
+ </li>
+ {% endfor %}
+ {% endwith %}
+ {% endwith %}
+ </ul>
{% if soundfiles %}
<div id="recent-sounds">
- <h3 class="sectionLabel right"><a href="{% url 'listenArchives' %}">Tous</a></h3>
- <h3 class="sectionLabel"><a href="{% url 'listen' %}">{% trans 'Latest Sounds' %}</a> <a class="button icon-rss inBlock" href="{% url 'podcasts-feed' %}"></a></h3>
- <ul class="custom list">
- {% for soundfile in soundfiles %}
- <li class="item {% for category in soundfile.episode.emission.categories.all %} {{ category|slugify }}{% endfor %}">
- {% soundfile_resume soundfile=soundfile date=soundfile.first_diffusion %}
- </li>
- {% endfor %}
- </ul>
+ {% include "combo/soundscell.html" with include_search_input=False count=3 %}
</div>
{% endif %}
</div>
<div class="rightPart">
<div class="sub">
- <h5 class="sectionLabel right">
- <a href="{% url 'listenArchives' %}"><span class="iconLabel">Tous</span></a>
- </h5>
- <h5 class="sectionLabel">{% trans 'Latest Sounds' %} <a
- class="button icon-rss inBlock" href="{% url 'podcasts-feed' %}"></a></h5>
-
- <form action="{% url 'listenArchives' %}" id="search-form">
- <input id="id_q" name="q" type="text" {% if search_query %}value="{{ search_query }}"{% endif %}>
- <button class="icon-search"><span class="sr-only">{% trans "Search" %}</span></button>
- </form>
-
- <ul class="custom list soundfilesList">
- {% for soundfile in soundfiles|slice:":20" %}
- <li class="item">
- {% soundfile_resume soundfile=soundfile date=soundfile.first_diffusion %}
- </li>
- {% endfor %}
- </ul>
+ {% include "combo/soundscell.html" with include_search_input=True count=20 %}
</div>
</div>
</div>