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

Ensure consistent placement of table paginator

This commit is contained in:
jeremystretch
2021-12-15 10:34:20 -05:00
parent 3699f16848
commit ff9dde54e3
33 changed files with 225 additions and 263 deletions

View File

@ -3,6 +3,14 @@
{% load plugins %}
{% load render_table from django_tables2 %}
{% block extra_controls %}
{% if perms.circuits.add_circuit %}
<a href="{% url 'circuits:circuit_add' %}?type={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Circuit
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -40,22 +48,13 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Circuits
</h5>
<h5 class="card-header">Circuits</h5>
<div class="card-body table-responsive">
{% render_table circuits_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=circuits_table.paginator page=circuits_table.page %}
</div>
{% if perms.circuits.add_circuit %}
<div class="card-footer text-end noprint">
<a href="{% url 'circuits:circuit_add' %}?type={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Circuit
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=circuits_table.paginator page=circuits_table.page %}
{% plugin_full_width_page object %}
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}

View File

@ -4,8 +4,16 @@
{% load plugins %}
{% load render_table from django_tables2 %}
{% block extra_controls %}
{% if perms.circuits.add_circuit %}
<a href="{% url 'circuits:circuit_add' %}?provider={{ object.pk }}" class="btn btn-sm btn-primary">
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add circuit
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row">
<div class="row mb-3">
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">
@ -57,28 +65,17 @@
{% include 'inc/panels/contacts.html' %}
{% plugin_right_page object %}
</div>
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Circuits
</h5>
<div class="card-body table-responsive">
{% render_table circuits_table 'inc/table.html' %}
</div>
{% if perms.circuits.add_circuit %}
<div class="card-footer text-end noprint">
<a href="{% url 'circuits:circuit_add' %}?provider={{ object.pk }}" class="btn btn-sm btn-primary">
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add circuit
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=circuits_table.paginator page=circuits_table.page %}
</div>
</div>
<div class="row">
<div class="col col-md-12">
{% plugin_full_width_page object %}
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">Circuits</h5>
<div class="card-body table-responsive">
{% render_table circuits_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=circuits_table.paginator page=circuits_table.page %}
</div>
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}

View File

@ -10,7 +10,7 @@
{% endblock %}
{% block content %}
<div class="row">
<div class="row mb-3">
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">
@ -44,22 +44,16 @@
{% plugin_right_page object %}
</div>
</div>
<div class="row">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Circuits
</h5>
<div class="card-body table-responsive">
{% render_table circuits_table 'inc/table.html' %}
</div>
</div>
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">Circuits</h5>
<div class="card-body table-responsive">
{% render_table circuits_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=circuits_table.paginator page=circuits_table.page %}
</div>
</div>
</div>
<div class="row">
<div class="col col-md-12">
{% plugin_full_width_page object %}
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}

View File

@ -42,6 +42,5 @@
{% endif %}
</div>
</form>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% table_config_form table %}
{% endblock %}

View File

@ -39,6 +39,5 @@
{% endif %}
</div>
</form>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% table_config_form table %}
{% endblock %}

View File

@ -42,6 +42,5 @@
{% endif %}
</div>
</form>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% table_config_form table %}
{% endblock %}

View File

@ -77,6 +77,5 @@
{% endif %}
</div>
</form>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% table_config_form table %}
{% endblock %}

View File

@ -39,6 +39,5 @@
{% endif %}
</div>
</form>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% table_config_form table %}
{% endblock %}

View File

@ -42,6 +42,5 @@
{% endif %}
</div>
</form>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% table_config_form table %}
{% endblock %}

View File

@ -42,6 +42,5 @@
{% endif %}
</div>
</form>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% table_config_form table %}
{% endblock %}

View File

@ -42,6 +42,5 @@
{% endif %}
</div>
</form>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% table_config_form table %}
{% endblock %}

View File

