mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-20 09:46:06 +02:00
Show domain applications on home
This commit is contained in:
parent
f5c117df9f
commit
b92fe3f469
2 changed files with 37 additions and 3 deletions
|
@ -17,9 +17,37 @@
|
||||||
<p>This is the .gov registrar.</p>
|
<p>This is the .gov registrar.</p>
|
||||||
|
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<p><a href="/openid/logout/">Click here to log out.</a></p>
|
|
||||||
|
{% if domain_applications %}
|
||||||
|
<h2>Your domain applications</h2>
|
||||||
|
<table class="usa-table usa-table--borderless">
|
||||||
|
<caption class="sr-only">Your domain applications</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Status</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for application in domain_applications %}
|
||||||
|
<tr>
|
||||||
|
<th>{{ application.requested_domain.website }}</th>
|
||||||
|
<td>{{ application.status }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<p><a href="{% url 'application' %}" class="usa-button">Apply</a></p>
|
||||||
|
|
||||||
|
<p><a href="{% url 'edit-profile' %}">Edit profile</a></p>
|
||||||
|
|
||||||
|
<p><a href="{% url 'admin:index' %}">CISA admin panel</a></p>
|
||||||
|
|
||||||
|
<p><a href="{% url 'logout' %}">Click here to log out.</a></p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p><a href="/openid/login/">Click here to log in.</a></p>
|
<p><a href="{% url 'login' %}">Click here to log in.</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
from registrar.models import DomainApplication
|
||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
"""This page is available to anyone without logging in."""
|
"""This page is available to anyone without logging in."""
|
||||||
return render(request, "home.html")
|
context = {}
|
||||||
|
if request.user.is_authenticated:
|
||||||
|
applications = DomainApplication.objects.filter(creator=request.user)
|
||||||
|
context["domain_applications"] = applications
|
||||||
|
return render(request, "home.html", context)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue