1 {% extends "base.html" %}
2 {% load soundfiles panikdbtags %}
4 <h2>{{ episode.emission.title }} — {{ episode.title }}</h2>
5 <span><a href="../">Retourner à l'émission</a></span>
12 <a class="big-friendly-button" href="edit/">Modifier</a>
13 {% if perms.emissions.add_diffusion %}
14 <a class="big-friendly-button" id="add-diffusion-link" href="#">Ajouter une diffusion</a>
16 <a class="big-friendly-button" id="add-soundfile-link" href="#">Ajouter un son</a>
17 <a class="big-friendly-button actually-not-that-friendly" href="delete/">Supprimer</a>
21 {% if episode.subtitle %}
22 <div class="description">
23 {{ episode.subtitle|safe }}
27 {% if episode.image %}
29 <img src="{{ episode.image.url }}"/>
35 {{ episode.text|safe }}
39 {% if episode.tags.all %}
42 {% for tag in episode.tags.all %}
43 <span class="tag">{{ tag }}</span>{% if not forloop.last %}, {% endif %}
52 {% for diffusion in diffusions %}
53 <li>{{ diffusion.datetime }}
55 <a href="diffusion/{{ diffusion.id }}/remove" class="icon-remove-sign" title="Retirer"></a>
61 <form id="add-diffusion-form" action="add-diffusion" method="POST" style="display: none;">
63 {{ add_diffusion_form.as_p }}
64 <input type="submit" value="Ajouter cet horaire"/>
65 <button class="cancel">Annuler</button>
72 <table id="soundfiles">
81 {% if can_manage %}<th>Modifier</th>{% endif %}
82 {% if can_manage %}<th>Supprimer</th>{% endif %}
83 {% if perms.emissions.add_focus %}<th>Focus</th>{% endif %}
86 {% for soundfile in soundfiles %}
88 <td><a href="{{ soundfile.file.url }}">{{ soundfile|sound_filename }}</a></td>
89 <td>{{ soundfile.title }}</td>
90 <td>{{ soundfile.duration|as_duration }}</td>
91 <td>{% if soundfile.format %}{{ soundfile.format }}{% else %}-{% endif %}</td>
92 <td>{% if soundfile.podcastable %}oui{% else %}non{% endif %}</td>
93 <td>{% if soundfile.fragment %}oui{% else %}non{% endif %}</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 {% if perms.emissions.add_focus %}
100 {% if soundfile.has_focus %}
101 ✓ <a class="icon-pushpin" href="{{ soundfile|unset_focus_url }}">retirer</a>
103 <a class="icon-pushpin" href="{{ soundfile|set_focus_url }}">mettre</a>
111 <form id="add-soundfile-form" action="add-soundfile" method="POST" style="display: none;">
113 {{ add_soundfile_form.as_p }}
114 <input type="submit" value="Ajouter ce son"/>
115 <button class="cancel">Annuler</button>
124 $('#add-soundfile-link').click(
126 $('#id_title').parent().hide();
127 $('#add-soundfile-form').dialog({modal: true, title: 'Son', width: 'auto'});
130 $('#add-diffusion-link').click(
132 $('#add-diffusion-form').dialog({modal: true, title: 'Horaire', width: 'auto'});
135 $('.image img').click(function() { $(this).toggleClass('large'); });
137 $('#id_fragment').change(function() {
139 $('#id_title').parent().show();
141 $('#id_title').parent().hide();
145 $('button.cancel').click(function() {
146 $(this).parent().dialog('close');