@ -7,6 +7,14 @@
<li class="breadcrumb-item"><a href="{% url 'dcim:devicerole_list' %}">Device Roles</a></li>
{% endblock %}
{% block extra_controls %}
{% if perms.dcim.add_device %}
<a href="{% url 'dcim:device_add' %}?device_role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Device
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -70,21 +78,12 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Devices
</h5>
<h5 class="card-header">Devices</h5>
<div class="card-body table-responsive">
{% render_table devices_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=devices_table.paginator page=devices_table.page %}
</div>
{% if perms.dcim.add_device %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:device_add' %}?device_role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Device
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=devices_table.paginator page=devices_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -10,6 +10,14 @@
{% endfor %}
{% endblock %}
{% block extra_controls %}
{% if perms.dcim.add_location %}
<a href="{% url 'dcim:location_add' %}?site={{ object.site.pk }}&parent={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Child Location
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -89,22 +97,13 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Locations
</h5>
<h5 class="card-header">Locations</h5>
<div class="card-body table-responsive">
{% render_table child_locations_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=child_locations_table.paginator page=child_locations_table.page %}
</div>
{% if perms.dcim.add_location %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:location_add' %}?site={{ object.site.pk }}&parent={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Location
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=child_locations_table.paginator page=child_locations_table.page %}
{% plugin_full_width_page object %}
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}

View File

@ -3,6 +3,14 @@
{% load plugins %}
{% load render_table from django_tables2 %}
{% block extra_controls %}
{% if perms.dcim.add_devicetype %}
<a href="{% url 'dcim:devicetype_add' %}?manufacturer={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Device Type
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -47,21 +55,12 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Device Types
</h5>
<h5 class="card-header">Device Types</h5>
<div class="card-body table-responsive">
{% render_table devicetypes_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=devicetypes_table.paginator page=devicetypes_table.page %}
</div>
{% if perms.dcim.add_devicetype %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:devicetype_add' %}?manufacturer={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add device type
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=devicetypes_table.paginator page=devicetypes_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -10,6 +10,14 @@
{% endif %}
{% endblock %}
{% block extra_controls %}
{% if perms.dcim.add_device %}
<a href="{% url 'dcim:device_add' %}?device_role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Device
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -75,22 +83,13 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Devices
</h5>
<h5 class="card-header">Devices</h5>
<div class="card-body table-responsive">
{% render_table devices_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=devices_table.paginator page=devices_table.page %}
</div>
{% if perms.dcim.add_device %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:device_add' %}?device_role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Device
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=devices_table.paginator page=devices_table.page %}
{% plugin_full_width_page object %}
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}

View File

@ -3,6 +3,14 @@
{% load plugins %}
{% load render_table from django_tables2 %}
{% block extra_controls %}
{% if perms.dcim.add_rack %}
<a href="{% url 'dcim:rack_add' %}?role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Rack
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -46,21 +54,12 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Racks
</h5>
<h5 class="card-header">Racks</h5>
<div class="card-body table-responsive">
{% render_table racks_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=racks_table.paginator page=racks_table.page %}
</div>
{% if perms.dcim.add_rack %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:rack_add' %}?role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Rack
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=racks_table.paginator page=racks_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -10,6 +10,14 @@
{% endfor %}
{% endblock %}
{% block extra_controls %}
{% if perms.dcim.add_site %}
<a href="{% url 'dcim:site_add' %}?region={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Site
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -70,25 +78,16 @@
{% plugin_right_page object %}
</div>
</div>
<div class="row">
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Sites
</h5>
<h5 class="card-header">Sites</h5>
<div class="card-body table-responsive">
{% render_table sites_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=sites_table.paginator page=sites_table.page %}
</div>
{% if perms.dcim.add_site %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:site_add' %}?region={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Site
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=sites_table.paginator page=sites_table.page %}
{% plugin_full_width_page object %}
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}

View File

