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

begin bootstrap 5 migration, update templates

This commit is contained in:
checktheroads
2021-03-13 02:19:42 -07:00
parent 51120ccf31
commit 9b89afd6dc
814 changed files with 3618 additions and 139280 deletions

View File

@@ -1,33 +1,35 @@
{% with custom_fields=object.get_custom_fields %}
{% if custom_fields %}
<div class="panel panel-default">
<div class="panel-heading">
<strong>Custom Fields</strong>
<div class="card">
<h5 class="card-header">
Custom Fields
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
{% for field, value in custom_fields.items %}
<tr>
<td><span title="{{ field.description }}">{{ field }}</span></td>
<td>
{% if field.type == 'boolean' and value == True %}
<i class="mdi mdi-check-bold text-success" title="True"></i>
{% elif field.type == 'boolean' and value == False %}
<i class="mdi mdi-close-thick text-danger" title="False"></i>
{% elif field.type == 'url' and value %}
<a href="{{ value }}">{{ value|truncatechars:70 }}</a>
{% elif field.type == 'multiselect' and value %}
{{ value|join:", " }}
{% elif value is not None %}
{{ value }}
{% elif field.required %}
<span class="text-warning">Not defined</span>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
<table class="table table-hover panel-body attr-table">
{% for field, value in custom_fields.items %}
<tr>
<td><span title="{{ field.description }}">{{ field }}</span></td>
<td>
{% if field.type == 'boolean' and value == True %}
<i class="mdi mdi-check-bold text-success" title="True"></i>
{% elif field.type == 'boolean' and value == False %}
<i class="mdi mdi-close-thick text-danger" title="False"></i>
{% elif field.type == 'url' and value %}
<a href="{{ value }}">{{ value|truncatechars:70 }}</a>
{% elif field.type == 'multiselect' and value %}
{{ value|join:", " }}
{% elif value is not None %}
{{ value }}
{% elif field.required %}
<span class="text-warning">Not defined</span>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% endwith %}