]> git.0d.be Git - panikdb.git/commitdiff
settings: add flag to enable/disable soma support
authorFrédéric Péters <fpeters@0d.be>
Mon, 6 Jan 2020 11:40:25 +0000 (12:40 +0100)
committerFrédéric Péters <fpeters@0d.be>
Mon, 6 Jan 2020 11:40:25 +0000 (12:40 +0100)
panikdb/context_processors.py
panikdb/settings.py
panikdb/templates/emissions/episode_detail.html

index 08e7008377f323581e0ff55aa63db1cd5ae44dce..ed18da3c63a0b548d46d618f4911fea69f882c14 100644 (file)
@@ -10,4 +10,5 @@ def site_settings(request):
     return {
         'enable_topiks': settings.ENABLE_TOPIKS,
         'site_title': settings.SITE_TITLE,
+        'has_soma': settings.HAS_SOMA,
     }
index 7f32673eb414967bf10608e84c54a0d18d177633..7733e43033820eda99b92830f9b42ebd713e35f1 100644 (file)
@@ -263,6 +263,7 @@ FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755
 FILE_UPLOAD_PERMISSIONS = 0o644
 
 ENABLE_TOPIKS = True
+HAS_SOMA = False
 SITE_TITLE = 'PanikDB'
 
 try:
index 0962ef01dc0897f136883d8b6b764a280ff8b501..48a6aa1a295a94cc41f406cdbce0d91d2aaac9eb 100644 (file)
@@ -68,12 +68,14 @@ Tags :
 <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 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 %}
 {% endif %}
 </li>
 {% endfor %}