Skip to content

Commit

Permalink
Final work on #9583 for basic functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSheps committed Feb 9, 2024
1 parent 664a0eb commit 50557c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion netbox/templates/inc/table_header_filter_dropdown.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load form_helpers %}
{% if form_field %}
<div class="dropdown" style="display: inline;">
<div class="column-filter dropdown">
<a href="#" classs="btn dropdown-toggle" data-bs-toggle="dropdown" data-bs-auto-close="outside">
<i class="mdi mdi-filter-settings" style="font-size: 1.25rem;"> </i>
</a>
Expand Down
8 changes: 6 additions & 2 deletions netbox/templates/inc/table_htmx.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@
><i class="mdi mdi-close"></i></a>
</div>
{% endif %}
{% if table.filterset_form %}
{% include 'inc/table_header_filter_dropdown.html' with form_field=table.filterset_form|getfilterfield:column.name %}
{% endif %}
<a href="#"
hx-get="{{ table.htmx_url }}{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}"
hx-target="closest .htmx-container"
{% if not table.embedded %}hx-push-url="true"{% endif %}
>{{ column.header }}</a>
{% include 'inc/table_header_filter_dropdown.html' with form_field=table.filterset_form|getfilterfield:column.name %}
</th>
{% else %}
<th {{ column.attrs.th.as_html }}>
{% if table.filterset_form %}
{% include 'inc/table_header_filter_dropdown.html' with form_field=table.filterset_form|getfilterfield:column.name %}
{% endif %}
{{ column.header }}
{% include 'inc/table_header_filter_dropdown.html' with form_field=table.filterset_form|getfilterfield:column.name %}
</th>
{% endif %}
{% endfor %}
Expand Down

0 comments on commit 50557c0

Please sign in to comment.