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