9654 add weight fields to devices

This commit is contained in:
Arthur 2022-09-23 10:52:58 -07:00
parent 61903dbac4
commit 79ec8925b2
2 changed files with 20 additions and 0 deletions

View File

@ -35,6 +35,16 @@
<td>Full Depth</td> <td>Full Depth</td>
<td>{% checkmark object.is_full_depth %}</td> <td>{% checkmark object.is_full_depth %}</td>
</tr> </tr>
<tr>
<td>Weight</td>
<td>
{% if object.weight %}
{{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr> <tr>
<td>Parent/Child</td> <td>Parent/Child</td>
<td> <td>

View File

@ -22,6 +22,16 @@
<td>Part Number</td> <td>Part Number</td>
<td>{{ object.part_number|placeholder }}</td> <td>{{ object.part_number|placeholder }}</td>
</tr> </tr>
<tr>
<td>Weight</td>
<td>
{% if object.weight %}
{{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr> <tr>
<td>Instances</td> <td>Instances</td>
<td><a href="{% url 'dcim:module_list' %}?module_type_id={{ object.pk }}">{{ instance_count }}</a></td> <td><a href="{% url 'dcim:module_list' %}?module_type_id={{ object.pk }}">{{ instance_count }}</a></td>