From b59301e7d07ed57bd0446226d67a98aabc5dbd81 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 16 2017 09:19:02 +0000 Subject: Hide the ``+`` button on the index page when it is disabled in the UI We have logic in the master template and in the actual controller to disable the ``+`` button at the top and the endpoint to create new project when the pagure instance is configured to not allow project creation. Fixes https://pagure.io/pagure/issue/2769 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/index_auth.html b/pagure/templates/index_auth.html index d1568fe..7abb7f0 100644 --- a/pagure/templates/index_auth.html +++ b/pagure/templates/index_auth.html @@ -24,7 +24,8 @@
My Projects {{repos | count}} - {% if config.get('ENABLE_NEW_PROJECTS', True) and repos %} + {% if config.get('ENABLE_NEW_PROJECTS', True) and + config.get('ENABLE_UI_NEW_PROJECTS', True) and repos %}
You have no projects
- {% if config.get('ENABLE_NEW_PROJECTS', True) %} + {% if config.get('ENABLE_NEW_PROJECTS', True) and + config.get('ENABLE_UI_NEW_PROJECTS', True) %}