mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 02:49:21 +02:00
extended header for org users
This commit is contained in:
parent
a1fca00b8f
commit
619a71fdb6
13 changed files with 77 additions and 70 deletions
|
@ -92,10 +92,6 @@ footer {
|
|||
color: color('primary');
|
||||
}
|
||||
|
||||
.usa-identifier__logo {
|
||||
height: units(7);
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
// workaround for underlining abbr element
|
||||
border-bottom: none;
|
||||
|
@ -135,36 +131,6 @@ abbr[title] {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.input-with-edit-button {
|
||||
svg.usa-icon {
|
||||
width: 1.5em !important;
|
||||
height: 1.5em !important;
|
||||
color: #{$dhs-green};
|
||||
position: absolute;
|
||||
}
|
||||
&.input-with-edit-button__error {
|
||||
svg.usa-icon {
|
||||
color: #{$dhs-red};
|
||||
}
|
||||
div.readonly-field {
|
||||
color: #{$dhs-red};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We need to deviate from some default USWDS styles here
|
||||
// in this particular case, so we have to override this.
|
||||
.usa-form .usa-button.readonly-edit-button {
|
||||
margin-top: 0px !important;
|
||||
padding-top: 0px !important;
|
||||
svg {
|
||||
width: 1.25em !important;
|
||||
height: 1.25em !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.padding--8-8-9 {
|
||||
padding: 8px 8px 9px !important;
|
||||
}
|
||||
|
|
|
@ -162,6 +162,34 @@ a.usa-button--unstyled:visited {
|
|||
}
|
||||
}
|
||||
|
||||
.input-with-edit-button {
|
||||
svg.usa-icon {
|
||||
width: 1.5em !important;
|
||||
height: 1.5em !important;
|
||||
color: #{$dhs-green};
|
||||
position: absolute;
|
||||
}
|
||||
&.input-with-edit-button__error {
|
||||
svg.usa-icon {
|
||||
color: #{$dhs-red};
|
||||
}
|
||||
div.readonly-field {
|
||||
color: #{$dhs-red};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We need to deviate from some default USWDS styles here
|
||||
// in this particular case, so we have to override this.
|
||||
.usa-form .usa-button.readonly-edit-button {
|
||||
margin-top: 0px !important;
|
||||
padding-top: 0px !important;
|
||||
svg {
|
||||
width: 1.25em !important;
|
||||
height: 1.25em !important;
|
||||
}
|
||||
}
|
||||
|
||||
.usa-button--filter {
|
||||
width: auto;
|
||||
// For mobile stacking
|
||||
|
|
|
@ -67,6 +67,23 @@
|
|||
}
|
||||
|
||||
.usa-header--extended {
|
||||
@include at-media(desktop) {
|
||||
background-color: color('primary-darker');
|
||||
border-top: solid 1px color('base');
|
||||
border-bottom: solid 1px color('base-light');
|
||||
|
||||
.usa-logo__text a {
|
||||
color: color('white');
|
||||
}
|
||||
.usa-nav {
|
||||
background-color: color('primary-lighter');
|
||||
}
|
||||
.usa-nav__primary-item:last-child {
|
||||
margin-left: auto;
|
||||
.usa-nav-link {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
.usa-nav__primary {
|
||||
.usa-nav-link,
|
||||
.usa-nav-link:hover,
|
||||
|
@ -81,23 +98,6 @@
|
|||
font-weight: font-weight('bold');
|
||||
}
|
||||
}
|
||||
@include at-media(desktop) {
|
||||
background-color: color('primary-darker');
|
||||
border-top: solid 1px color('base');
|
||||
border-bottom: solid 1px color('base-lighter');
|
||||
|
||||
.usa-logo__text a {
|
||||
color: color('white');
|
||||
}
|
||||
.usa-nav {
|
||||
background-color: color('primary-lightest');
|
||||
}
|
||||
.usa-nav__primary-item:last-child {
|
||||
margin-left: auto;
|
||||
.usa-nav-link {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
.usa-nav__secondary {
|
||||
// I don't know why USWDS has this at 2 rem, which puts it out of alignment
|
||||
right: 3rem;
|
||||
|
|
10
src/registrar/assets/sass/_theme/_identifier.scss
Normal file
10
src/registrar/assets/sass/_theme/_identifier.scss
Normal file
|
@ -0,0 +1,10 @@
|
|||
@use "uswds-core" as *;
|
||||
|
||||
.usa-banner {
|
||||
background-color: color('primary-darker');
|
||||
}
|
||||
|
||||
.usa-identifier__logo {
|
||||
height: units(7);
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@
|
|||
@forward "alerts";
|
||||
@forward "tables";
|
||||
@forward "sidenav";
|
||||
@forward "identifier";
|
||||
@forward "header";
|
||||
@forward "register-form";
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ def language_code(request):
|
|||
"""
|
||||
return {"LANGUAGE_CODE": settings.LANGUAGE_CODE}
|
||||
|
||||
|
||||
def canonical_path(request):
|
||||
"""Add a canonical URL to the template context.
|
||||
|
||||
|
@ -22,6 +23,7 @@ def canonical_path(request):
|
|||
"""
|
||||
return {"CANONICAL_PATH": request.build_absolute_uri(request.path)}
|
||||
|
||||
|
||||
def is_demo_site(request):
|
||||
"""Add a boolean if this is a demo site.
|
||||
|
||||
|
@ -31,10 +33,12 @@ def is_demo_site(request):
|
|||
"""
|
||||
return {"IS_DEMO_SITE": settings.IS_DEMO_SITE}
|
||||
|
||||
|
||||
def is_production(request):
|
||||
"""Add a boolean if this is our production site."""
|
||||
return {"IS_PRODUCTION": settings.IS_PRODUCTION}
|
||||
|
||||
|
||||
def org_user_status(request):
|
||||
if request.user.is_authenticated:
|
||||
is_org_user = request.user.is_org_user(request)
|
||||
|
@ -42,20 +46,17 @@ def org_user_status(request):
|
|||
is_org_user = False
|
||||
|
||||
return {
|
||||
'is_org_user': is_org_user,
|
||||
"is_org_user": is_org_user,
|
||||
}
|
||||
|
||||
|
||||
def add_portfolio_to_context(request):
|
||||
return {
|
||||
'portfolio': getattr(request, 'portfolio', None)
|
||||
}
|
||||
return {"portfolio": getattr(request, "portfolio", None)}
|
||||
|
||||
|
||||
def add_path_to_context(request):
|
||||
return {
|
||||
'path': getattr(request, 'path', None)
|
||||
}
|
||||
return {"path": getattr(request, "path", None)}
|
||||
|
||||
|
||||
def add_has_profile_feature_flag_to_context(request):
|
||||
return {
|
||||
'has_profile_feature_flag': flag_is_active(request, "profile_feature")
|
||||
}
|
||||
return {"has_profile_feature_flag": flag_is_active(request, "profile_feature")}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<ul class="usa-nav__primary usa-accordion">
|
||||
<li class="usa-nav__primary-item">
|
||||
{% if user.is_authenticated %}
|
||||
<span class="usa-nav__username">{{ user.email }}</span>
|
||||
<span class="usa-nav__username ellipsis">{{ user.email }}</span>
|
||||
</li>
|
||||
{% if has_profile_feature_flag %}
|
||||
<li class="usa-nav__primary-item">
|
||||
|
|
|
@ -59,7 +59,7 @@ from epplibwrapper import (
|
|||
|
||||
from ..utility.email import send_templated_email, EmailSendingError
|
||||
from .utility import DomainPermissionView, DomainInvitationPermissionDeleteView
|
||||
from waffle.decorators import flag_is_active, waffle_flag
|
||||
from waffle.decorators import waffle_flag
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -378,7 +378,6 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
|||
|
||||
def get_context_data(self):
|
||||
"""Define context for access on all wizard pages."""
|
||||
has_profile_flag = flag_is_active(self.request, "profile_feature")
|
||||
|
||||
context_stuff = {}
|
||||
if DomainRequest._form_complete(self.domain_request, self.request):
|
||||
|
|
|
@ -11,7 +11,7 @@ def get_domains_json(request):
|
|||
"""Given the current request,
|
||||
get all domains that are associated with the UserDomainRole object"""
|
||||
|
||||
user_domain_roles = UserDomainRole.objects.filter(user=request.user).select_related('domain_info__sub_organization')
|
||||
user_domain_roles = UserDomainRole.objects.filter(user=request.user).select_related("domain_info__sub_organization")
|
||||
domain_ids = user_domain_roles.values_list("domain_id", flat=True)
|
||||
|
||||
objects = Domain.objects.filter(id__in=domain_ids)
|
||||
|
@ -85,7 +85,11 @@ def get_domains_json(request):
|
|||
"action_url": reverse("domain", kwargs={"pk": domain.id}),
|
||||
"action_label": ("View" if domain.state in [Domain.State.DELETED, Domain.State.ON_HOLD] else "Manage"),
|
||||
"svg_icon": ("visibility" if domain.state in [Domain.State.DELETED, Domain.State.ON_HOLD] else "settings"),
|
||||
"suborganization": domain.domain_info.sub_organization.name if domain.domain_info and domain.domain_info.sub_organization else None,
|
||||
"suborganization": (
|
||||
domain.domain_info.sub_organization.name
|
||||
if domain.domain_info and domain.domain_info.sub_organization
|
||||
else None
|
||||
),
|
||||
}
|
||||
for domain in page_obj.object_list
|
||||
]
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
from django.shortcuts import get_object_or_404, render
|
||||
from registrar.models.portfolio import Portfolio
|
||||
from waffle.decorators import flag_is_active
|
||||
from django.shortcuts import render
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ from registrar.models import (
|
|||
from registrar.models.user import User
|
||||
from registrar.models.utility.generic_helper import replace_url_queryparams
|
||||
from registrar.views.utility.permission_views import UserProfilePermissionView
|
||||
from waffle.decorators import flag_is_active, waffle_flag
|
||||
from waffle.decorators import waffle_flag
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue