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

Clean up display of tenant groups

This commit is contained in:
jeremystretch
2022-03-22 15:29:05 -04:00
parent 8d682041a4
commit 7c14b8d97b
16 changed files with 58 additions and 104 deletions

View File

@@ -35,14 +35,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -24,14 +24,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -76,14 +76,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -44,17 +44,13 @@
<td>{{ object.parent|linkify|placeholder }}</td> <td>{{ object.parent|linkify|placeholder }}</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} / {% endif %}
{% endif %} {{ object.tenant|linkify|placeholder }}
{{ object.tenant|linkify }} </td>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Racks</th> <th scope="row">Racks</th>

View File

@@ -64,14 +64,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -54,14 +54,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -58,14 +58,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -29,14 +29,10 @@
<tr> <tr>
<td>Tenant</td> <td>Tenant</td>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if prefix.object.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -29,14 +29,10 @@
<tr> <tr>
<td>Tenant</td> <td>Tenant</td>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -36,14 +36,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -54,14 +54,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -26,16 +26,12 @@
</tr> </tr>
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %}
{% if object.tenant.group %} {% if object.tenant.group %}
{{ object.tenant.group|linkify }} / {{ object.tenant.group|linkify }} /
{% endif %} {% endif %}
{{ object.tenant|linkify }} {{ object.tenant|linkify|placeholder }}
{% else %} </td>
<span class="text-muted">None</span>
{% endif %}
</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Aggregate</th> <th scope="row">Aggregate</th>

View File

@@ -40,14 +40,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -20,7 +20,12 @@
</tr> </tr>
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td>{{ object.tenant|linkify|placeholder }}</td> <td>
{% if object.tenant.group %}
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify|placeholder }}
</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Unique IP Space</th> <th scope="row">Unique IP Space</th>

View File

@@ -25,7 +25,12 @@
</tr> </tr>
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td>{{ object.tenant|linkify }}</td> <td>
{% if object.tenant.group %}
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify|placeholder }}
</td>
</tr> </tr>
<tr> <tr>
<th scope="row">Site</th> <th scope="row">Site</th>

View File

@@ -32,14 +32,10 @@
<tr> <tr>
<th scope="row">Tenant</th> <th scope="row">Tenant</th>
<td> <td>
{% if object.tenant %} {% if object.tenant.group %}
{% if object.tenant.group %} {{ object.tenant.group|linkify }} /
{{ object.tenant.group|linkify }} /
{% endif %}
{{ object.tenant|linkify }}
{% else %}
<span class="text-muted">None</span>
{% endif %} {% endif %}
{{ object.tenant|linkify|placeholder }}
</td> </td>
</tr> </tr>
<tr> <tr>