Skip to content

Commit

Permalink
adds display region tag #13735
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi1693 committed Nov 8, 2023
1 parent 28fc655 commit da72ab8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
6 changes: 2 additions & 4 deletions netbox/templates/dcim/rackreservation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{% load static %}
{% load plugins %}
{% load i18n %}
{% load display_region %}

{% block breadcrumbs %}
{{ block.super }}
Expand All @@ -24,10 +25,7 @@ <h5 class="card-header">
<tr>
<th scope="row">{% trans "Site" %}</th>
<td>
{% if rack.site.region %}
{{ rack.site.region|linkify }} /
{% endif %}
{{ rack.site|linkify }}
{% display_region rack include_site=True %}
</td>
</tr>
<tr>
Expand Down
10 changes: 2 additions & 8 deletions netbox/templates/ipam/prefix.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% load helpers %}
{% load plugins %}
{% load i18n %}
{% load display_region %}

{% block content %}
<div class="row">
Expand Down Expand Up @@ -47,14 +48,7 @@ <h5 class="card-header">{% trans "Prefix" %}</h5>
<tr>
<th scope="row">{% trans "Site" %}</th>
<td>
{% if object.site %}
{% if object.site.region %}
{{ object.site.region|linkify }} /
{% endif %}
{{ object.site|linkify }}
{% else %}
{{ ''|placeholder }}
{% endif %}
{% display_region object include_site=True %}
</td>
</tr>
<tr>
Expand Down
10 changes: 2 additions & 8 deletions netbox/templates/ipam/vlan.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% load render_table from django_tables2 %}
{% load plugins %}
{% load i18n %}
{% load display_region %}

{% block content %}
<div class="row">
Expand All @@ -16,14 +17,7 @@ <h5 class="card-header">
<tr>
<th scope="row">{% trans "Site" %}</th>
<td>
{% if object.site %}
{% if object.site.region %}
{{ object.site.region|linkify }} /
{% endif %}
{{ object.site|linkify }}
{% else %}
{{ ''|placeholder }}
{% endif %}
{% display_region object include_site=True %}
</td>
</tr>
<tr>
Expand Down

0 comments on commit da72ab8

Please sign in to comment.