mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-20 09:46:06 +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 {
|
||||
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
|
||||
.module.collapse--dgfieldset {
|
||||
margin-top: -35px;
|
||||
|
|
|
@ -330,7 +330,7 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
|
|||
</details>
|
||||
{% endif %}
|
||||
{% 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">
|
||||
<span>
|
||||
CISA region:
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{% extends 'django/admin/email_clipboard_change_form.html' %}
|
||||
{% load custom_filters %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block content %}
|
||||
{% comment %} Stores the json endpoint in a url for easier access {% endcomment %}
|
||||
{% url 'get-senior-official-from-federal-agency-json' as url %}
|
||||
<input id="senior_official_from_agency_json_url" class="display-none" value="{{url}}" />
|
||||
{{ block.super }}
|
||||
{{ block.super }}
|
||||
{% endblock content %}
|
||||
|
||||
{% block field_sets %}
|
||||
|
@ -21,3 +22,21 @@
|
|||
{% include "django/admin/includes/detail_table_fieldset.html" with original_object=original %}
|
||||
{% endfor %}
|
||||
{% 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
|
||||
else:
|
||||
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