newscategory_list.html 963 Bytes
Newer Older
fred's avatar
fred committed
1
2
3
4
5
6
7
8
9
10
11
12
13
{% extends "base.html" %}

{% block appbar %}
{% if user.is_staff %}
<span><a href="{% url 'emission-list' %}">Toutes les émissions</a>
-
<a href="{% url 'news-list' %}">Toutes les actus</a></span>
{% endif %}
{% endblock %}

{% block content %}
<h2>Actus</h2>

fred's avatar
fred committed
14
15
16
17
18
19
{% if perms.emissions.add_newsitem %}
<p>
<a class="big-friendly-button" href="{% url 'newsitem-add' %}">Ajouter une actu</a>
</p>
{% endif %}

fred's avatar
fred committed
20
{% for category in object_list %}
fred's avatar
fred committed
21
<div class="newsitems">
fred's avatar
fred committed
22
23
24
<h3>{{ category.title }}</h3>

<ul class="newsitem-list">
25
{% for newsitem in category.get_sorted_newsitems %}
fred's avatar
fred committed
26
27
28
29
<li><a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a></li>
{% endfor %}
</ul>

fred's avatar
fred committed
30
31
<hr/>
</div>
fred's avatar
fred committed
32
33
{% endfor %}

fred's avatar
fred committed
34
<div class="newsitems">
fred's avatar
fred committed
35
36
37
38
39
40
41
<h3>Actus non rangées</h3>

<ul class="newsitem-list">
{% for newsitem in unsorted_newsitems %}
<li><a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a></li>
{% endfor %}
</ul>
fred's avatar
fred committed
42
</div>
fred's avatar
fred committed
43
44

{% endblock %}