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

Closes #450: Add 'outer_width' and 'outer_depth' fields to Rack

This commit is contained in:
Jeremy Stretch
2018-11-02 09:51:17 -04:00
parent 4ffe1866c5
commit c60c5502f6
9 changed files with 111 additions and 11 deletions

View File

@@ -172,6 +172,26 @@
<td>Height</td>
<td>{{ rack.u_height }}U ({% if rack.desc_units %}descending{% else %}ascending{% endif %})</td>
</tr>
<tr>
<td>Outer Width</td>
<td>
{% if rack.outer_width %}
<span>{{ rack.outer_width }}{{ rack.outer_unit }}</span>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
</tr>
<tr>
<td>Outer Depth</td>
<td>
{% if rack.outer_depth %}
<span>{{ rack.outer_depth }}{{ rack.outer_unit }}</span>
{% else %}
<span class="text-muted">&mdash;</span>
{% endif %}
</td>
</tr>
</table>
</div>
{% include 'inc/custom_fields_panel.html' with obj=rack %}

View File

@@ -28,6 +28,18 @@
{% render_field form.type %}
{% render_field form.width %}
{% render_field form.u_height %}
<div class="form-group">
<label class="col-md-3 control-label">Outer dimensions</label>
<div class="col-md-3">
{{ form.outer_width }}
</div>
<div class="col-md-3">
{{ form.outer_depth }}
</div>
<div class="col-md-2">
{{ form.outer_unit }}
</div>
</div>
{% render_field form.desc_units %}
</div>
</div>