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

Introduced clone, edit, and delete buttons

This commit is contained in:
Jeremy Stretch
2019-12-13 15:29:55 -05:00
parent 85563e21db
commit 8acd3d0a72
24 changed files with 153 additions and 184 deletions

View File

@@ -30,24 +30,17 @@
<div class="pull-right noprint">
{% if show_graphs %}
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#graphs_modal" data-obj="{{ provider.name }}" data-url="{% url 'circuits-api:provider-graphs' pk=provider.pk %}" title="Show graphs">
<i class="fa fa-signal" aria-hidden="true"></i>
Graphs
<i class="fa fa-signal" aria-hidden="true"></i> Graphs
</button>
{% endif %}
{% if perms.circuits.add_provider %}
{% clone_button 'circuits:provider_add' provider %}
{% clone_button provider %}
{% endif %}
{% if perms.circuits.change_provider %}
<a href="{% url 'circuits:provider_edit' slug=provider.slug %}" class="btn btn-warning">
<span class="fa fa-pencil" aria-hidden="true"></span>
Edit this provider
</a>
{% edit_button provider %}
{% endif %}
{% if perms.circuits.delete_provider %}
<a href="{% url 'circuits:provider_delete' slug=provider.slug %}" class="btn btn-danger">
<span class="fa fa-trash" aria-hidden="true"></span>
Delete this provider
</a>
{% delete_button provider %}
{% endif %}
</div>
<h1>{{ provider }}</h1>