From f7204b1a0e0c87951a17dae9906c20924a313aa9 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Nov 28 2016 16:31:02 +0000 Subject: [frontend] allow hiding "quick enable" helper --- diff --git a/frontend/coprs_frontend/config/copr.conf b/frontend/coprs_frontend/config/copr.conf index 46f321b..d0e896f 100644 --- a/frontend/coprs_frontend/config/copr.conf +++ b/frontend/coprs_frontend/config/copr.conf @@ -102,3 +102,6 @@ BLACKLISTED_GROUPS = ['fedorabugs', 'packager', 'provenpackager'] REDIS_HOST = "127.0.0.1" REDIS_PORT = 6379 + +# Hide page parts not relevant to this Copr instance: +# LAYOUT_OVERVIEW_HIDE_QUICK_ENABLE = False diff --git a/frontend/coprs_frontend/config/copr_devel.conf b/frontend/coprs_frontend/config/copr_devel.conf index 9d0f181..c28720a 100644 --- a/frontend/coprs_frontend/config/copr_devel.conf +++ b/frontend/coprs_frontend/config/copr_devel.conf @@ -60,3 +60,6 @@ SRPM_STORAGE_DIR = "/var/lib/copr/data/srpm_storage" # no need to filter cla_* groups, they are already filtered by fedora openid BLACKLISTED_GROUPS = ['fedorabugs', 'packager', 'provenpackager'] + +# Hide page parts not relevant to this Copr instance: +# LAYOUT_OVERVIEW_HIDE_QUICK_ENABLE = False diff --git a/frontend/coprs_frontend/coprs/config.py b/frontend/coprs_frontend/coprs/config.py index 65134e3..765cb94 100644 --- a/frontend/coprs_frontend/coprs/config.py +++ b/frontend/coprs_frontend/coprs/config.py @@ -56,6 +56,8 @@ class Config(object): SRPM_STORAGE_DIR = "/var/lib/copr/data/srpm_storage/" + LAYOUT_OVERVIEW_HIDE_QUICK_ENABLE = False + 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 470a453..a215b6f 100644 --- a/frontend/coprs_frontend/coprs/templates/coprs/detail/overview.html +++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/overview.html @@ -130,6 +130,8 @@ {% endif %} + + {% if not config.LAYOUT_OVERVIEW_HIDE_QUICK_ENABLE %}

Quick Enable

@@ -142,6 +144,8 @@ More info about enabling Copr repositories
+ {% endif %} + {% if g.user and g.user.can_edit(copr) and copr and copr.owner and not copr.auto_createrepo %}