diff --git a/pagure/decorators.py b/pagure/decorators.py
index bae71e1..c7d3262 100644
--- a/pagure/decorators.py
+++ b/pagure/decorators.py
@@ -37,6 +37,24 @@ def has_issue_tracker(function):
return check_issue_tracker
+def has_trackers(function):
+ """
+ Decorator that checks if the current pagure project has the
+ issue tracker active or has PRs function active
+ If not active returns a 404 page
+ """
+
+ @wraps(function)
+ def check_trackers(*args, **kwargs):
+ repo = flask.g.repo
+ if not repo.settings.get("issue_tracker", True) and \
+ not repo.settings.get("pull_requests", True):
+ flask.abort(404, "No ticket trackers found for this project")
+ return function(*args, **kwargs)
+
+ return check_trackers
+
+
def is_repo_admin(function):
"""
Decorator that checks if the current user is the admin of
diff --git a/pagure/templates/settings.html b/pagure/templates/settings.html
index 8d6eff2..77c3e69 100644
--- a/pagure/templates/settings.html
+++ b/pagure/templates/settings.html
@@ -59,8 +59,6 @@
href="#closestatus" role="tab" aria-controls="closestatus">Close Status
Custom Issue Fields
- TagsReports
{% endif %}
@@ -68,6 +66,8 @@
{% if (config.get('ENABLE_TICKETS', True)
and repo.settings.get('issue_tracker', True))
or repo.settings.get('pull_requests', True) %}
+ TagsQuick Replies
{% endif %}
@@ -896,90 +896,6 @@
-
-
- Tags
-
-
-
-
- Here is the list of tags associated with this project (Issues and Pull Requests).
-