resume.html 2.8 KB
Newer Older
fred's avatar
fred committed
1
{% load thumbnails paniktags staticfiles %}
2 3
<div class="episode {% if model %}{{ model }}{% else %}resume{% endif %} cf {{ class }}">
	{% if date != False %}
Simon Daron's avatar
Simon Daron committed
4
	<div class="dateBloc">
5 6 7 8 9 10 11 12 13
		<div class="date">
			<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">
14
			    {{ episode.first_diffusion|date:"M y" }}
15 16 17 18 19
			</div>
			{% endif %}
			<div class="time">
			    {{ episode.first_diffusion|date:"H:i" }}
			</div>
Simon Daron's avatar
Simon Daron committed
20 21
		</div>
	</div>
22
	{% endif %}
Simon Daron's avatar
Simon Daron committed
23
	<div class="logo">
24
		<a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">
25
		{% if model = "inline" and episode.image %}
fred's avatar
fred committed
26
			<img width="60" height="60" src="{{ episode.image|thumbnail:'60x60' }}"/>
Simon Daron's avatar
Simon Daron committed
27
		{% elif model = "inline" and episode.emission.image %}
fred's avatar
fred committed
28
			<img width="60" height="60" src="{{ episode.emission.image|thumbnail:'60x60' }}"/>
29
		{% elif model = "inline" %}
30
			<img class="smooth"  style="width:60px;" src="{% static "img/emission.png" %}"/>
31 32
		{% elif episode.image %}
			<img src="{{ episode.image|thumbnail:'150x150' }}"/>
Simon Daron's avatar
Simon Daron committed
33
		{% elif episode.emission.image %}
34
			<img src="{{ episode.emission.image|thumbnail:'150x150' }}"/>
35
		{% else %}
36
			<img class="smooth" style="width:150px;" src="{% static "img/emission.png" %}"/>
37
		{% endif %}
38
		</a>
Simon Daron's avatar
Simon Daron committed
39 40
	</div>
	<div class="content">
Simon Daron's avatar
Simon Daron committed
41

42
		{% if episode.main_sound %}
Simon Daron's avatar
Simon Daron committed
43 44
			<div class="sound right">{% audio sound=episode.main_sound %}</div>
		{% endif %}
45
		<div class="title">
46
			<h5 class=" title">
47 48 49 50
				<a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">{{ episode.title }}</a>
			</h5>
			<div class="smooth metas">
			{% if class = "standalone" %}
51 52 53 54 55 56
				<h5 class="title inBlock">
					<a href="{% url 'emission-view' slug=episode.emission.slug %}">{{ episode.emission.title }}</a>
				</h5>
				{% if episode.emission.categories %}
					<span class="categories">
					{% for category in episode.emission.categories.all %}
fred's avatar
fred committed
57
						{% if forloop.counter > 1 %} - {% endif %}<span class="category">{{category}}</span>
58 59 60
					{% endfor%}
					</span>
				{% endif %}
61
			{% endif %}
62
			</div>
63 64
		</div>

65
		{% if model = "inline" %}
66 67
			<div class="description">
			<a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">
fred's avatar
fred committed
68
			{% if episode.subtitle %}
69
				{{ episode.subtitle|truncatewords:20}}
70
			{% elif episode.text %}
71
				{{ episode.text|safe|striptags|truncatewords:20}}
72
			{% endif %}
73 74
			</a>
			</div>
75
		{% else %}
fred's avatar
fred committed
76
			{% if episode.subtitle %}
Simon Daron's avatar
Simon Daron committed
77
			<article class="text userContent">
fred's avatar
fred committed
78
				{{ episode.subtitle|truncatewords:50 }}
79 80
			</article>
			{% elif episode.text %}
Simon Daron's avatar
Simon Daron committed
81
			<article class="text userContent">
82
				{{ episode.text|safe|truncatewords:50}}
83 84
			</article>
			{% endif %}
Simon Daron's avatar
Simon Daron committed
85 86 87
		{% endif %}
	</div>
</div>