1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#353: Added bulk editing for InterfaceTemplates

This commit is contained in:
Jeremy Stretch
2016-10-19 12:15:54 -04:00
parent 0da3661ff0
commit c09cb5df3d
7 changed files with 57 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{% load render_table from django_tables2 %}
{% if perms.dcim.change_devicetype %}
<form method="post" action="{% url delete_url pk=devicetype.pk %}">
<form method="post">
{% csrf_token %}
<div class="panel panel-default">
<div class="panel-heading">
@@ -17,9 +17,16 @@
{% render_table table 'table.html' %}
<div class="panel-footer">
{% if table.rows %}
<button type="submit" class="btn btn-xs btn-danger">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete Selected
</button>
{% if edit_url %}
<button type="submit" name="_edit" formaction="{% url edit_url pk=devicetype.pk %}" class="btn btn-xs btn-warning">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit Selected
</button>
{% endif %}
{% if delete_url %}
<button type="submit" name="_delete" formaction="{% url delete_url pk=devicetype.pk %}" class="btn btn-xs btn-danger">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete Selected
</button>
{% endif %}
{% endif %}
<div class="pull-right">
<a href="{% url add_url pk=devicetype.pk %}{{ add_url_extra }}" class="btn btn-primary btn-xs">