diff --git a/plinth/modules/names/templates/names.html b/plinth/modules/names/templates/names.html index 8ad3937f9..dc3d3d727 100644 --- a/plinth/modules/names/templates/names.html +++ b/plinth/modules/names/templates/names.html @@ -28,24 +28,27 @@ {{ domain.name }} {{ domain.get_readable_services|join:', ' }} - - {% trans "Configure" %} - - - - {% endfor %} - - {% for domain_type in status.unused_domain_types %} - - {{ domain_type.display_name }} - - - - - - - {% trans "Configure" %} - + {% if domain.domain_type.configuration_url %} + + + {% trans "Configure" %} + + {% endif %} + {% if domain.domain_type.edit_url %} + + + + {% endif %} + {% if domain.domain_type.delete_url %} + + + + {% endif %} {% endfor %} @@ -53,6 +56,34 @@ +

{% trans "Add Domains" %}

+ +
+
+
+ {% for domain_type in status.unused_domain_types %} +
+
{{ domain_type.display_name }}
+ {% if domain_type.configuration_url %} + + + {% trans "Configure" %} + + {% endif %} + {% if domain_type.add_url %} + + + {% trans "Add" %} + + {% endif %} +
+ {% endfor %} +
+
+
+

{% trans "Resolver Status" %}

{% if resolved_installed and resolved_status %} diff --git a/plinth/modules/names/views.py b/plinth/modules/names/views.py index 27d3a6376..102c8b496 100644 --- a/plinth/modules/names/views.py +++ b/plinth/modules/names/views.py @@ -142,7 +142,7 @@ def get_status(): used_domain_types = {domain.domain_type for domain in domains} unused_domain_types = [ domain_type for domain_type in components.DomainType.list().values() - if domain_type not in used_domain_types + if domain_type not in used_domain_types or domain_type.add_url ] return {'domains': domains, 'unused_domain_types': unused_domain_types}