From a9a0af52231509e52de17f2277eee93ba942e85c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 6 Jan 2020 12:40:25 +0100 Subject: [PATCH] settings: add flag to enable/disable soma support --- panikdb/context_processors.py | 1 + panikdb/settings.py | 1 + panikdb/templates/emissions/episode_detail.html | 2 ++ 3 files changed, 4 insertions(+) diff --git a/panikdb/context_processors.py b/panikdb/context_processors.py index 08e7008..ed18da3 100644 --- a/panikdb/context_processors.py +++ b/panikdb/context_processors.py @@ -10,4 +10,5 @@ def site_settings(request): return { 'enable_topiks': settings.ENABLE_TOPIKS, 'site_title': settings.SITE_TITLE, + 'has_soma': settings.HAS_SOMA, } diff --git a/panikdb/settings.py b/panikdb/settings.py index 7f32673..7733e43 100644 --- a/panikdb/settings.py +++ b/panikdb/settings.py @@ -263,6 +263,7 @@ FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755 FILE_UPLOAD_PERMISSIONS = 0o644 ENABLE_TOPIKS = True +HAS_SOMA = False SITE_TITLE = 'PanikDB' try: diff --git a/panikdb/templates/emissions/episode_detail.html b/panikdb/templates/emissions/episode_detail.html index 0962ef0..48a6aa1 100644 --- a/panikdb/templates/emissions/episode_detail.html +++ b/panikdb/templates/emissions/episode_detail.html @@ -68,12 +68,14 @@ Tags : {% 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 %} [programmer dans soma] {% else %} (diffusion déjà programmée dans soma) {% endif %} + {% endif %} {% endif %} {% endfor %} -- 2.39.2