From 009ba5729fe87ac6dc0ec7b9548b158c3c1f6f8f Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 5 Nov 2025 11:58:11 -0500 Subject: [PATCH] Don't allow adding domains on subprojects --- .../theme/templates/projects/domain_list.html | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/readthedocsext/theme/templates/projects/domain_list.html b/readthedocsext/theme/templates/projects/domain_list.html index ee0d228d..15eae7bb 100644 --- a/readthedocsext/theme/templates/projects/domain_list.html +++ b/readthedocsext/theme/templates/projects/domain_list.html @@ -1,6 +1,6 @@ {% extends "projects/project_edit_base.html" %} -{% load trans from i18n %} +{% load trans blocktrans from i18n %} {% block title %} {{ project.name }} - {% trans "Domains" %} @@ -23,8 +23,24 @@ {% endcomment %} {% if not enabled %} {% include "organizations/includes/feature_disabled.html" with project=project plan="Advanced" %} + {% elif project.superproject %} +
+ +
+
{% trans "Custom domains managed by superproject" %}
+

+ {% url "projects_detail" project.superproject.slug as superproject_url %} + {% url "projects_domains" project.superproject.slug as superproject_domains_url %} + {% blocktrans trimmed with superproject_url=superproject_url superproject_domains_url=superproject_domains_url superproject_name=project.superproject.name %} + This project is a subproject of + {{ superproject_name }}. + Custom domains must be added on the superproject. + {% endblocktrans %} +

+
+
{% endif %} -
+
{% include "projects/partials/edit/domain_list.html" with objects=object_list %}
{% endblock project_edit_content %}