]> git.0d.be Git - panikdb.git/blob - panikdb/templates/home.html
30ca5f7802d6ac12044f679cb0a0a9ba2a7823ab
[panikdb.git] / panikdb / templates / home.html
1 {% extends "base.html" %}
2
3 {% block bodyargs %}class="home"{% endblock %}
4
5 {% block appbar %}
6 <h2>Émissions</h2>
7 {% if perms.emissions.change_emission %}
8 <span class="actions">
9 <a href="{% url 'emission-list' %}">Toutes les émissions</a>
10 <a href="{% url 'news-list' %}">Toutes les actus</a>
11 {% if perms.emissions.add_emission %}
12 <a href="{% url 'emission-add' %}">Nouvelle émission</a>
13 {% endif %}
14 </span>
15 {% endif %}
16 {% endblock %}
17
18 {% block more-user-links %}
19 {{ block.super }}
20 <a class="icon-wiki" href="/wiki/">Wiki</a>
21 <a class="icon-forums" href="https://forums.radiopanik.org/">Forums</a>
22 <a class="icon-members" href="{% url 'members-list-view' %}">Annuaire des membres</a>
23 {% if perms.nonstop.add_track %}
24 <a class="icon-music" href="{% url 'nonstop-quick-links' %}">Gestion nonstop</a>
25 {% endif %}
26 {% if perms.data.add_page %}
27 <a class="icon-cms" href="{% url 'combo-manager-homepage' %}">Pages éditoriales</a>
28 {% endif %}
29 {% if perms.newsletter.add_newsletter %}
30 <a class="icon-newsletter" href="{% url 'newsletter-list' %}">Newsletters</a>
31 {% endif %}
32 <a target="blank" href="http://stats.radiopanik.org/index.php?module=Login&action=logme&login=panikdb&password=d48fb8e3a453d965901339e6b020538f" class="icon-bar-chart">Statistiques</a>
33 {% endblock %}
34
35 {% block content %}
36
37 {% if display_poll_button %}
38 <!--
39 <div class="poll">
40         <a href="{% url 'vote' %}">Sondage Logo !</a>
41 </div>
42 -->
43 {% endif %}
44
45 {% for emission in emissions %}
46 <div class="emission block">
47 <h3><a href="{% url 'emission-view' slug=emission.slug %}">{{ emission.title }}</a></h3>
48
49 <a class="button" href="{% url 'episode-add' emission_slug=emission.slug %}">Ajouter un épisode</a>
50
51 <a class="button" href="{% url 'emission-newsitem-add' emission_slug=emission.slug %}">Ajouter une actu</a>
52
53 <a class="button" href="{% url 'emission-update' slug=emission.slug %}">Modifier le profil de l'émission</a>
54
55 <div class="two-columns">
56
57 <div>
58 <h4>Épisodes récents</h4>
59
60 <ul class="episode-list">
61 {% for episode in emission.get_sorted_episodes|slice:":5" %}
62 <li>{{ episode.diffusion_set.all.0.datetime|date:"d E o H:i"|lower }}
63 <br/>   <a href="{% url 'episode-view' emission_slug=emission.slug slug=episode.slug %}">{{ episode.title }}</a>
64 {% if episode.has_sound %}<span class="icon-music"/>{%endif%}
65 </li>
66 {% endfor %}
67 </ul>
68 </div>
69
70 <div>
71 <h4>Actus récentes</h4>
72
73 <ul class="episode-list">
74 {% for newsitem in emission.get_sorted_newsitems|slice:":5" %}
75 <li>{{ newsitem.date|date:"d E o"|lower }}
76 <a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
77 </li>
78 {% empty %}
79 Aucune actu.
80 {% endfor %}
81 </ul>
82 </div>
83
84 </div> <!-- .two-columns -->
85
86 <hr/>
87 </div>
88 {% endfor %}
89
90
91 {% for news_category in news_categories %}
92 <div class="newsitems block">
93 <h3>Actu : {{ news_category.title }}</h3>
94
95 <a class="button" href="{% url 'newsitem-add' slug=news_category.slug %}">Ajouter une actu</a>
96
97 <ul class="episode-list">
98 {% for newsitem in news_category.get_sorted_newsitems|slice:":10" %}
99 <li>{{ newsitem.date|date:"d E o"|lower }}
100 <a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
101 </li>
102 {% empty %}
103 Aucune actu.
104 {% endfor %}
105 </ul>
106 <hr/>
107 </div>
108 {% endfor %}
109
110 {% if perms.emissions.add_focus %}
111 <div class="newsitems block">
112 <h3>Épisodes récemment édités</h3>
113
114 <ul class="episode-list">
115 {% for episode in recent_episodes|slice:":20" %}
116 <li>{{ episode.last_update_timestamp|date:"d E o H:i"|lower }}
117 <a href="{% url 'emission-view' slug=episode.emission.slug %}">{{ episode.emission.title }}</a> /
118     <a href="{% url 'episode-view' slug=episode.slug emission_slug=episode.emission.slug %}">{{ episode.title }}</a>
119 </li>
120 {% endfor %}
121 </ul>
122 </div>
123
124 <div class="newsitems block">
125 <h3>Actus récemment éditées</h3>
126
127 <ul class="episode-list">
128 {% for newsitem in recent_newsitems|slice:":20" %}
129 <li>{{ newsitem.last_update_timestamp|date:"d E o H:i"|lower }}
130 <a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
131 </li>
132 {% endfor %}
133 </ul>
134 </div>
135
136 <div class="newsitems block">
137 <h3>Sons récemment édités</h3>
138
139 <ul class="episode-list">
140 {% for soundfile in recent_soundfiles|slice:":20" %}
141 <li>{{ soundfile.last_update_timestamp|date:"d E o H:i"|lower }}
142 <a href="{% url 'emission-view' slug=soundfile.episode.emission.slug %}">{{ soundfile.episode.emission.title }}</a> /
143 <a href="{% url 'episode-view' slug=soundfile.episode.slug emission_slug=soundfile.episode.emission.slug %}">{{ soundfile.episode.title }}</a>
144 {% if soundfile.fragment %} ({{soundfile.title}}){% endif %}
145 </li>
146 {% endfor %}
147 </ul>
148 </div>
149
150 {% endif %}
151
152 {% endblock %}
153
154 {% block sidebar %}
155 <aside id="sidebar">
156
157 <div class="block program" data-url="{% url 'nonstop-ajax-program' date='' %}">
158 <h3>Au programme</h3>
159 <div></div>
160 <script>
161 $(function() {
162   $('.block.program').each(function() {
163     var url = $(this).data('url');
164     $(this).find('> div').load(url);
165   });
166 });
167 </script>
168 </div>
169
170 {% if perms.emissions.add_focus %}
171 <div class="newsitems block">
172 <h3>Focus</h3>
173
174 <ul class="episode-list">
175 {% for focus in focused_items %}
176 <li>
177   {% if focus.emission %}
178     <a href="{% url 'emission-view' slug=focus.emission.slug %}">[ÉMISSON] {{ focus.emission.title }}</a>
179   {% elif focus.episode %}
180     <a href="{% url 'episode-view' slug=focus.episode.slug emission_slug=focus.episode.emission.slug %}">[ÉPISODE] {{ focus.episode.title }}</a>
181   {% elif focus.newsitem %}
182     <a href="{% url 'newsitem-view' slug=focus.newsitem.slug %}">[ACTU] {{ focus.newsitem.title }}</a>
183   {% elif focus.soundfile %}
184     <a href="{% url 'episode-view' slug=focus.soundfile.episode.slug emission_slug=focus.soundfile.episode.emission.slug %}">[SON] {{ focus.soundfile.episode.title }}</a>
185   {% elif focus.page %}
186     <a href="{% url 'combo-manager-page-view' pk=focus.page.id %}">[TOPIK] {{focus.page.title }}</a>
187   {% endif %}
188 </li>
189 {% endfor %}
190 </ul>
191 </div>
192 {% endif %}
193
194
195
196 </aside>
197 {% endblock %}
198
199 {% block page-end %}
200
201 <script>
202 $(document).ready(function() {
203   $('#other-emissions').click(function() {
204      $('#other-emissions-list').toggle('blind');
205   });
206   document.cookie = 'panikdb=on; domain=.radiopanik.org';
207 });
208 </script>
209 {% endblock %}