Closes #8108: Improve breadcrumb links for device/VM components

This commit is contained in:
jeremystretch
2021-12-18 14:02:01 -05:00
parent cf4a55bc2f
commit 628e186846
12 changed files with 76 additions and 19 deletions
+8 -1
View File
@@ -1,8 +1,15 @@
{% extends 'dcim/device_component.html' %}
{% extends 'generic/object.html' %}
{% load helpers %}
{% load plugins %}
{% load render_table from django_tables2 %}
{% block breadcrumbs %}
{{ block.super }}
<li class="breadcrumb-item">
<a href="{% url 'dcim:device_interfaces' pk=object.device.pk %}">{{ object.device }}</a>
</li>
{% endblock %}
{% block extra_controls %}
{% if perms.dcim.add_interface and not object.is_virtual %}
<a href="{% url 'dcim:interface_add' %}?device={{ object.device.pk }}&parent={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-success">