mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-27 04:58:42 +02:00
layout revisions
This commit is contained in:
parent
298e81d269
commit
f52c36ef12
2 changed files with 13 additions and 24 deletions
|
@ -1498,16 +1498,6 @@ class DomainsTable extends LoadTableBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showExportElement(element) {
|
|
||||||
console.log(`Showing element: ${element.id}`);
|
|
||||||
element.style.display = 'block';
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideExportElement(element) {
|
|
||||||
console.log(`Hiding element: ${element.id}`);
|
|
||||||
element.style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
class DomainRequestsTable extends LoadTableBase {
|
class DomainRequestsTable extends LoadTableBase {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -1516,13 +1506,13 @@ class DomainRequestsTable extends LoadTableBase {
|
||||||
|
|
||||||
toggleExportButton(requests) {
|
toggleExportButton(requests) {
|
||||||
console.log("Toggling Export Button Visibility");
|
console.log("Toggling Export Button Visibility");
|
||||||
const exportButton = document.getElementById('export-csv-button');
|
const exportButton = document.getElementById('export-csv');
|
||||||
if (exportButton) {
|
if (exportButton) {
|
||||||
console.log(`Current requests length: ${requests.length}`);
|
console.log(`Current requests length: ${requests.length}`);
|
||||||
if (requests.length > 0) {
|
if (requests.length > 0) {
|
||||||
showExportElement(exportButton);
|
showElement(exportButton);
|
||||||
} else {
|
} else {
|
||||||
hideExportElement(exportButton);
|
hideElement(exportButton);
|
||||||
}
|
}
|
||||||
console.log(exportButton);
|
console.log(exportButton);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,21 +5,19 @@
|
||||||
<span id="get_domain_requests_json_url" class="display-none">{{url}}</span>
|
<span id="get_domain_requests_json_url" class="display-none">{{url}}</span>
|
||||||
|
|
||||||
<section class="section-outlined domain-requests{% if portfolio %} section-outlined--border-base-light{% endif %}" id="domain-requests">
|
<section class="section-outlined domain-requests{% if portfolio %} section-outlined--border-base-light{% endif %}" id="domain-requests">
|
||||||
<div class="grid-row">
|
<div class="section-outlined__header margin-bottom-3 {% if not portfolio %} section-outlined__header--no-portfolio justify-content-space-between{% else %} grid-row{% endif %}">
|
||||||
{% if not portfolio %}
|
{% if not portfolio %}
|
||||||
<div class="mobile:grid-col-12 desktop:grid-col-6">
|
<h2 id="domain-requests-header" class="display-inline-block">Domain requests</h2>
|
||||||
<h2 id="domain-requests-header" class="flex-6">Domain requests</h2>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<!-- Embedding the portfolio value in a data attribute -->
|
<!-- Embedding the portfolio value in a data attribute -->
|
||||||
<span id="portfolio-js-value" data-portfolio="{{ portfolio.id }}"></span>
|
<span id="portfolio-js-value" data-portfolio="{{ portfolio.id }}"></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="mobile:grid-col-12 desktop:grid-col-6 display-flex flex-align-end flex-justify-end">
|
<div class="section-outlined__search {% if portfolio %} mobile:grid-col-12 desktop:grid-col-6{% endif %} {% if is_widescreen_mode %} section-outlined__search--widescreen {% endif %}">
|
||||||
<section aria-label="Domain requests search component" class="flex-6 margin-y-2">
|
<section aria-label="Domain requests search component" class="margin-top-2">
|
||||||
<form class="usa-search usa-search--small" method="POST" role="search">
|
<form class="usa-search usa-search--small" method="POST" role="search">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button class="usa-button usa-button--unstyled margin-right-2 domain-requests__reset-search display-none" type="button">
|
<button class="usa-button usa-button--unstyled margin-right-3 domain-requests__reset-search display-none" type="button">
|
||||||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
||||||
<use xlink:href="{%static 'img/sprite.svg'%}#close"></use>
|
<use xlink:href="{%static 'img/sprite.svg'%}#close"></use>
|
||||||
</svg>
|
</svg>
|
||||||
|
@ -50,13 +48,14 @@
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
</div>
|
||||||
|
<div class="section-outlined__utility-button mobile-lg:padding-right-105 {% if portfolio %} mobile:grid-col-12 desktop:grid-col-6 desktop:padding-left-3{% endif %}" id="export-csv">
|
||||||
|
|
||||||
<section aria-label="Domain Requests report component" class="margin-top-205 margin-left-2">
|
<section aria-label="Domain Requests report component" class="margin-top-205">
|
||||||
<a id="export-csv-button" href="{% url 'export_data_type_requests' %}" class="usa-button usa-button--unstyled usa-button--with-icon usa-button--justify-right" role="button">
|
<a href="{% url 'export_data_type_requests' %}" class="usa-button usa-button--unstyled usa-button--with-icon usa-button--justify-right" role="button">
|
||||||
<svg class="usa-icon usa-icon--big" aria-hidden="true" focusable="false" role="img" width="24" height="24">
|
<svg class="usa-icon usa-icon--big" aria-hidden="true" focusable="false" role="img" width="24" height="24">
|
||||||
<use xlink:href="{% static 'img/sprite.svg' %}#file_download"></use>
|
<use xlink:href="{% static 'img/sprite.svg' %}#file_download"></use>
|
||||||
</svg>
|
</svg>Export as CSV
|
||||||
Export as CSV
|
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue