- {% if not soundfiles|integral and perms.nonstop.add_streameddiffusion %}
- {% if not diffusion|is_already_in_soma %}
+ {# removal limited to staff as this will not remove from soma #}
+ {% if user.is_staff %}<a href="diffusion/{{ diffusion.id }}/remove" class="icon-remove-sign" title="Retirer"></a>{% endif %}
+{% elif can_manage %}
+ {% if has_soma and diffusion.datetime|date:"Y-m-d H:i" > s_now %}
+ {% if soundfiles|integral and perms.nonstop.add_track %}
+ <a rel="popup" href="{% url 'nonstop-add-diffusion' pk=diffusion.id %}">[programmer dans soma]</a>
+ {% elif not soundfiles|integral and perms.nonstop.add_streameddiffusion %}