]> git.0d.be Git - panikweb.git/blob - panikweb/templates/combo/soundscell.html
0044b1d3da3df1c1256e8e7a5ae72b13305d85a2
[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   {% with count_s=count|stringformat:"s" %}
32   {% with slice_count=":"|add:count_s %}
33   {% for soundfile in soundfiles|slice:slice_count %}
34     <li class="soundfile frontpage">
35       <div class="content content-inline cf special">
36         <a class="block cf" href="{% url 'episode-view' emission_slug=soundfile.episode.emission.slug slug=soundfile.episode.slug %}">
37           <div class="label labels absolute">
38             <span class="item inBlock">{{ soundfile.format.title }}</span>
39           </div>
40           <div class="big logo">
41             {% if soundfile.episode.image %}
42             {% thumbnail soundfile.episode.image "480x320" crop="50% 25%" as im %}
43             <img class="normal" src="{{im.url}}"/>
44             {% endthumbnail %}
45             {% elif soundfile.episode.emission.image %}
46             {% thumbnail soundfile.episode.emission.image "480x320" crop="50% 25%" as im %}
47             <img class="normal" src="{{im.url}}"/>
48             {% endthumbnail %}
49             {% else %}
50             <img class="normal" src="{% static "img/sound.png" %}"/>
51             {% endif %}
52           </div>
53           <div class="content">
54             {% if soundfile.fragment and soundfile.title %}
55             <h5 class="title">{{ soundfile.title }}</h5>
56             {% endif %}
57             <h5 class="title">{{ soundfile.episode.title }}</h5>
58             <h5 class="title">{{ soundfile.episode.emission.title }}</h5>
59             <div class="description">
60               {{ soundfile.episode.text|safe|striptags|truncatewords:20}}
61             </div>
62             {% if soundfile.first_diffusion %}
63               <div class="smooth">{{ soundfile.first_diffusion|date:"d/m/Y" }}</div>
64             {% endif %}
65           </div>
66         </a>
67         {% audio sound=soundfile %}
68       </div>
69     </li>
70   {% endfor %}
71   {% endwith %}
72   {% endwith %}
73   </ul>
74
75 {% endif %}