mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Migrate tenancy views to use common object list template
This commit is contained in:
parent
a054aff3c4
commit
88c917231d
@ -1,21 +0,0 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load buttons %}
|
||||
|
||||
{% block content %}
|
||||
<div class="pull-right noprint">
|
||||
{% if perms.tenancy.add_tenant %}
|
||||
{% add_button 'tenancy:tenant_add' %}
|
||||
{% import_button 'tenancy:tenant_import' %}
|
||||
{% endif %}
|
||||
{% export_button content_type %}
|
||||
</div>
|
||||
<h1>{% block title %}Tenants{% endblock %}</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
{% include 'utilities/obj_table.html' with bulk_edit_url='tenancy:tenant_bulk_edit' bulk_delete_url='tenancy:tenant_bulk_delete' %}
|
||||
</div>
|
||||
<div class="col-md-3 noprint">
|
||||
{% include 'inc/search_panel.html' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,18 +0,0 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load buttons %}
|
||||
|
||||
{% block content %}
|
||||
<div class="pull-right noprint">
|
||||
{% if perms.tenancy.add_tenantgroup %}
|
||||
{% add_button 'tenancy:tenantgroup_add' %}
|
||||
{% import_button 'tenancy:tenantgroup_import' %}
|
||||
{% endif %}
|
||||
{% export_button content_type %}
|
||||
</div>
|
||||
<h1>{% block title %}Tenant Groups{% endblock %}</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'utilities/obj_table.html' with bulk_delete_url='tenancy:tenantgroup_bulk_delete' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -22,7 +22,6 @@ class TenantGroupListView(PermissionRequiredMixin, ObjectListView):
|
||||
permission_required = 'tenancy.view_tenantgroup'
|
||||
queryset = TenantGroup.objects.annotate(tenant_count=Count('tenants'))
|
||||
table = tables.TenantGroupTable
|
||||
template_name = 'tenancy/tenantgroup_list.html'
|
||||
|
||||
|
||||
class TenantGroupCreateView(PermissionRequiredMixin, ObjectEditView):
|
||||
@ -60,7 +59,6 @@ class TenantListView(PermissionRequiredMixin, ObjectListView):
|
||||
filterset = filters.TenantFilterSet
|
||||
filterset_form = forms.TenantFilterForm
|
||||
table = tables.TenantTable
|
||||
template_name = 'tenancy/tenant_list.html'
|
||||
|
||||
|
||||
class TenantView(PermissionRequiredMixin, View):
|
||||
|
Loading…
Reference in New Issue
Block a user