]> git.0d.be Git - django-panik-emissions.git/blob - emissions/templates/emissions/episode_detail.html
2cc0d0086c8b346c866fe0ee729195281873911d
[django-panik-emissions.git] / emissions / templates / emissions / episode_detail.html
1 {% extends "base.html" %}
2 {% load soundfiles %}
3
4 {% block appbar %}
5 <h2>{{ episode.emission.title }} — {{ episode.title }}</h2>
6 <span><a href="../">Retourner à l'émission</a></span>
7 {% endblock %}
8
9 {% block content %}
10
11 {% if can_manage %}
12 <p>
13 <a class="button" href="edit/">Modifier</a>
14 {% if perms.emissions.add_diffusion %}
15 <a class="button" href="add-diffusion" rel="popup">Ajouter une diffusion</a>
16 {% endif %}
17 <a class="button" href="add-soundfile" rel="popup">Ajouter un son</a>
18 {% if episode.effective_start and episode.effective_end %}
19   {% if internal_ip %}
20   <a class="button" id="download-recording" download href="{{ episode.get_pige_download_url }}">Télécharger l'enregistrement</a>
21   {% endif %}
22 {% elif not soundfiles %}
23   {% if episode.effective_start %}
24     <a class="button" id="stop-recording" href="stop">Arrêter l'enregistrement</a>
25   {% else %}
26     <a class="button" id="start-recording" href="start">Démarrer l'enregistrement</a>
27   {% endif %}
28 {% endif %}
29 <a class="button actually-not-that-friendly" rel="popup" href="delete/">Supprimer</a>
30 </p>
31 {% endif %}
32
33 {% if episode.subtitle %}
34 <div class="description">
35 {{ episode.subtitle|safe }}
36 </div>
37 {% endif %}
38
39 {% if episode.image %}
40 <div class="image">
41   <img src="{{ episode.image.url }}"/>
42 </div>
43 {% endif %}
44
45 {% if episode.text %}
46 <div class="text">
47 {{ episode.text|safe }}
48 </div>
49 {% endif %}
50
51 {% if episode.tags.all %}
52 <p>
53 Tags :
54 {% for tag in episode.tags.all %}
55   <span class="tag">{{ tag }}</span>{% if not forloop.last %}, {% endif %}
56 {% endfor %}
57 </p>
58 {% endif %}
59
60
61 <h3>Diffusions</h3>
62
63 <ul>
64 {% for diffusion in diffusions %}
65 <li>{{ diffusion.datetime }}
66 {% if can_manage %}
67 <a href="diffusion/{{ diffusion.id }}/remove" class="icon-remove-sign" title="Retirer"></a>
68 {% endif %}
69 </li>
70 {% endfor %}
71 </ul>
72
73 <h3>Sons</h3>
74
75 <table id="soundfiles">
76 <thead>
77 <tr>
78  <th>Fichier</th>
79  <th>Titre</th>
80  <th>Format</th>
81  <th>Podcastable?</th>
82  <th>Fragment?</th>
83  {% if can_manage %}<th>Modifier</th>{% endif %}
84  {% if can_manage %}<th>Supprimer</th>{% endif %}
85 </thead>
86 <tbody>
87 {% for soundfile in soundfiles %}
88 <tr>
89 <td><a href="{{ soundfile.file.url }}">{{ soundfile|sound_filename }}</a></td>
90 <td>{{ soundfile.title }}</td>
91 <td>{{ soundfile.format }}</td>
92 <td>{{ soundfile.podcastable }}</td>
93 <td>{{ soundfile.fragment }}</td>
94 {% if can_manage %}<td><a href="sounds/{{ soundfile.id }}/"
95                 class="icon-edit" title="Modifier"></a></td>{% endif %}
96 {% if can_manage %}<td><a href="sounds/{{ soundfile.id }}/remove"
97                 class="icon-remove-sign" title="Retirer"></a></td>{% endif %}
98 {% endfor %}
99 </tbody>
100 </table>
101
102 {% endblock %}
103
104
105 {% block page-end %}
106 <script>
107 $(function() {
108   $('.image img').click(function() { $(this).toggleClass('large'); });
109 });
110 </script>
111 {% endblock %}