]> git.0d.be Git - panikdb.git/blob - panikdb/emissions/templates/emissions/episode_detail.html
e7373c07d7bc7dbf51ad5d6b339060b0db4a08e7
[panikdb.git] / panikdb / emissions / templates / emissions / episode_detail.html
1 {% extends "base.html" %}
2
3 {% block appbar %}
4 <h2>{{ episode.emission.title }} — {{ episode.title }}</h2>
5 <span><a href="../">Retourner à l'émission</a></span>
6 {% endblock %}
7
8 {% block content %}
9
10 <a class="big-friendly-button" href="edit/">Modifier</a>
11
12 <a class="big-friendly-button" id="add-diffusion-link" href="#">Ajouter une diffusion</a>
13
14 <a class="big-friendly-button" id="add-soundfile-link" href="#">Ajouter un son</a></p>
15
16
17 {% if episode.description %}
18 <div class="description">
19 {{ episode.description|safe }}
20 </div>
21 {% endif %}
22
23 {% if episode.text %}
24 {{ episode.text|safe }}
25 {% endif %}
26
27 <h3>Diffusions</h3>
28
29 <ul>
30 {% for diffusion in diffusions %}
31 <li>{{ diffusion.datetime }}
32 <a href="diffusion/{{ diffusion.id }}/remove" class="icon-remove-sign" title="Retirer"></a>
33 </li>
34 {% endfor %}
35 </ul>
36
37 <form id="add-diffusion-form" action="add-diffusion" method="POST" style="display: none;">
38 {% csrf_token %}
39 {{ add_diffusion_form.as_p }}
40 <input type="submit" value="Ajouter cet horaire"/>
41 </form>
42
43
44
45 <h3>Sons</h3>
46
47 <table id="soundfiles">
48 <thead>
49 <tr>
50  <th>Fichier</th>
51  <th>Titre</th>
52  <th>Podcastable?</th>
53  <th>Fragment?</th>
54 </thead>
55 <tbody>
56 {% for soundfile in soundfiles %}
57 <tr>
58 <td><a href="{{ soundfile.file.url }}">{{ soundfile.file.name }}</a></td>
59 <td>{{ soundfile.title }}</td>
60 <td>{{ soundfile.podcastable }}</td>
61 <td>{{ soundfile.fragment }}</td>
62 {% endfor %}
63 </tbody>
64 </table>
65
66 <form id="add-soundfile-form" action="add-soundfile" method="POST" style="display: none;">
67 {% csrf_token %}
68 {{ add_soundfile_form.as_p }}
69 <input type="submit" value="Ajouter ce son"/>
70 </form>
71
72 {% endblock %}
73
74
75 {% block page-end %}
76 <script>
77 $(function() {
78   $('#add-soundfile-link').click(
79     function() {
80       $('#add-soundfile-form').dialog({modal: true, title: 'Son', width: 'auto'});
81     });
82
83   $('#add-diffusion-link').click(
84     function() {
85       $('#add-diffusion-form').dialog({modal: true, title: 'Horaire', width: 'auto'});
86     });
87 });
88 </script>
89 {% endblock %}