mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-02 05:46:25 -06:00
Use object_list template for connections, rack elevations
This commit is contained in:
parent
5360967abc
commit
27513aa062
@ -2541,6 +2541,7 @@ class ConsoleConnectionsListView(generic.ObjectListView):
|
|||||||
filterset_form = forms.ConsoleConnectionFilterForm
|
filterset_form = forms.ConsoleConnectionFilterForm
|
||||||
table = tables.ConsoleConnectionTable
|
table = tables.ConsoleConnectionTable
|
||||||
template_name = 'dcim/connections_list.html'
|
template_name = 'dcim/connections_list.html'
|
||||||
|
action_buttons = ('export',)
|
||||||
|
|
||||||
def extra_context(self):
|
def extra_context(self):
|
||||||
return {
|
return {
|
||||||
@ -2554,6 +2555,7 @@ class PowerConnectionsListView(generic.ObjectListView):
|
|||||||
filterset_form = forms.PowerConnectionFilterForm
|
filterset_form = forms.PowerConnectionFilterForm
|
||||||
table = tables.PowerConnectionTable
|
table = tables.PowerConnectionTable
|
||||||
template_name = 'dcim/connections_list.html'
|
template_name = 'dcim/connections_list.html'
|
||||||
|
action_buttons = ('export',)
|
||||||
|
|
||||||
def extra_context(self):
|
def extra_context(self):
|
||||||
return {
|
return {
|
||||||
@ -2567,6 +2569,7 @@ class InterfaceConnectionsListView(generic.ObjectListView):
|
|||||||
filterset_form = forms.InterfaceConnectionFilterForm
|
filterset_form = forms.InterfaceConnectionFilterForm
|
||||||
table = tables.InterfaceConnectionTable
|
table = tables.InterfaceConnectionTable
|
||||||
template_name = 'dcim/connections_list.html'
|
template_name = 'dcim/connections_list.html'
|
||||||
|
action_buttons = ('export',)
|
||||||
|
|
||||||
def extra_context(self):
|
def extra_context(self):
|
||||||
return {
|
return {
|
||||||
|
@ -1,37 +1,15 @@
|
|||||||
{% extends 'base/layout.html' %}
|
{% extends 'generic/object_list.html' %}
|
||||||
{% load buttons %}
|
{% load buttons %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load render_table from django_tables2 %}
|
{% load render_table from django_tables2 %}
|
||||||
|
|
||||||
{% block title %}{{ title }}{% endblock %}
|
{% block title %}{{ title }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_controls %}{% export_button content_type %}{% endblock %}
|
|
||||||
|
|
||||||
{% block tabs %}
|
|
||||||
<ul class="nav nav-tabs px-3">
|
|
||||||
{% block tab_items %}
|
|
||||||
<li class="nav-item" role="presentation">
|
|
||||||
<button class="nav-link active" id="connections-list-tab" data-bs-toggle="tab" data-bs-target="#connections-list" type="button" role="tab" aria-controls="edit-form" aria-selected="true">
|
|
||||||
{{ title }}
|
|
||||||
{% badge table.page.paginator.count %}
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
{% if filter_form %}
|
|
||||||
<li class="nav-item" role="presentation">
|
|
||||||
<button class="nav-link" id="filters-form-tab" data-bs-toggle="tab" data-bs-target="#filters-form" type="button" role="tab" aria-controls="object-list" aria-selected="false">
|
|
||||||
Filters
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock tab_items %}
|
|
||||||
</ul>
|
|
||||||
{% endblock tabs %}
|
|
||||||
|
|
||||||
{% block content-wrapper %}
|
{% block content-wrapper %}
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|
||||||
{# Conncetions list #}
|
{# Conncetions list #}
|
||||||
<div class="tab-pane show active" id="connections-list" role="tabpanel" aria-labelledby="connections-list-tab">
|
<div class="tab-pane show active" id="object-list" role="tabpanel" aria-labelledby="object-list-tab">
|
||||||
{% include 'inc/table_controls.html' %}
|
{% include 'inc/table_controls.html' %}
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'base/layout.html' %}
|
{% extends 'generic/object_list.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
@ -22,31 +22,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block tabs %}
|
|
||||||
<ul class="nav nav-tabs px-3">
|
|
||||||
{% block tab_items %}
|
|
||||||
<li class="nav-item" role="presentation">
|
|
||||||
<button class="nav-link active" id="rack-elevations-tab" data-bs-toggle="tab" data-bs-target="#rack-elevations" type="button" role="tab" aria-controls="edit-form" aria-selected="true">
|
|
||||||
Rack Elevations
|
|
||||||
{% badge page.paginator.count %}
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
{% if filter_form %}
|
|
||||||
<li class="nav-item" role="presentation">
|
|
||||||
<button class="nav-link" id="filters-form-tab" data-bs-toggle="tab" data-bs-target="#filters-form" type="button" role="tab" aria-controls="object-list" aria-selected="false">
|
|
||||||
Filters
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock tab_items %}
|
|
||||||
</ul>
|
|
||||||
{% endblock tabs %}
|
|
||||||
|
|
||||||
{% block content-wrapper %}
|
{% block content-wrapper %}
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|
||||||
{# Rack elevations #}
|
{# Rack elevations #}
|
||||||
<div class="tab-pane show active" id="rack-elevations" role="tabpanel" aria-labelledby="rack-elevations-tab">
|
<div class="tab-pane show active" id="object-list" role="tabpanel" aria-labelledby="object-list-tab">
|
||||||
{% if page %}
|
{% if page %}
|
||||||
<div style="white-space: nowrap; overflow-x: scroll;">
|
<div style="white-space: nowrap; overflow-x: scroll;">
|
||||||
{% for rack in page %}
|
{% for rack in page %}
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
{% load render_table from django_tables2 %}
|
{% load render_table from django_tables2 %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
{% block title %}{{ content_type.model_class|meta:"verbose_name_plural"|bettertitle }}{% endblock %}
|
|
||||||
|
|
||||||
{% block controls %}
|
{% block controls %}
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
@ -28,7 +26,7 @@
|
|||||||
{% block tab_items %}
|
{% block tab_items %}
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link active" id="object-list-tab" data-bs-toggle="tab" data-bs-target="#object-list" type="button" role="tab" aria-controls="edit-form" aria-selected="true">
|
<button class="nav-link active" id="object-list-tab" data-bs-toggle="tab" data-bs-target="#object-list" type="button" role="tab" aria-controls="edit-form" aria-selected="true">
|
||||||
{{ content_type.model_class|meta:"verbose_name_plural"|bettertitle }}
|
{% block title %}{{ content_type.model_class|meta:"verbose_name_plural"|bettertitle }}{% endblock %}
|
||||||
{% badge table.page.paginator.count %}
|
{% badge table.page.paginator.count %}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user