mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-04 00:42:16 +02:00
Merge pull request #2939 from cisagov/ad/2858-make-detail-columns-sortable
#2858 - Make detail columns sortable for domains and domain requests [AD]
This commit is contained in:
commit
beca7cb411
3 changed files with 21 additions and 16 deletions
|
@ -898,3 +898,10 @@ ul.add-list-reset {
|
|||
font-weight: 600;
|
||||
font-size: .8125rem;
|
||||
}
|
||||
|
||||
.change-form .usa-table {
|
||||
td {
|
||||
color: inherit !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,23 +2,21 @@
|
|||
{% load static url_helpers %}
|
||||
|
||||
{% block detail_content %}
|
||||
<table>
|
||||
<table class="usa-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<tr>
|
||||
<th data-sortable scope="col" role="columnheader">Name</th>
|
||||
<th data-sortable scope="col" role="columnheader">
|
||||
Status
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for domain_request in domain_requests %}
|
||||
{% url 'admin:registrar_domainrequest_change' domain_request.pk as url %}
|
||||
<tr>
|
||||
<td><a href={{url}}>{{ domain_request }}</a></td>
|
||||
{% if domain_request.get_status_display %}
|
||||
<td>{{ domain_request.get_status_display }}</td>
|
||||
{% else %}
|
||||
<td>None</td>
|
||||
{% endif %}
|
||||
<td data-sort-value="{{ domain_request }}"> <a href={{url}}>{{ domain_request }}</a></td>
|
||||
<td data-sort-value="{{ domain_request.get_status_display}}"> {{ domain_request.get_status_display|default:"None" }} </td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
{% load static url_helpers %}
|
||||
|
||||
{% block detail_content %}
|
||||
<table>
|
||||
<table class="usa-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>State</th>
|
||||
<th data-sortable scope="col" role="columnheader">Name</th>
|
||||
<th data-sortable scope="col" role="columnheader">State</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -15,11 +15,11 @@
|
|||
{% with domain=domain_info.domain %}
|
||||
{% url 'admin:registrar_domain_change' domain.pk as url %}
|
||||
<tr>
|
||||
<td><a href={{url}}>{{ domain }}</a></td>
|
||||
<td data-sort-value="{{ domain }}"> <a href={{url}}>{{ domain }}</a></td>
|
||||
{% if domain and domain.get_state_display %}
|
||||
<td>{{ domain.get_state_display }}</td>
|
||||
<td data-sort-value="{{ domain.get_state_display }}"> {{ domain.get_state_display }} </td>
|
||||
{% else %}
|
||||
<td>None</td>
|
||||
<td data-sort-value="None"> None</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endwith %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue