mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-17 20:46:30 -06:00
Adds tooltip on custom field (#12505)
* adds tooltip on custom field #12131 * adds description field check * fixed field name * updated code to match the panel * added escape filter on description
This commit is contained in:
parent
c55c14ea4c
commit
4e49f4a434
@ -132,9 +132,16 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% for field, value in fields.items %}
|
{% for field, value in fields.items %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<th scope="row">{{ field }}
|
||||||
<span title="{{ field.description|escape }}">{{ field }}</span>
|
{% if field.description %}
|
||||||
</td>
|
<i
|
||||||
|
class="mdi mdi-information text-primary"
|
||||||
|
data-bs-toggle="tooltip"
|
||||||
|
data-bs-placement="right"
|
||||||
|
title="{{ field.description|escape }}"
|
||||||
|
></i>
|
||||||
|
{% endif %}
|
||||||
|
</th>
|
||||||
<td>
|
<td>
|
||||||
{% customfield_value field value %}
|
{% customfield_value field value %}
|
||||||
</td>
|
</td>
|
||||||
|
@ -12,8 +12,15 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
{% for field, value in fields.items %}
|
{% for field, value in fields.items %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">{{ field }}
|
||||||
<span title="{{ field.description|escape }}">{{ field }}</span>
|
{% if field.description %}
|
||||||
|
<i
|
||||||
|
class="mdi mdi-information text-primary"
|
||||||
|
data-bs-toggle="tooltip"
|
||||||
|
data-bs-placement="right"
|
||||||
|
title="{{ field.description|escape }}"
|
||||||
|
></i>
|
||||||
|
{% endif %}
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
{% customfield_value field value %}
|
{% customfield_value field value %}
|
||||||
|
Loading…
Reference in New Issue
Block a user