Standardize related model display for organizational models

This commit is contained in:
jeremystretch
2023-01-25 16:01:10 -05:00
committed by jeremystretch
parent 91b81d51da
commit 94797bb956
16 changed files with 91 additions and 260 deletions

View File

@@ -42,22 +42,6 @@
<th scope="row">VM Role</th>
<td>{% checkmark object.vm_role %}</td>
</tr>
<tr>
<th scope="row">Devices</th>
<td>
<a href="{% url 'dcim:device_list' %}?role_id={{ object.pk }}">{{ object.devices.count }}</a>
</td>
</tr>
<tr>
<th>Virtual Machines</th>
<td>
{% if object.vm_role %}
<a href="{% url 'virtualization:virtualmachine_list' %}?role_id={{ object.pk }}">{{ object.virtual_machines.count }}</a>
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
</table>
</div>
</div>
@@ -65,6 +49,7 @@
{% plugin_left_page object %}
</div>
<div class="col col-md-6">
{% include 'inc/panels/related_objects.html' %}
{% include 'inc/panels/custom_fields.html' %}
{% plugin_right_page object %}
</div>