From 1c99101c18788dfb2924492fbb39c7a0e64af030 Mon Sep 17 00:00:00 2001 From: Erin <121973038+erinysong@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:16:01 -0700 Subject: [PATCH] Move nameserver formatting to view --- src/registrar/templates/domain_detail.html | 4 ++-- src/registrar/templates/includes/summary_item.html | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/registrar/templates/domain_detail.html b/src/registrar/templates/domain_detail.html index dfd583b1e..e220fe1aa 100644 --- a/src/registrar/templates/domain_detail.html +++ b/src/registrar/templates/domain_detail.html @@ -28,8 +28,8 @@
{% url 'domain-dns-nameservers' pk=domain.id as url %} - {% if domain.format_nameservers|length > 0 %} - {% include "includes/summary_item.html" with title='DNS name servers' value=domain.format_nameservers list='true' edit_link=url %} + {% if domain.nameservers|length > 0 %} + {% include "includes/summary_item.html" with title='DNS name servers' domains='true' value=domain.nameservers list='true' edit_link=url %} {% else %}

DNS name servers

No DNS name servers have been added yet. Before your domain can be used we’ll need information about your domain name servers.

diff --git a/src/registrar/templates/includes/summary_item.html b/src/registrar/templates/includes/summary_item.html index 6fcad0650..63eb62fb4 100644 --- a/src/registrar/templates/includes/summary_item.html +++ b/src/registrar/templates/includes/summary_item.html @@ -56,6 +56,14 @@ {% for item in value %} {% if users %}
  • {{ item.user.email }}
  • + {% elif domains %} +
  • {{ item.0 }} + {% if item.1 %} + ({% for addr in item.1 %} + {{addr}} + {% endfor %}) + {% endif %} +
  • {% else %}
  • {{ item }}
  • {% endif %}