Просмотр исходного кода

Fixes #2976: Add delete button to tag view

Jeremy Stretch 7 лет назад
Родитель
Сommit
f35b4bf768
2 измененных файлов с 7 добавлено и 0 удалено
  1. 1 0
      CHANGELOG.md
  2. 6 0
      netbox/templates/extras/tag.html

+ 1 - 0
CHANGELOG.md

@@ -16,6 +16,7 @@ v2.5.8 (FUTURE)
 * [#2961](https://github.com/digitalocean/netbox/issues/2961) - Prevent exception when exporting inventory items belonging to unnamed devices
 * [#2962](https://github.com/digitalocean/netbox/issues/2962) - Increase ExportTemplate `mime_type` field length
 * [#2966](https://github.com/digitalocean/netbox/issues/2966) - Accept `null` cable length_unit via API
+* [#2976](https://github.com/digitalocean/netbox/issues/2976) - Add delete button to tag view
 
 ---
 

+ 6 - 0
netbox/templates/extras/tag.html

@@ -29,6 +29,12 @@
                 Edit this tag
             </a>
         {% endif %}
+        {% if perms.taggit.delete_tag %}
+            <a href="{% url 'extras:tag_delete' slug=tag.slug %}" class="btn btn-danger">
+                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
+                Delete this tag
+            </a>
+        {% endif %}
     </div>
     <h1>{% block title %}Tag: {{ tag }}{% endblock %}</h1>
 {% endblock %}