@ -10,6 +10,14 @@
{% endfor %}
{% endblock %}
{% block extra_controls %}
{% if perms.dcim.add_site %}
<a href="{% url 'dcim:site_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Site
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -73,21 +81,12 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Sites
</h5>
<h5 class="card-header">Sites</h5>
<div class="card-body table-responsive">
{% render_table sites_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=sites_table.paginator page=sites_table.page %}
</div>
{% if perms.dcim.add_site %}
<div class="card-footer text-end noprint">
<a href="{% url 'dcim:site_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Site
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=sites_table.paginator page=sites_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -2,11 +2,17 @@
{% load render_table from django_tables2 %}
{% block content %}
<div class="table-responsive">
{% render_table table 'inc/table.html' %}
</div>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
<div class="text-muted">
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<div class="card-body table-responsive">
{% render_table table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
</div>
</div>
<div class="text-muted">
Change log retention: {% if settings.CHANGELOG_RETENTION %}{{ settings.CHANGELOG_RETENTION }} days{% else %}Indefinite{% endif %}
</div>
</div>
</div>
{% endblock %}

View File

@ -24,8 +24,10 @@
</div>
</form>
{% endif %}
<div class="table-responsive">
{% render_table table 'inc/table.html' %}
<div class="card">
<div class="card-body table-responsive">
{% render_table table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
</div>
</div>
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
{% endblock %}

View File

@ -1,6 +1,7 @@
{% extends 'generic/object.html' %}
{% load helpers %}
{% load plugins %}
{% load render_table from django_tables2 %}
{% block content %}
<div class="row">
@ -63,12 +64,18 @@
</table>
</div>
</div>
</div>
<div class="row">
<div class="col">
{% include 'inc/panel_table.html' with table=taggeditem_table heading='Tagged Objects' %}
{% include 'inc/paginator.html' with paginator=taggeditem_table.paginator page=items_table.page %}
</div>
</div>
{% plugin_full_width_page object %}
<div class="row">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">Tagged Objects</h5>
<div class="card-body table-responsive">
{% render_table taggeditem_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=taggeditem_table.paginator page=taggeditem_table.page %}
</div>
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}

View File

@ -70,9 +70,9 @@
<h5 class="card-header">Sites</h5>
<div class="card-body table-responsive">
{% render_table sites_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=sites_table.paginator page=sites_table.page %}
</div>
</div>
{% include 'inc/paginator.html' with paginator=sites_table.paginator page=sites_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -3,6 +3,14 @@
{% load plugins %}
{% load render_table from django_tables2 %}
{% block extra_controls %}
{% if perms.ipam.add_aggregate %}
<a href="{% url 'ipam:aggregate_add' %}?rir={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Aggregate
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -50,21 +58,12 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Aggregates
</h5>
<h5 class="card-header">Aggregates</h5>
<div class="card-body table-responsive">
{% render_table aggregates_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=aggregates_table.paginator page=aggregates_table.page %}
</div>
{% if perms.ipam.add_aggregate %}
<div class="card-footer text-end noprint">
<a href="{% url 'ipam:aggregate_add' %}?rir={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Aggregate
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=aggregates_table.paginator page=aggregates_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -3,6 +3,14 @@
{% load plugins %}
{% load render_table from django_tables2 %}
{% block extra_controls %}
{% if perms.ipam.add_prefix %}
<a href="{% url 'ipam:prefix_add' %}?role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Prefix
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -44,21 +52,12 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Prefixes
</h5>
<h5 class="card-header">Prefixes</h5>
<div class="card-body table-responsive">
{% render_table prefixes_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=prefixes_table.paginator page=prefixes_table.page %}
</div>
{% if perms.ipam.add_prefix %}
<div class="card-footer text-end noprint">
<a href="{% url 'ipam:prefix_add' %}?role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Prefix
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=prefixes_table.paginator page=prefixes_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -11,13 +11,12 @@
{% endif %}
{% endblock %}
{% block buttons %}
{% block extra_controls %}
{% if perms.ipam.add_vlan %}
<a href="{% url 'ipam:vlan_add' %}?group={{ object.pk }}" class="btn btn-success">
<a href="{% url 'ipam:vlan_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add VLAN
</a>
{% endif %}
{{ block.super }}
{% endblock %}
{% block content %}
@ -66,22 +65,12 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
VLANs
</h5>
<h5 class="card-header">VLANs</h5>
<div class="card-body table-responsive">
{% render_table vlans_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=vlans_table.paginator page=vlans_table.page %}
</div>
{% if perms.ipam.add_vlan %}
<div class="card-footer text-end noprint">
<a href="{% url 'ipam:vlan_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add VLAN
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=vlans_table.paginator page=vlans_table.page %}
</div>
</div>
</div>
{% endblock %}

View File

@ -75,19 +75,15 @@
{% plugin_right_page object %}
</div>
</div>
<div class="row">
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">Assignments</h5>
<div class="card-body table-responsive">
{% if assignments_table.rows %}
{% render_table assignments_table 'inc/table.html' %}
{% else %}
<div class="text-muted">None</div>
{% endif %}
{% render_table assignments_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=assignments_table.paginator page=assignments_table.page %}
</div>
</div>
{% include 'inc/paginator.html' with paginator=assignments_table.paginator page=assignments_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -72,22 +72,13 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Contacts
</h5>
<h5 class="card-header">Contacts</h5>
<div class="card-body table-responsive">
{% render_table contacts_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=contacts_table.paginator page=contacts_table.page %}
</div>
{% if perms.tenancy.add_contact %}
<div class="card-footer text-end noprint">
<a href="{% url 'tenancy:contact_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Contact
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=contacts_table.paginator page=contacts_table.page %}
{% plugin_full_width_page object %}
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}

