diff --git a/netbox/templates/dcim/device_list.html b/netbox/templates/dcim/device_list.html index 60b294eba..230a7a115 100644 --- a/netbox/templates/dcim/device_list.html +++ b/netbox/templates/dcim/device_list.html @@ -32,7 +32,7 @@

Devices

- {% include 'utilities/obj_table.html' with bulk_edit_url='dcim:device_bulk_edit' bulk_delete_url='dcim:device_bulk_delete' %} + {% include 'dcim/inc/device_table.html' with bulk_edit_url='dcim:device_bulk_edit' bulk_delete_url='dcim:device_bulk_delete' %}
diff --git a/netbox/templates/dcim/inc/device_table.html b/netbox/templates/dcim/inc/device_table.html new file mode 100644 index 000000000..6b5034942 --- /dev/null +++ b/netbox/templates/dcim/inc/device_table.html @@ -0,0 +1,29 @@ +{% load render_table from django_tables2 %} +{% load helpers %} +{% if table.model|user_can_change:request.user or table.model|user_can_delete:request.user %} +
+ {% csrf_token %} + + {% render_table table table_template|default:'table.html' %} + {% if perms.dcim.add_interface %} + + {% endif %} + {% if bulk_edit_url and table.model|user_can_change:request.user %} + + {% endif %} + {% if bulk_delete_url and table.model|user_can_delete:request.user %} + + {% endif %} +
+{% else %} + {% render_table table table_template|default:'table.html' %} +{% endif %}