week.html 1.81 KB
Newer Older
Simon Daron's avatar
Simon Daron committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{% if not fragment or fragment = "nav" %}
<div class="program tabs" data-tab-about="#weekProgramContent-{{ week|slugify }}">
	<nav class="">
		<ul class="days custom distributed">
		{% for day in days %}
			<li class=""><button data-tab="#Program-week-{{ day.datetime|slugify }}">{{ day.datetime|date:"D d" }}</button></li>
		{% endfor %}
		</ul>
	</nav>
</div>
{% endif %}
{% if not fragment or fragment = "program" %}
<div id="weekProgramContent-{{ week|slugify }}" class="program wrapper">
	{% for day in days %}
	<div data-tabbed="true" class="content padded" id="Program-week-{{ day.datetime|slugify }}">
		<ul class="custom emission-list list">
		{% if day.cells %}
		{% for cell in day.cells %}
Simon Daron's avatar
Simon Daron committed
19
20
			<li class="ellipsis" >
				<strong>{{ cell.datetime|date:"H:i" }}</strong>&nbsp;-&nbsp;
Simon Daron's avatar
Simon Daron committed
21
22
				{% if cell.episode %}
					<a href="{% url 'episode-view' emission_slug=cell.episode.emission.slug slug=cell.episode.slug %}">
Simon Daron's avatar
Simon Daron committed
23
24
25
26
27
28
						<span>{{ cell.episode.emission.title }}&nbsp;-&nbsp;{{ cell.episode.title }}</span>
						{% if cell.episode.description %}
							|<span class="smooth">&nbsp;-&nbsp;{{ cell.episode.description|safe|striptags|truncatewords:50 }}</span>
						{% elif cell.episode.emission.description %}
							|<span class="smooth">&nbsp;-&nbsp;{{ cell.episode.emission.description|safe|striptags|truncatewords:50 }}</span>
						{% endif %}
Simon Daron's avatar
Simon Daron committed
29
30
31
					</a>
				{% elif cell.emission %}
					<a href="{% url 'emission-view' slug=cell.emission.slug %}">
Simon Daron's avatar
Simon Daron committed
32
33
34
35
						<span>{{ cell.emission.title }}</span>
						{% if  cell.emission.description %}
							<span class="smooth">&nbsp;-&nbsp;{{ cell.emission.description|safe|striptags|truncatewords:50 }}</span>
						{% endif %}
Simon Daron's avatar
Simon Daron committed
36
37
38
39
40
41
42
43
44
45
46
47
					</a>
				{% endif %}
			</li>
		{% endfor %}
		{% else %}
			<li><div class="info">Non stop only!</div></li>
		{% endif %}
		</ul>
	</div>
	{% endfor %}
</div>
{% endif %}