9654 total weight on devices

This commit is contained in:
Arthur 2022-09-29 15:26:57 -07:00
parent e3cc5f9ffd
commit 44e8c35e0c
2 changed files with 27 additions and 2 deletions

View File

@ -110,6 +110,31 @@
</table>
</div>
</div>
{% if object.get_total_weight %}
<div class="card">
<h5 class="card-header">
Weight
</h5>
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th scope="row">Device Weight</th>
<td>
{% if object.device_type.weight %}
{{ object.device_type.weight|floatformat }} {{ object.device_type.get_weight_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Total Weight</th>
<td>{{ object.get_total_weight|floatformat }} Kilograms</td>
</tr>
</table>
</div>
</div>
{% endif %}
{% if vc_members %}
<div class="card">
<h5 class="card-header">

View File

@ -198,7 +198,7 @@
<th scope="row">Rack Weight</th>
<td>
{% if object.weight %}
{{ object.weight }}
{{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
{% else %}
{{ ''|placeholder }}
{% endif %}
@ -206,7 +206,7 @@
</tr>
<tr>
<th scope="row">Total Weight</th>
<td>{{ object.get_total_weight }} kg</td>
<td>{{ object.get_total_weight|floatformat }} Kilograms</td>
</tr>
</table>
</div>