mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-04 17:01:56 +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');
|
||||
line-height: line-height('heading', 3);
|
||||
margin: units(4) 0 units(1);
|
||||
color: color('primary-darker');
|
||||
}
|
||||
|
||||
.register-form-step > h1 {
|
||||
|
@ -431,4 +432,4 @@ abbr[title] {
|
|||
@include at-media('tablet') {
|
||||
height: units('mobile');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,33 @@
|
|||
{% extends "domain_base.html" %}
|
||||
{% load static url_helpers %}
|
||||
|
||||
{% block domain_content %}
|
||||
{{ 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 #}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<a href="{{ url }}"
|
||||
{% if request.path == url %}class="usa-current"{% endif %}
|
||||
>
|
||||
Domain Overview
|
||||
Domain overview
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{% load static url_helpers %}
|
||||
|
||||
<section class="summary-item margin-top-3">
|
||||
<hr class="" />
|
||||
<p class="summary-item__title
|
||||
<hr class="" aria-hidden="true" />
|
||||
<h2 class="summary-item__title
|
||||
text-primary-dark text-semibold
|
||||
margin-top-0 margin-bottom-05"
|
||||
>
|
||||
{{ title }}
|
||||
</p>
|
||||
>
|
||||
{{ title }}
|
||||
</h2>
|
||||
{% if address %}
|
||||
{% include "includes/organization_address.html" with organization=value %}
|
||||
{% elif contact %}
|
||||
|
@ -30,11 +32,19 @@
|
|||
{% endif %}
|
||||
{% elif list %}
|
||||
{% if value|length == 1 %}
|
||||
<p class="margin-top-0">{{ value | first }} </p>
|
||||
{% if users %}
|
||||
<p class="margin-top-0">{{ value.0.user.email }} </p>
|
||||
{% else %}
|
||||
<p class="margin-top-0">{{ value | first }} </p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<ul class="usa-list margin-top-0">
|
||||
{% for item in value %}
|
||||
<li>{{ item }}</li>
|
||||
{% if users %}
|
||||
<li>{{ item.user.email }}</li>
|
||||
{% else %}
|
||||
<li>{{ item }}</li>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
<li>None</li>
|
||||
{% endfor %}</ul></p>
|
||||
|
@ -45,5 +55,13 @@
|
|||
{{ value }}
|
||||
</p>
|
||||
{% 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")
|
||||
|
||||
def test_domain_your_contact_information_content(self):
|
||||
"""Your contact information appears on the page."""
|
||||
self.domain_information.submitter = Contact(first_name="Testy")
|
||||
self.domain_information.submitter.save()
|
||||
self.domain_information.save()
|
||||
"""Logged-in user's contact information appears on the page."""
|
||||
self.user.contact.first_name = "Testy"
|
||||
self.user.contact.save()
|
||||
page = self.app.get(
|
||||
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):
|
||||
"""Add domain_info.submitter instance to make a bound form."""
|
||||
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
|
||||
|
||||
def get_success_url(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue