mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Update related_objects.html
This commit is contained in:
parent
420613daed
commit
8bea914163
@ -5,7 +5,8 @@
|
||||
<h5 class="card-header">{% trans "Related Objects" %}</h5>
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for qs, filter_param in related_models %}
|
||||
{% with viewname=qs.model|viewname:"list" %}
|
||||
{% with viewname=qs.model|validated_viewname:"list" %}
|
||||
{% if viewname is not None %}
|
||||
<a href="{% url viewname %}?{{ filter_param }}={{ object.pk }}" class="list-group-item list-group-item-action d-flex justify-content-between">
|
||||
{{ qs.model|meta:"verbose_name_plural"|bettertitle }}
|
||||
{% with count=qs.count %}
|
||||
@ -16,6 +17,7 @@
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user