View File

@ -45,9 +45,9 @@
<h5 class="card-header">Assigned Contacts</h5>
<div class="card-body table-responsive">
{% render_table contacts_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=contacts_table.paginator page=contacts_table.page %}
</div>
</div>
{% include 'inc/paginator.html' with paginator=contacts_table.paginator page=contacts_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -10,6 +10,14 @@
{% endfor %}
{% endblock %}
{% block extra_controls %}
{% if perms.tenancy.add_tenant %}
<a href="{% url 'tenancy:tenant_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Tenant
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -57,22 +65,13 @@
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<div class="card-header">
Tenants
</div>
<h5 class="card-header">Tenants</h5>
<div class="card-body table-responsive">
{% render_table tenants_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=tenants_table.paginator page=tenants_table.page %}
</div>
{% if perms.tenancy.add_tenant %}
<div class="card-footer text-end noprint">
<a href="{% url 'tenancy:tenant_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Tenant
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=tenants_table.paginator page=tenants_table.page %}
{% plugin_full_width_page object %}
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}

View File

@ -3,6 +3,14 @@
{% load plugins %}
{% load render_table from django_tables2 %}
{% block extra_controls %}
{% if perms.virtualization.add_cluster %}
<a href="{% url 'virtualization:cluster_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Cluster
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -41,21 +49,12 @@
<div class="row">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Clusters
</h5>
<h5 class="card-header">Clusters</h5>
<div class="card-body table-responsive">
{% render_table clusters_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=clusters_table.paginator page=clusters_table.page %}
</div>
{% if perms.virtualization.add_cluster %}
<div class="card-footer text-end noprint">
<a href="{% url 'virtualization:cluster_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Cluster
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=clusters_table.paginator page=clusters_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -3,6 +3,14 @@
{% load plugins %}
{% load render_table from django_tables2 %}
{% block extra_controls %}
{% if perms.virtualization.add_cluster %}
<a href="{% url 'virtualization:cluster_add' %}?type={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Cluster
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -40,21 +48,12 @@
<div class="row">
<div class="col col-md-12">
<div class="card">
<h5 class="card-header">
Clusters
</h5>
<h5 class="card-header">Clusters</h5>
<div class="card-body table-responsive">
{% render_table clusters_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=clusters_table.paginator page=clusters_table.page %}
</div>
{% if perms.virtualization.add_cluster %}
<div class="card-footer text-end noprint">
<a href="{% url 'virtualization:cluster_add' %}?type={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Cluster
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=clusters_table.paginator page=clusters_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -56,9 +56,9 @@
<h5 class="card-header">Attached Interfaces</h5>
<div class="card-body table-responsive">
{% render_table interfaces_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=interfaces_table.paginator page=interfaces_table.page %}
</div>
</div>
{% include 'inc/paginator.html' with paginator=interfaces_table.paginator page=interfaces_table.page %}
{% plugin_full_width_page object %}
</div>
</div>

View File

@ -10,6 +10,14 @@
{% endfor %}
{% endblock %}
{% block extra_controls %}
{% if perms.wireless.add_wirelesslan %}
<a href="{% url 'wireless:wirelesslan_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Wireless LAN
</a>
{% endif %}
{% endblock extra_controls %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6">
@ -58,17 +66,10 @@
<div class="card-header">Wireless LANs</div>
<div class="card-body table-responsive">
{% render_table wirelesslans_table 'inc/table.html' %}
{% include 'inc/paginator.html' with paginator=wirelesslans_table.paginator page=wirelesslans_table.page %}
</div>
{% if perms.wireless.add_wirelesslan %}
<div class="card-footer text-end noprint">
<a href="{% url 'wireless:wirelesslan_add' %}?group={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Wireless LAN
</a>
</div>
{% endif %}
</div>
{% include 'inc/paginator.html' with paginator=wirelesslans_table.paginator page=wirelesslans_table.page %}
{% plugin_full_width_page object %}
</div>
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}