adds display region tag #13735

This commit is contained in:
Abhimanyu Saharan 2023-11-08 22:28:43 +05:30
parent 28fc6555ef
commit da72ab8a7a
3 changed files with 6 additions and 20 deletions

View File

@ -4,6 +4,7 @@
{% load static %} {% load static %}
{% load plugins %} {% load plugins %}
{% load i18n %} {% load i18n %}
{% load display_region %}
{% block breadcrumbs %} {% block breadcrumbs %}
{{ block.super }} {{ block.super }}
@ -24,10 +25,7 @@
<tr> <tr>
<th scope="row">{% trans "Site" %}</th> <th scope="row">{% trans "Site" %}</th>
<td> <td>
{% if rack.site.region %} {% display_region rack include_site=True %}
{{ rack.site.region|linkify }} /
{% endif %}
{{ rack.site|linkify }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@ -3,6 +3,7 @@
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% load i18n %} {% load i18n %}
{% load display_region %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
@ -47,14 +48,7 @@
<tr> <tr>
<th scope="row">{% trans "Site" %}</th> <th scope="row">{% trans "Site" %}</th>
<td> <td>
{% if object.site %} {% display_region object include_site=True %}
{% if object.site.region %}
{{ object.site.region|linkify }} /
{% endif %}
{{ object.site|linkify }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@ -3,6 +3,7 @@
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load plugins %} {% load plugins %}
{% load i18n %} {% load i18n %}
{% load display_region %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
@ -16,14 +17,7 @@
<tr> <tr>
<th scope="row">{% trans "Site" %}</th> <th scope="row">{% trans "Site" %}</th>
<td> <td>
{% if object.site %} {% display_region object include_site=True %}
{% if object.site.region %}
{{ object.site.region|linkify }} /
{% endif %}
{{ object.site|linkify }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td> </td>
</tr> </tr>
<tr> <tr>