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

Replace None in templates with placeholder filter

To be consistent, all uses of — or None is replaced with the
placeholder filter.

Fixes #9537
This commit is contained in:
Kim Johansson
2022-06-15 22:33:21 +02:00
parent 83fdfaa0eb
commit e8b970608e
25 changed files with 57 additions and 57 deletions

View File

@@ -52,7 +52,7 @@
{% if object.role %}
<a href="{% url 'ipam:ipaddress_list' %}?role={{ object.role }}">{{ object.get_role_display }}</a>
{% else %}
<span class="text-muted">None</span>
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
@@ -73,7 +73,7 @@
{% endif %}
{{ object.assigned_object|linkify }}
{% else %}
<span class="text-muted">&mdash;</span>
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
@@ -86,7 +86,7 @@
({{ object.nat_inside.assigned_object.parent_object|linkify }})
{% endif %}
{% else %}
<span class="text-muted">None</span>
{{ ''|placeholder }}
{% endif %}
</td>
</tr>

View File

@@ -39,7 +39,7 @@
{% if aggregate %}
<a href="{% url 'ipam:aggregate' pk=aggregate.pk %}">{{ aggregate.prefix }}</a> ({{ aggregate.rir }})
{% else %}
<span class="text-warning">None</span>
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
@@ -52,7 +52,7 @@
{% endif %}
{{ object.site|linkify }}
{% else %}
<span class="text-muted">None</span>
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
@@ -65,7 +65,7 @@
{% endif %}
{{ object.vlan|linkify }}
{% else %}
<span class="text-muted">None</span>
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
@@ -138,7 +138,7 @@
{{ first_available_ip }}
{% endif %}
{% else %}
<span class="text-muted">None</span>
{{ ''|placeholder }}
{% endif %}
{% endwith %}
</td>

View File

@@ -45,7 +45,7 @@
{% if ipranges_count %}
<a href="{% url 'ipam:iprange_list' %}?role_id={{ object.pk }}">{{ ipranges_count }}</a>
{% else %}
&mdash;
{{ ''|placeholder }}
{% endif %}
{% endwith %}
</td>
@@ -57,7 +57,7 @@
{% if vlans_count %}
<a href="{% url 'ipam:vlan_list' %}?role_id={{ object.pk }}">{{ vlans_count }}</a>
{% else %}
&mdash;
{{ ''|placeholder }}
{% endif %}
{% endwith %}
</td>

View File

@@ -44,7 +44,7 @@
{% for ipaddress in object.ipaddresses.all %}
{{ ipaddress|linkify }}<br />
{% empty %}
<span class="text-muted">None</span>
{{ ''|placeholder }}
{% endfor %}
</td>
</tr>

View File

@@ -21,7 +21,7 @@
{% endif %}
{{ object.site|linkify }}
{% else %}
<span class="text-muted">None</span>
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
@@ -56,7 +56,7 @@
{% if object.role %}
<a href="{% url 'ipam:vlan_list' %}?role={{ object.role.slug }}">{{ object.role }}</a>
{% else %}
<span class="text-muted">None</span>
{{ ''|placeholder }}
{% endif %}
</td>
</tr>