Closes #1484: Added individual "add VLAN" buttons on the VLAN groups list

This commit is contained in:
Jeremy Stretch
2017-09-15 15:14:35 -04:00
parent 17c1a1e465
commit b84b526a43
2 changed files with 17 additions and 0 deletions

View File

@@ -120,6 +120,13 @@ VLAN_ROLE_LINK = """
"""
VLANGROUP_ACTIONS = """
{% with next_vid=record.get_next_available_vid %}
{% if next_vid and perms.ipam.add_vlan %}
<a href="{% url 'ipam:vlan_add' %}?site={{ record.site_id }}&group={{ record.pk }}&vid={{ next_vid }}" title="Add VLAN" class="btn btn-xs btn-success">
<i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
</a>
{% endif %}
{% endwith %}
{% if perms.ipam.change_vlangroup %}
<a href="{% url 'ipam:vlangroup_edit' pk=record.pk %}" class="btn btn-xs btn-warning"><i class="glyphicon glyphicon-pencil" aria-hidden="true"></i></a>
{% endif %}