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

#6732 - Swap ASN M2M to Site model and update some templates/filters

This commit is contained in:
Daniel Sheppard
2021-11-02 12:26:06 -05:00
parent 330c498fe4
commit 7625a2dd3c
12 changed files with 120 additions and 29 deletions

View File

@@ -260,6 +260,20 @@
{% endif %}
</div>
</div>
<div class="card">
<h5 class="card-header">
ASNs
</h5>
<div class='card-body'>
{% if asns %}
{% for asn in asns %}
<a href="{{ asn.get_absolute_url }}"><span class="badge bg-primary">{{ asn }}</span></a>
{% endfor %}
{% else %}
<span class="text-muted">None</span>
{% endif %}
</div>
</div>
{% include 'inc/panels/image_attachments.html' %}
{% plugin_right_page object %}
</div>

View File

@@ -47,17 +47,30 @@
</table>
</div>
</div>
{% include 'inc/panels/custom_fields.html' %}
{% include 'inc/panels/tags.html' with tags=object.tags.all url='ipam:asn_list' %}
{% plugin_left_page object %}
</div>
<div class="col col-md-6">
{% include 'inc/panels/custom_fields.html' %}
{% include 'inc/panels/tags.html' with tags=object.tags.all url='ipam:asn_list' %}
<div class="card">
<h5 class="card-header">
Sites
</h5>
<div class='card-body'>
{% if sites %}
{% for site in sites %}
<a href="{{ site.get_absolute_url }}"><span class="badge bg-primary">{{ site }}</span></a>
{% endfor %}
{% else %}
<span class="text-muted">None</span>
{% endif %}
</div>
</div>
{% plugin_right_page object %}
</div>
</div>
<div class="row mb-3">
<div class="col col-md-12">
{% include 'inc/panel_table.html' with table=sites_table heading='Sites' %}
{% plugin_full_width_page object %}
</div>
</div>