]> git.0d.be Git - panikweb.git/blob - panikweb/templates/combo/soundscell.html
353616bc9bf360afeb309f4d9c5ace1fef1bd39d
[panikweb.git] / panikweb / templates / combo / soundscell.html
1 {% load i18n paniktags static thumbnail %}
2 {% if cell.placeholder == 'sidebar' or sidebar %}
3   <h3 class="sectionLabel right">
4     <a href="{% url 'listenArchives' %}"><span class="iconLabel">Tous</span></a>
5   </h3>
6   <h3 class="sectionLabel">{% if cell.title %}{{ cell.title }}{% else %}{% trans 'Latest Sounds' %}{% endif %}
7           <a class="button icon-rss inBlock" href="{% url 'podcasts-feed' %}"></a></h3>
8
9   {% if include_search_input %}
10   <form action="{% url 'listenArchives' %}" id="search-form">
11     <input id="id_q" name="q" type="text" {% if search_query %}value="{{ search_query }}"{% endif %}>
12     <button class="icon-search"><span class="sr-only">{% trans "Search" %}</span></button>
13   </form>
14   {% endif %}
15
16   <ul class="custom list">
17     {% with count_s=count|stringformat:"s" %}
18     {% with slice_count=":"|add:count_s %}
19     {% for soundfile in soundfiles|slice:slice_count %}
20       <li class="item">
21         {% soundfile_resume soundfile=soundfile date=soundfile.first_diffusion %}
22       </li>
23     {% endfor %}
24     {% endwith %}
25     {% endwith %}
26   </ul>
27 {% else %}
28   <h3 class="sectionLabel">{% firstof title cell.title %}</h3>
29
30   <ul class="custom padded main-flex">
31   {% for soundfile in soundfiles %}
32     <li class="soundfile frontpage">
33       <div class="content content-inline cf special">
34         <a class="block cf" href="{% url 'episode-view' emission_slug=soundfile.episode.emission.slug slug=soundfile.episode.slug %}">
35           <div class="label labels absolute">
36             <span class="item inBlock">{{ soundfile.format.title }}</span>
37           </div>
38           <div class="big logo">
39             {% if soundfile.episode.image %}
40             {% thumbnail soundfile.episode.image "480x320" crop="50% 25%" as im %}
41             <img class="normal" src="{{im.url}}"/>
42             {% endthumbnail %}
43             {% elif soundfile.episode.emission.image %}
44             {% thumbnail soundfile.episode.emission.image "480x320" crop="50% 25%" as im %}
45             <img class="normal" src="{{im.url}}"/>
46             {% endthumbnail %}
47             {% else %}
48             <img class="normal" src="{% static "img/sound.png" %}"/>
49             {% endif %}
50           </div>
51           <div class="content">
52             {% if soundfile.fragment and soundfile.title %}
53             <h5 class="title">{{ soundfile.title }}</h5>
54             {% endif %}
55             <h5 class="title">{{ soundfile.episode.title }}</h5>
56             <h5 class="title">{{ soundfile.episode.emission.title }}</h5>
57             <div class="description">
58               {{ soundfile.episode.text|safe|striptags|truncatewords:20}}
59             </div>
60             {% if soundfile.first_diffusion %}
61               <div class="smooth">{{ soundfile.first_diffusion|date:"d/m/Y" }}</div>
62             {% endif %}
63           </div>
64         </a>
65         {% audio sound=soundfile %}
66       </div>
67     </li>
68   {% endfor %}
69   </ul>
70
71 {% endif %}