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

Refactor HTMX table template

This commit is contained in:
jeremystretch
2021-12-14 11:41:39 -05:00
parent 6dd6094088
commit 414d33eb26
3 changed files with 47 additions and 48 deletions

View File

@ -96,10 +96,7 @@
{# Object table #}
<div class="card">
<div class="card-body" id="object_list">
<div class="table-responsive">
{% render_table table 'inc/table_htmx.html' %}
</div>
{% include 'inc/paginator_htmx.html' with paginator=table.paginator page=table.page %}
{% include 'htmx/table.html' %}
</div>
</div>

View File

@ -1,4 +1,4 @@
{# Render an HTML table element #}
{# Render an HTMX-enabled table with paginator #}
{% load render_table from django_tables2 %}
{% render_table table 'inc/table_htmx.html' %}

View File

@ -1,5 +1,6 @@
{% load django_tables2 %}
<div class="table-responsive">
<table{% if table.attrs %} {{ table.attrs.as_html }}{% endif %}>
{% if table.show_header %}
<thead>
@ -45,3 +46,4 @@
</tfoot>
{% endif %}
</table>
</div>