From f39f0e50f1f1a475003a12e5019a201785e3b758 Mon Sep 17 00:00:00 2001 From: Miroslav Suchý Date: Jul 30 2019 11:04:47 +0000 Subject: discourse integration Signed-off-by: Miroslav Suchý --- diff --git a/docker/frontend/files/etc/copr/copr.conf b/docker/frontend/files/etc/copr/copr.conf index 6bc1eaf..fb75001 100644 --- a/docker/frontend/files/etc/copr/copr.conf +++ b/docker/frontend/files/etc/copr/copr.conf @@ -128,3 +128,7 @@ OPENID_PROVIDER_URL = "https://id.fedoraproject.org" # When the data in EOL chroots should be deleted (in days) DELETE_EOL_CHROOTS_AFTER = 180 + +# enable Discourse integration +ENABLE_DISCUSSION = False +# DISCOURSE_URL = "https://discussion.fedoraproject.org/" diff --git a/frontend/coprs_frontend/config/copr.conf b/frontend/coprs_frontend/config/copr.conf index 4496b7d..dd2ed09 100644 --- a/frontend/coprs_frontend/config/copr.conf +++ b/frontend/coprs_frontend/config/copr.conf @@ -118,3 +118,7 @@ REDIS_PORT = 6379 # # Description sometimes put into template to make clear what we point to # 'user_desc': 'FAS account' # } + +# enable Discourse integration +ENABLE_DISCUSSION = False +# DISCOURSE_URL = "https://discussion.fedoraproject.org/" diff --git a/frontend/coprs_frontend/config/copr_devel.conf b/frontend/coprs_frontend/config/copr_devel.conf index e52916b..087f093 100644 --- a/frontend/coprs_frontend/config/copr_devel.conf +++ b/frontend/coprs_frontend/config/copr_devel.conf @@ -63,3 +63,7 @@ BLACKLISTED_GROUPS = ['fedorabugs', 'packager', 'provenpackager'] # Hide page parts not relevant to this Copr instance: # LAYOUT_OVERVIEW_HIDE_QUICK_ENABLE = False + +# enable Discourse integration +ENABLE_DISCUSSION = False +# DISCOURSE_URL = "https://discussion.fedoraproject.org/" diff --git a/frontend/coprs_frontend/coprs/config.py b/frontend/coprs_frontend/coprs/config.py index 8f77484..3e56df4 100644 --- a/frontend/coprs_frontend/coprs/config.py +++ b/frontend/coprs_frontend/coprs/config.py @@ -90,6 +90,8 @@ class Config(object): # How many pinned projects a user or group can have PINNED_PROJECTS_LIMIT = 4 + ENABLE_DISCUSSION = False + DISCOURSE_URL = '' class ProductionConfig(Config): DEBUG = False diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/overview.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/overview.html index de9688f..378bf3a 100644 --- a/frontend/coprs_frontend/coprs/templates/coprs/detail/overview.html +++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/overview.html @@ -81,6 +81,24 @@ {% endfor %} {% endif %} + + {% if config.ENABLE_DISCUSSION %} + {% if config.DISCOURSE_URL %} +
+ + + {% endif %} + {% endif %} +

@@ -208,4 +226,5 @@ {% endfor %} + {% endblock %}