mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-16 16:52:17 -06:00
Update templates to use "object" context var
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'ipam:vrf_list' %}">VRFs</a></li>
|
||||
<li>{{ vrf }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@@ -26,29 +26,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons vrf %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.ipam.add_vrf %}
|
||||
{% clone_button vrf %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.change_vrf %}
|
||||
{% edit_button vrf %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.delete_vrf %}
|
||||
{% delete_button vrf %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}VRF {{ vrf }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=vrf %}
|
||||
<h1>{% block title %}VRF {{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links vrf %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ vrf.get_absolute_url }}">VRF</a>
|
||||
<a href="{{ object.get_absolute_url }}">VRF</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:vrf_changelog' pk=vrf.pk %}">Change Log</a>
|
||||
<a href="{% url 'ipam:vrf_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@@ -64,13 +64,13 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Route Distinguisher</td>
|
||||
<td>{{ vrf.rd }}</td>
|
||||
<td>{{ object.rd }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if vrf.tenant %}
|
||||
<a href="{{ vrf.tenant.get_absolute_url }}">{{ vrf.tenant }}</a>
|
||||
{% if object.tenant %}
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@@ -79,7 +79,7 @@
|
||||
<tr>
|
||||
<td>Unique IP Space</td>
|
||||
<td>
|
||||
{% if vrf.enforce_unique %}
|
||||
{% if object.enforce_unique %}
|
||||
<i class="mdi mdi-check-bold text-success" title="Yes"></i>
|
||||
{% else %}
|
||||
<i class="mdi mdi-close-thick text-danger" title="No"></i>
|
||||
@@ -88,29 +88,29 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ vrf.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prefixes</td>
|
||||
<td>
|
||||
<a href="{% url 'ipam:prefix_list' %}?vrf_id={{ vrf.pk }}">{{ prefix_count }}</a>
|
||||
<a href="{% url 'ipam:prefix_list' %}?vrf_id={{ object.pk }}">{{ prefix_count }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'extras/inc/tags_panel.html' with tags=vrf.tags.all url='ipam:vrf_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=vrf %}
|
||||
{% plugin_left_page vrf %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:vrf_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'panel_table.html' with table=import_targets_table heading="Import Route Targets" %}
|
||||
{% include 'panel_table.html' with table=export_targets_table heading="Export Route Targets" %}
|
||||
{% plugin_right_page vrf %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page vrf %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user