home.html 1.62 KB
Newer Older
fred's avatar
fred committed
1
2
3
4
5
6
7
8
9
10
{% extends "base.html" %}

{% block content %}

{% for emission in emissions %}
<h2>{{ emission.title }}</h2>


<a class="big-friendly-button" href="{% url 'episode-add' emission_slug=emission.slug %}">Ajouter un épisode</a>

fred's avatar
fred committed
11
<a class="big-friendly-button" href="{% url 'emission-newsitem-add' emission_slug=emission.slug %}">Ajouter une actu</a>
fred's avatar
fred committed
12

fred's avatar
fred committed
13
<a class="big-friendly-button" href="{% url 'emission-update' slug=emission.slug %}">Modifier l'émission</a>
fred's avatar
fred committed
14
15
16
17

<h4>Épisodes récents</h4>

<ul class="episode-list">
fred's avatar
fred committed
18
{% for episode in emission.get_sorted_episodes|slice:":10" %}
fred's avatar
fred committed
19
20
21
22
23
24
25
<li>{{ episode.diffusion_set.all.0.datetime|date:"d E o H:i"|lower }}
<br/>   <a href="{% url 'episode-view' emission_slug=emission.slug slug=episode.slug %}">{{ episode.title }}</a>
{% if episode.has_sound %}<span class="icon-music"/>{%endif%}
</li>
{% endfor %}
</ul>

fred's avatar
fred committed
26
27
28
29
30
31
32
<h4>Actus récentes</h4>

<ul class="episode-list">
{% for newsitem in emission.get_sorted_newsitems|slice:":10" %}
<li>{{ newsitem.datetime|date:"d E o H:i"|lower }}
<a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
</li>
fred's avatar
fred committed
33
34
{% empty %}
Aucune actu.
fred's avatar
fred committed
35
36
{% endfor %}
</ul>
fred's avatar
fred committed
37
38
39

{% endfor %}

fred's avatar
fred committed
40
41
42
43
44
45
46
47
48
49
50
51
52
{% for news_category in news_categories %}
<h2>{{ news_category.title }}</h2>

<a class="big-friendly-button" href="{% url 'newsitem-add' slug=news_category.slug %}">Ajouter une actu</a>

<ul class="episode-list">
{% for newsitem in news_category.get_sorted_newsitems|slice:":10" %}
<li>{{ newsitem.datetime|date:"d E o H:i"|lower }}
<a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
</li>
{% endfor %}
</ul>

fred's avatar
fred committed
53
54
{% empty %}
Aucune actu.
fred's avatar
fred committed
55
56
{% endfor %}

fred's avatar
fred committed
57
{% endblock %}