Consolidated to utilities/obj_table.html

This commit is contained in:
Jeremy Stretch
2016-05-16 16:29:08 -04:00
parent 149720d18a
commit a527e0e527
24 changed files with 12 additions and 234 deletions

View File

@@ -1,28 +0,0 @@
{% load render_table from django_tables2 %}
{% if perms.dcim.add_interface or perms.dcim.change_device or perms.dcim.delete_device %}
<form method="post" class="form form-horizontal">
{% csrf_token %}
<input type="hidden" name="redirect_url" value="{{ request.path }}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}" />
{% render_table table table_template|default:'table.html' %}
{% if perms.dcim.add_interface %}
<button type="submit" name="_addinterfaces" formaction="{% url 'dcim:interface_bulk_add' %}" class="btn btn-primary btn-sm">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
Add Interfaces
</button>
{% endif %}
{% if perms.dcim.change_device %}
<button type="submit" name="_edit" formaction="{% url 'dcim:device_bulk_edit' %}" class="btn btn-warning btn-sm">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
Edit Selected
</button>
{% endif %}
{% if perms.dcim.delete_device %}
<button type="submit" name="_delete" formaction="{% url 'dcim:device_bulk_delete' %}" class="btn btn-danger btn-sm">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
Delete Selected
</button>
{% endif %}
</form>
{% else %}
{% render_table table table_template|default:'table.html' %}
{% endif %}