From 69533a2f80cdaa7a908d81788702aeb08ed2fea5 Mon Sep 17 00:00:00 2001 From: Neil Martinsen-Burrell Date: Fri, 27 Jan 2023 11:51:30 -0600 Subject: [PATCH] Sortable table and dashboard_view styling --- .../_theme/_uswds-theme-custom-styles.scss | 2 +- src/registrar/templates/base.html | 4 ++- src/registrar/templates/home.html | 31 +++++++++++++++---- src/registrar/views/index.py | 2 ++ 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/registrar/assets/sass/_theme/_uswds-theme-custom-styles.scss b/src/registrar/assets/sass/_theme/_uswds-theme-custom-styles.scss index 7dd1a456f..1ea01a119 100644 --- a/src/registrar/assets/sass/_theme/_uswds-theme-custom-styles.scss +++ b/src/registrar/assets/sass/_theme/_uswds-theme-custom-styles.scss @@ -130,7 +130,7 @@ section.dashboard { } } -#wrapper { +#wrapper.dashboard { background-color: color('primary-lightest'); } diff --git a/src/registrar/templates/base.html b/src/registrar/templates/base.html index 1a87457e0..8bbd6206f 100644 --- a/src/registrar/templates/base.html +++ b/src/registrar/templates/base.html @@ -128,11 +128,13 @@
{% block logo %} {% endblock %} @@ -162,7 +164,7 @@
{% endblock banner %} -
+
{% block messages %} {% if messages %}
    diff --git a/src/registrar/templates/home.html b/src/registrar/templates/home.html index 0c8aa849d..103e9f192 100644 --- a/src/registrar/templates/home.html +++ b/src/registrar/templates/home.html @@ -1,5 +1,7 @@ {% extends 'base.html' %} +{% load static %} + {% block title %} Hello {% endblock %} {% block content %} @@ -30,19 +32,36 @@ Your domain applications - Name - Status + Domain name + Date created + Status + {% for application in domain_applications %} - - + {{ application.requested_domain.name|default:"New domain request" }} - - {{ application.status }} + {{ application.created_at|date }} + {{ application.status|title }} + + + {% if application.status == "started" %} + + Edit + + {% else %} + + Manage + {% endif %} + + {% endfor %} diff --git a/src/registrar/views/index.py b/src/registrar/views/index.py index 6d50b3948..1e3dd366b 100644 --- a/src/registrar/views/index.py +++ b/src/registrar/views/index.py @@ -7,6 +7,8 @@ def index(request): """This page is available to anyone without logging in.""" context = {} if request.user.is_authenticated: + # the logged-in index view IS the dashboard + context["dashboard_view"] = True applications = DomainApplication.objects.filter(creator=request.user) context["domain_applications"] = applications return render(request, "home.html", context)