]> git.0d.be Git - panikdb.git/blobdiff - panikdb/templates/emissions/episode_detail.html
add popup to schedule a stream
[panikdb.git] / panikdb / templates / emissions / episode_detail.html
index 48a6aa1a295a94cc41f406cdbce0d91d2aaac9eb..724008276e80bfd3cbe334d1116caa81b394f686 100644 (file)
@@ -67,8 +67,8 @@ Tags :
 {% 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|integral and perms.nonstop.add_track and diffusion.datetime|date:"Y-m-d H:i" > now %}
-  {% if has_soma %}
+{% 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 %}
@@ -76,6 +76,13 @@ Tags :
   <!-- 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 %}