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

Wrap model detail views with register_model_view()

This commit is contained in:
jeremystretch
2022-10-07 11:36:14 -04:00
parent 4c999daacd
commit bfe26b46a6
19 changed files with 320 additions and 383 deletions

View File

@@ -21,18 +21,3 @@
</a>
{% endif %}
{% endblock %}
{% block extra_tabs %}
{% with interface_count=object.interfaces.count %}
{% if interface_count %}
<li class="nav-item" role="presentation">
<a class="nav-link{% if active_tab == 'interfaces' %} active{% endif %}" href="{% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}">Interfaces {% badge interface_count %}</a>
</li>
{% endif %}
{% endwith %}
{% if perms.extras.view_configcontext %}
<li class="nav-item" role="presentation">
<a class="nav-link{% if active_tab == 'config-context' %} active{% endif %}" href="{% url 'virtualization:virtualmachine_configcontext' pk=object.pk %}">Config Context</a>
</li>
{% endif %}
{% endblock %}