mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-17 04:32:51 -06:00
Refactor HTMX table template
This commit is contained in:
parent
6dd6094088
commit
414d33eb26
@ -96,10 +96,7 @@
|
|||||||
{# Object table #}
|
{# Object table #}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body" id="object_list">
|
<div class="card-body" id="object_list">
|
||||||
<div class="table-responsive">
|
{% include 'htmx/table.html' %}
|
||||||
{% render_table table 'inc/table_htmx.html' %}
|
|
||||||
</div>
|
|
||||||
{% include 'inc/paginator_htmx.html' with paginator=table.paginator page=table.page %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{# Render an HTML table element #}
|
{# Render an HTMX-enabled table with paginator #}
|
||||||
{% load render_table from django_tables2 %}
|
{% load render_table from django_tables2 %}
|
||||||
|
|
||||||
{% render_table table 'inc/table_htmx.html' %}
|
{% render_table table 'inc/table_htmx.html' %}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{% load django_tables2 %}
|
{% load django_tables2 %}
|
||||||
|
|
||||||
<table{% if table.attrs %} {{ table.attrs.as_html }}{% endif %}>
|
<div class="table-responsive">
|
||||||
|
<table{% if table.attrs %} {{ table.attrs.as_html }}{% endif %}>
|
||||||
{% if table.show_header %}
|
{% if table.show_header %}
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -44,4 +45,5 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user