Commit 900d0e4b authored by fred's avatar fred

simplify diffusion links as changing options afterwards is always possible

parent 091fa97e
......@@ -66,33 +66,28 @@ Tags :
{% for diffusion in diffusions %}
<li>{{ diffusion.datetime }}
{% if has_auto_schedule and diffusion|is_already_in_soma %}
{% if can_manage %}
<a rel="popup" href="{% url 'nonstop-diffusion-properties' pk=diffusion.scheduleddiffusion_set.first.id %}">[options de diffusion]</a>
<a href="diffusion/{{ diffusion.id }}/remove" class="icon-remove-sign" title="Retirer"></a>
{% endif %}
{% elif has_soma and diffusion|is_already_in_soma %}
{% if soundfiles|integral %}(diffusion programmée)
{% else %}
(stream programmé)
{% if can_manage and perms.nonstop.add_streameddiffusion and diffusion.end_datetime|date:"Y-m-d H:i" > s_now %}
<a href="{% url 'nonstop-del-diffusion' pk=diffusion.id %}">[supprimer stream]</a>
{% if has_soma %}
{% if diffusion|is_already_in_soma %}
{% if soundfiles|integral %}(diffusion programmée){% else %}(stream programmé){% endif %}
{% if can_manage %}
<a rel="popup" href="{% url 'nonstop-diffusion-properties' pk=diffusion.scheduleddiffusion_set.first.id %}">[options de diffusion]</a>
{% if perms.nonstop.add_streameddiffusion and not soundfiles|integral and diffusion.end_datetime|date:"Y-m-d H:i" > s_now %}
<a href="{% url 'nonstop-del-diffusion' pk=diffusion.id %}">[supprimer stream]</a>
{% endif %}
{% endif %}
{% endif %}
{% if can_manage %}
<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 %}
<a rel="popup" href="{% url 'nonstop-add-diffusion' pk=diffusion.id %}">[programmer la diffusion]</a>
{% elif can_manage %}
{% if diffusion.datetime|date:"Y-m-d H:i" > s_now and soundfiles|integral %}
<a rel="popup" href="{% url 'nonstop-add-diffusion' pk=diffusion.id %}">[programmer la diffusion]</a>
{% endif %}
{% endif %}
{% if has_soma and diffusion.end_datetime|date:"Y-m-d H:i" > s_now %}
{% if forloop.first and not soundfiles|integral and perms.nonstop.add_streameddiffusion %}
<a rel="popup" href="{% url 'nonstop-add-diffusion' pk=diffusion.id %}">[programmer un stream]</a>
{% if perms.nonstop.add_streameddiffusion and diffusion.end_datetime|date:"Y-m-d H:i" > s_now %}
{% if forloop.first and not soundfiles|integral %}
<a rel="popup" href="{% url 'nonstop-add-diffusion' pk=diffusion.id %}">[programmer un stream]</a>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if can_manage %}
<a href="diffusion/{{ diffusion.id }}/remove" class="icon-remove-sign" title="Retirer"></a>
{% endif %}
</li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment