mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-20 17:56:11 +02:00
Remove CISA region filter for portfolio and try to add sticky bar for portfolio
This commit is contained in:
parent
ecfd4d148c
commit
7766f74c9d
4 changed files with 76 additions and 2 deletions
|
@ -556,6 +556,43 @@ button .usa-icon,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Sticky submit bar for Portfolio page on desktop */
|
||||||
|
@media screen and (min-width:768px) {
|
||||||
|
.portfolio-submit-row-wrapper {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 338px; /* Adjust this value according to your layout */
|
||||||
|
background: var(--darkened-bg); /* Use a suitable background color */
|
||||||
|
border-top-left-radius: 6px;
|
||||||
|
transition: transform .2s ease-out;
|
||||||
|
}
|
||||||
|
.portfolio-submit-row-wrapper--collapsed {
|
||||||
|
transform: translate3d(0, 88px, 0);
|
||||||
|
}
|
||||||
|
.portfolio-submit-row {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.portfolio-submit-row-toggle {
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
top: -30px;
|
||||||
|
right: 0;
|
||||||
|
background: var(--darkened-bg);
|
||||||
|
}
|
||||||
|
#portfolioSubmitRowToggle {
|
||||||
|
color: var(--body-fg);
|
||||||
|
}
|
||||||
|
.portfolio-requested-domain-sticky {
|
||||||
|
max-width: 325px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-size: medium;
|
||||||
|
padding-top: 3px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.visible-768 {
|
.visible-768 {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -580,6 +617,19 @@ button .usa-icon,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width:935px) {
|
||||||
|
/* Analyst-only class for Portfolio page */
|
||||||
|
.portfolio-submit-row-wrapper--analyst-view {
|
||||||
|
@include portfolio-submit-row-wrapper--collapsed-one-line();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width:1256px) {
|
||||||
|
.portfolio-submit-row-wrapper {
|
||||||
|
@include portfolio-submit-row-wrapper--collapsed-one-line();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Collapse button styles for fieldsets
|
// Collapse button styles for fieldsets
|
||||||
.module.collapse--dgfieldset {
|
.module.collapse--dgfieldset {
|
||||||
margin-top: -35px;
|
margin-top: -35px;
|
||||||
|
|
|
@ -330,7 +330,7 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
|
||||||
</details>
|
</details>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% elif field.field.name == "state_territory" %}
|
{% elif field.field.name == "state_territory" and original_object|model_name != 'portfolio' %}
|
||||||
<div class="flex-container margin-top-2">
|
<div class="flex-container margin-top-2">
|
||||||
<span>
|
<span>
|
||||||
CISA region:
|
CISA region:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends 'django/admin/email_clipboard_change_form.html' %}
|
{% extends 'django/admin/email_clipboard_change_form.html' %}
|
||||||
|
{% load custom_filters %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -21,3 +22,21 @@
|
||||||
{% include "django/admin/includes/detail_table_fieldset.html" with original_object=original %}
|
{% include "django/admin/includes/detail_table_fieldset.html" with original_object=original %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block submit_buttons_bottom %}
|
||||||
|
<div class="portfolio-submit-row-wrapper">
|
||||||
|
<span class="portfolio-submit-row-toggle padding-1 padding-right-2 visible-desktop">
|
||||||
|
<button type="button" id="portfolioSubmitRowToggle">
|
||||||
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24" height="24">
|
||||||
|
<use xlink:href="{% static 'img/sprite.svg' %}#expand_more"></use>
|
||||||
|
</svg>
|
||||||
|
<span>Hide</span>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
<p class="portfolio-requested-domain-sticky">
|
||||||
|
HELLO WORLD: <strong>{{ original.requested_domain.name }}</strong>
|
||||||
|
</p>
|
||||||
|
{{ block.super }}
|
||||||
|
</div>
|
||||||
|
<span class="scroll-indicator"></span>
|
||||||
|
{% endblock %}
|
||||||
|
|
|
@ -169,3 +169,8 @@ def has_contact_info(user):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return bool(user.title or user.email or user.phone)
|
return bool(user.title or user.email or user.phone)
|
||||||
|
|
||||||
|
|
||||||
|
@register.filter
|
||||||
|
def model_name(instance):
|
||||||
|
return instance.__class__.__name__.lower()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue