mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-12 22:18:25 +02:00
Fix styling
This commit is contained in:
parent
2042fd1146
commit
0bbbc895b0
3 changed files with 29 additions and 8 deletions
|
@ -25,6 +25,10 @@
|
||||||
color: color('primary-darker');
|
color: color('primary-darker');
|
||||||
padding-bottom: units(2px);
|
padding-bottom: units(2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
th.action-col-custom-width {
|
||||||
|
width: 27% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dotgov-table {
|
.dotgov-table {
|
||||||
|
|
|
@ -41,8 +41,13 @@
|
||||||
<th data-sortable scope="col" role="columnheader">Domain name</th>
|
<th data-sortable scope="col" role="columnheader">Domain name</th>
|
||||||
<th data-sortable scope="col" role="columnheader">Expires</th>
|
<th data-sortable scope="col" role="columnheader">Expires</th>
|
||||||
<th data-sortable scope="col" role="columnheader">Status</th>
|
<th data-sortable scope="col" role="columnheader">Status</th>
|
||||||
<th scope="col" role="columnheader"><span class="usa-sr-only">Action</span></th>
|
<th
|
||||||
<th scope="col" role="columnheader"> </th>
|
scope="col"
|
||||||
|
role="columnheader"
|
||||||
|
{% if has_deletable_applications %} class="action-col-custom-width" {% else %} class="width-15" {% endif %}
|
||||||
|
>
|
||||||
|
<span class="usa-sr-only">Action</span>
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -105,7 +110,9 @@
|
||||||
<th data-sortable scope="col" role="columnheader">Date submitted</th>
|
<th data-sortable scope="col" role="columnheader">Date submitted</th>
|
||||||
<th data-sortable scope="col" role="columnheader">Status</th>
|
<th data-sortable scope="col" role="columnheader">Status</th>
|
||||||
<th scope="col" role="columnheader"><span class="usa-sr-only">Action</span></th>
|
<th scope="col" role="columnheader"><span class="usa-sr-only">Action</span></th>
|
||||||
|
{% if has_deletable_applications %}
|
||||||
<th scope="col" role="columnheader"><span class="usa-sr-only">Delete Action</span></th>
|
<th scope="col" role="columnheader"><span class="usa-sr-only">Delete Action</span></th>
|
||||||
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -139,6 +146,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
{% if has_deletable_applications %}
|
||||||
<td>
|
<td>
|
||||||
{% if application.status == "started" or application.status == "withdrawn" %}
|
{% if application.status == "started" or application.status == "withdrawn" %}
|
||||||
<a
|
<a
|
||||||
|
@ -169,6 +177,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -18,11 +18,19 @@ def index(request):
|
||||||
domains = Domain.objects.filter(id__in=domain_ids)
|
domains = Domain.objects.filter(id__in=domain_ids)
|
||||||
|
|
||||||
context["domains"] = domains
|
context["domains"] = domains
|
||||||
modal_button = (
|
|
||||||
'<button type="submit" '
|
|
||||||
'class="usa-button usa-button--secondary" '
|
|
||||||
'name="delete-application">Yes, delete request</button>'
|
|
||||||
)
|
|
||||||
|
|
||||||
context["modal_button"] = modal_button
|
# Determine if the user will see applications that they can delete
|
||||||
|
valid_statuses = [DomainApplication.ApplicationStatus.STARTED, DomainApplication.ApplicationStatus.WITHDRAWN]
|
||||||
|
has_deletable_applications = applications.filter(status__in=valid_statuses)
|
||||||
|
context["has_deletable_applications"] = has_deletable_applications
|
||||||
|
|
||||||
|
if has_deletable_applications:
|
||||||
|
modal_button = (
|
||||||
|
'<button type="submit" '
|
||||||
|
'class="usa-button usa-button--secondary" '
|
||||||
|
'name="delete-application">Yes, delete request</button>'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
context["modal_button"] = modal_button
|
||||||
return render(request, "home.html", context)
|
return render(request, "home.html", context)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue