1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #9477: Add a button to clear applied table column ordering

This commit is contained in:
jeremystretch
2022-08-31 15:28:59 -04:00
parent 301ebe0da3
commit ce054dd37d
5 changed files with 15 additions and 5 deletions

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -235,12 +235,12 @@ table {
}
}
th.asc a::after {
th.asc > a::after {
content: "\f0140";
font-family: 'Material Design Icons';
}
th.desc a::after {
th.desc > a::after {
content: "\f0143";
font-family: 'Material Design Icons';
}

View File

@@ -8,6 +8,16 @@
{% for column in table.columns %}
{% if column.orderable %}
<th {{ column.attrs.th.as_html }}>
{% if column.is_ordered %}
<div class="float-end">
<a href="#"
hx-get="{% querystring table.prefixed_order_by_field='' %}"
hx-target="#object_list"
hx-push-url="true"
class="text-danger"
><i class="mdi mdi-close"></i></a>
</div>
{% endif %}
<a href="#"
hx-get="{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}"
hx-target="#object_list"