mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 13:09:41 +02:00
Merge pull request #631 from cisagov/ik/domain-overview
Add details to domain overview
This commit is contained in:
commit
8f90295276
6 changed files with 61 additions and 16 deletions
|
@ -77,6 +77,7 @@ h2 {
|
||||||
font-weight: font-weight('semibold');
|
font-weight: font-weight('semibold');
|
||||||
line-height: line-height('heading', 3);
|
line-height: line-height('heading', 3);
|
||||||
margin: units(4) 0 units(1);
|
margin: units(4) 0 units(1);
|
||||||
|
color: color('primary-darker');
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-form-step > h1 {
|
.register-form-step > h1 {
|
||||||
|
|
|
@ -1,6 +1,33 @@
|
||||||
{% extends "domain_base.html" %}
|
{% extends "domain_base.html" %}
|
||||||
|
{% load static url_helpers %}
|
||||||
|
|
||||||
{% block domain_content %}
|
{% block domain_content %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<p>Active: {% if domain.is_active %}Yes{% else %}No{% endif %}</p>
|
<div class="margin-top-4 tablet:grid-col-10">
|
||||||
|
|
||||||
|
{% url 'domain-nameservers' pk=domain.id as url %}
|
||||||
|
{% if domain.nameservers %}
|
||||||
|
{% include "includes/summary_item.html" with title='DNS name servers' value=domain.nameservers list='true' edit_link=url %}
|
||||||
|
{% else %}
|
||||||
|
<h2 class="margin-top-neg-1"> DNS name servers </h2>
|
||||||
|
<p> No DNS name servers have been added yet. Before your domain can be used we’ll need information about your domain name servers.</p>
|
||||||
|
<a class="usa-button margin-bottom-1" href="{{url}}"> Add DNS name servers </a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% url 'todo' as url %}
|
||||||
|
{% include "includes/summary_item.html" with title='Organization name and mailing address' value=domain.domain_info address='true' edit_link=url %}
|
||||||
|
|
||||||
|
{% url 'todo' as url %}
|
||||||
|
{% include "includes/summary_item.html" with title='Authorizing official' value=domain.domain_info.authorizing_official contact='true' edit_link=url %}
|
||||||
|
|
||||||
|
{% url 'domain-your-contact-information' pk=domain.id as url %}
|
||||||
|
{% include "includes/summary_item.html" with title='Your contact information' value=request.user.contact contact='true' edit_link=url %}
|
||||||
|
|
||||||
|
{% url 'domain-security-email' pk=domain.id as url %}
|
||||||
|
{% include "includes/summary_item.html" with title='Security email' value=domain.security_email edit_link=url %}
|
||||||
|
|
||||||
|
{% url 'domain-users' pk=domain.id as url %}
|
||||||
|
{% include "includes/summary_item.html" with title='User management' users='true' list=True value=domain.permissions.all edit_link=url %}
|
||||||
|
|
||||||
|
</div>
|
||||||
{% endblock %} {# domain_content #}
|
{% endblock %} {# domain_content #}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<a href="{{ url }}"
|
<a href="{{ url }}"
|
||||||
{% if request.path == url %}class="usa-current"{% endif %}
|
{% if request.path == url %}class="usa-current"{% endif %}
|
||||||
>
|
>
|
||||||
Domain Overview
|
Domain overview
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
|
{% load static url_helpers %}
|
||||||
|
|
||||||
<section class="summary-item margin-top-3">
|
<section class="summary-item margin-top-3">
|
||||||
<hr class="" />
|
<hr class="" aria-hidden="true" />
|
||||||
<p class="summary-item__title
|
<h2 class="summary-item__title
|
||||||
text-primary-dark text-semibold
|
text-primary-dark text-semibold
|
||||||
margin-top-0 margin-bottom-05"
|
margin-top-0 margin-bottom-05"
|
||||||
>
|
>
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</p>
|
</h2>
|
||||||
{% if address %}
|
{% if address %}
|
||||||
{% include "includes/organization_address.html" with organization=value %}
|
{% include "includes/organization_address.html" with organization=value %}
|
||||||
{% elif contact %}
|
{% elif contact %}
|
||||||
|
@ -30,11 +32,19 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif list %}
|
{% elif list %}
|
||||||
{% if value|length == 1 %}
|
{% if value|length == 1 %}
|
||||||
|
{% if users %}
|
||||||
|
<p class="margin-top-0">{{ value.0.user.email }} </p>
|
||||||
|
{% else %}
|
||||||
<p class="margin-top-0">{{ value | first }} </p>
|
<p class="margin-top-0">{{ value | first }} </p>
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<ul class="usa-list margin-top-0">
|
<ul class="usa-list margin-top-0">
|
||||||
{% for item in value %}
|
{% for item in value %}
|
||||||
|
{% if users %}
|
||||||
|
<li>{{ item.user.email }}</li>
|
||||||
|
{% else %}
|
||||||
<li>{{ item }}</li>
|
<li>{{ item }}</li>
|
||||||
|
{% endif %}
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<li>None</li>
|
<li>None</li>
|
||||||
{% endfor %}</ul></p>
|
{% endfor %}</ul></p>
|
||||||
|
@ -46,4 +56,12 @@
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if edit_link %}
|
||||||
|
<a
|
||||||
|
href="{{ edit_link }}"
|
||||||
|
>
|
||||||
|
Edit<span class="sr-only"> {{ title }}</span>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
|
@ -1309,10 +1309,9 @@ class TestDomainDetail(TestWithDomainPermissions, WebTest):
|
||||||
self.assertContains(page, "Domain contact information")
|
self.assertContains(page, "Domain contact information")
|
||||||
|
|
||||||
def test_domain_your_contact_information_content(self):
|
def test_domain_your_contact_information_content(self):
|
||||||
"""Your contact information appears on the page."""
|
"""Logged-in user's contact information appears on the page."""
|
||||||
self.domain_information.submitter = Contact(first_name="Testy")
|
self.user.contact.first_name = "Testy"
|
||||||
self.domain_information.submitter.save()
|
self.user.contact.save()
|
||||||
self.domain_information.save()
|
|
||||||
page = self.app.get(
|
page = self.app.get(
|
||||||
reverse("domain-your-contact-information", kwargs={"pk": self.domain.id})
|
reverse("domain-your-contact-information", kwargs={"pk": self.domain.id})
|
||||||
)
|
)
|
||||||
|
|
|
@ -115,7 +115,7 @@ class DomainYourContactInformationView(DomainPermissionView, FormMixin):
|
||||||
def get_form_kwargs(self, *args, **kwargs):
|
def get_form_kwargs(self, *args, **kwargs):
|
||||||
"""Add domain_info.submitter instance to make a bound form."""
|
"""Add domain_info.submitter instance to make a bound form."""
|
||||||
form_kwargs = super().get_form_kwargs(*args, **kwargs)
|
form_kwargs = super().get_form_kwargs(*args, **kwargs)
|
||||||
form_kwargs["instance"] = self.get_object().domain_info.submitter
|
form_kwargs["instance"] = self.request.user.contact
|
||||||
return form_kwargs
|
return form_kwargs
|
||||||
|
|
||||||
def get_success_url(self):
|
def get_success_url(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue