]> git.0d.be Git - panikdb.git/blobdiff - panikdb/templates/emissions/episode_detail.html
disable "recording" for now
[panikdb.git] / panikdb / templates / emissions / episode_detail.html
index 32d0ba489a71d94377f67f0433b2b0ad8b710df4..33cfa1d7739af3e9ea8cd3677905bdde571997e2 100644 (file)
 {% if perms.emissions.add_diffusion %}
 <a class="button" href="add-diffusion" rel="popup">Ajouter une diffusion</a>
 {% endif %}
-<a class="button" id="add-soundfile-link" href="#">Ajouter un son</a>
+<a class="button" href="add-soundfile" rel="popup">Ajouter un son</a>
 {% if episode.effective_start and episode.effective_end %}
   {% if internal_ip %}
   <a class="button" id="download-recording" download href="{{ episode.get_pige_download_url }}">Télécharger l'enregistrement</a>
   {% endif %}
-{% elif not soundfiles %}
+{% elif not soundfiles and 0 %}
   {% if episode.effective_start %}
     <a class="button" id="stop-recording" href="stop">Arrêter l'enregistrement</a>
   {% else %}
@@ -64,11 +64,25 @@ Tags :
 <ul>
 {% for diffusion in diffusions %}
 <li>{{ diffusion.datetime }}
-{% if can_manage and perms.emissions.delete_diffusion %}
+{% if can_manage and perms.emissions.delete_diffusion and not diffusion|is_already_in_soma %}
 <a href="diffusion/{{ diffusion.id }}/remove" class="icon-remove-sign" title="Retirer"></a>
 {% endif %}
-{% if soundfiles and perms.nonstop.add_track and diffusion.datetime|date:"Y-m-d H:i" > now and not diffusion|is_already_in_soma %}
-<a href="{% url 'nonstop-add-diffusion' pk=diffusion.id %}">[programmer dans soma]</a>
+{% if diffusion.datetime|date:"Y-m-d H:i" > now and has_soma %}
+  {% if soundfiles|integral and perms.nonstop.add_track %}
+  {% if not diffusion|is_already_in_soma %}
+  <a href="{% url 'nonstop-add-diffusion' pk=diffusion.id %}">[programmer dans soma]</a>
+  {% else %}
+  (diffusion déjà programmée dans soma)
+  <!-- diffusion/{{ diffusion.id }}/remove -->
+  {% endif %}
+  {% endif %}
+  {% if not soundfiles|integral and perms.nonstop.add_streameddiffusion %}
+    {% if not diffusion|is_already_in_soma %}
+    <a rel="popup" href="{% url 'nonstop-add-streamed-diffusion' pk=diffusion.id %}">[programmer stream dans soma]</a>
+    {% else %}
+    (stream déjà programmé dans soma)
+    {% endif %}
+  {% endif %}
 {% endif %}
 </li>
 {% endfor %}
@@ -107,7 +121,7 @@ Tags :
                class="icon-remove-sign" rel="popup" title="Retirer"></a></td>{% endif %}
 {% if perms.emissions.add_focus %}
 <td>
-{% if soundfile.has_focus %}
+{% if soundfile|has_focus %}
 ✓ <a class="icon-pushpin" href="{{ soundfile|unset_focus_url }}">retirer</a>
 {% else %}
   {% if soundfile.format %}
@@ -120,25 +134,12 @@ Tags :
 </tbody>
 </table>
 
-<form id="add-soundfile-form" action="add-soundfile" method="POST" style="display: none;">
-{% csrf_token %}
-{{ add_soundfile_form.as_p }}
-<button>Ajouter ce son</button>
-<button class="cancel">Annuler</button>
-</form>
-
 {% endblock %}
 
 
 {% block page-end %}
 <script>
 $(function() {
-  $('#add-soundfile-link').click(
-    function() {
-      $('#id_title').parent().hide();
-      $('#add-soundfile-form').dialog({modal: true, title: 'Son', width: 'auto'});
-    });
-
   $('.image img').click(function() { $(this).toggleClass('large'); });
 
   $('#id_fragment').change(function() {
@@ -149,10 +150,6 @@ $(function() {
     }
   });
 
-  $('button.cancel').click(function() {
-    $(this).parent().dialog('close');
-    return false;
-  });
 });
 </script>
 {% endblock %}