mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 10:58:37 -06:00
Clean up object list view
This commit is contained in:
parent
e0c24b944f
commit
c6831b9df3
@ -95,7 +95,7 @@
|
||||
|
||||
{# Page header #}
|
||||
{% block header %}
|
||||
<div class="title-container px-3 py-3">
|
||||
<div class="title-container px-3 pb-3">
|
||||
|
||||
{# Title #}
|
||||
<div id="content-title">
|
||||
|
@ -25,16 +25,14 @@
|
||||
|
||||
{% block content %}
|
||||
{% if filter_form %}
|
||||
<div class="col col-md-12 noprint">
|
||||
{% include 'inc/advanced_search.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if table.paginator.num_pages > 1 %}
|
||||
{% with bulk_edit_url=content_type.model_class|validated_viewname:"bulk_edit" bulk_delete_url=content_type.model_class|validated_viewname:"bulk_delete" %}
|
||||
<div id="select-all-box" class="d-none card noprint">
|
||||
<div class="row mb-3">
|
||||
<form method="post" class="form col-md-12">
|
||||
{% csrf_token %}
|
||||
<div id="select-all-box" class="d-none card noprint">
|
||||
<div class="card-body d-inline-flex justify-content-between align-items-center">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" id="select-all" name="_all" class="form-check-input" />
|
||||
@ -55,16 +53,14 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{# Object list filter, table config #}
|
||||
<div class="row mb-3">
|
||||
<div class="col col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col col-md-4 offset-md-8 d-flex noprint table-controls">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control object-filter" placeholder="Filter" title="Filter text (regular expressions supported)" />
|
||||
@ -85,14 +81,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
{# Object table #}
|
||||
<div class="row">
|
||||
<div class="col col-md-12">
|
||||
{% with bulk_edit_url=content_type.model_class|validated_viewname:"bulk_edit" bulk_delete_url=content_type.model_class|validated_viewname:"bulk_delete" %}
|
||||
{% if permissions.change or permissions.delete %}
|
||||
<form method="post" class="form form-horizontal">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="return_url" value="{% if return_url %}{{ return_url }}{% else %}{{ request.path }}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}{% endif %}" />
|
||||
{% include table_template|default:'inc/responsive_table.html' %}
|
||||
<div class="table-responsive">
|
||||
{% render_table table 'inc/table.html' %}
|
||||
</div>
|
||||
<div class="float-start noprint bulk-buttons">
|
||||
{% block bulk_buttons %}{% endblock %}
|
||||
{% if bulk_edit_url and permissions.change %}
|
||||
@ -116,7 +116,5 @@
|
||||
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% table_config_form table table_name="ObjectTable" %}
|
||||
{% endblock content %}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% load form_helpers %}
|
||||
{% load helpers %}
|
||||
|
||||
<div class="collapse" id="advanced-search-content">
|
||||
<div id="advanced-search-content" class="collapse mb-3">
|
||||
<div class="col col-md-12 noprint">
|
||||
<form action="." method="get">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
@ -63,3 +64,4 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% load helpers %}
|
||||
|
||||
<div class="paginator float-end text-end my-3">
|
||||
<div class="paginator float-end text-end">
|
||||
{% if paginator.num_pages > 1 %}
|
||||
<div class="btn-group btn-group-sm mb-3" role="group" aria-label="Pages">
|
||||
{% if page.has_previous %}
|
||||
|
@ -1,7 +1,6 @@
|
||||
{% load django_tables2 %}
|
||||
|
||||
<table{% if table.attrs %} {{ table.attrs.as_html }}{% endif %}>
|
||||
<caption class="text-center small mt-3"></caption>
|
||||
{% if table.show_header %}
|
||||
<thead>
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user