Bläddra i källkod

Migrate tenancy views to use common object list template

Jeremy Stretch 6 år sedan
förälder
incheckning
88c917231d

+ 0 - 21
netbox/templates/tenancy/tenant_list.html

@@ -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 %}

+ 0 - 18
netbox/templates/tenancy/tenantgroup_list.html

@@ -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 %}

+ 0 - 2
netbox/tenancy/views.py

@@ -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):