]> git.0d.be Git - panikdb.git/commitdiff
add link to add diffusion to soma
authorFrédéric Péters <fpeters@0d.be>
Sat, 31 Mar 2018 12:25:55 +0000 (14:25 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sat, 31 Mar 2018 12:25:55 +0000 (14:25 +0200)
panikdb/templates/emissions/episode_detail.html

index 160d080197cd6eb836e28e936fe40ac4d91297d2..776d80110e60aea48a0a8649b7266177307fa0c4 100644 (file)
@@ -1,5 +1,5 @@
 {% extends "base.html" %}
-{% load soundfiles panikdbtags %}
+{% load soundfiles panikdbtags nonstop %}
 {% block appbar %}
 <h2>{{ episode.emission.title }} — {{ episode.title }}</h2>
 <span><a href="../">Retourner à l'émission</a></span>
@@ -48,12 +48,17 @@ Tags :
 
 <h3>Diffusions</h3>
 
+{% now "Y-m-d H:i" as now %}
+
 <ul>
 {% for diffusion in diffusions %}
 <li>{{ diffusion.datetime }}
 {% if can_manage and perms.emissions.delete_diffusion %}
 <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>
+{% endif %}
 </li>
 {% endfor %}
 </ul>