mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 08:38:16 -06:00
Clean up templates
This commit is contained in:
parent
fdb5bb6a1a
commit
abab214222
48
netbox/templates/dcim/inc/panels/racktype_dimensions.html
Normal file
48
netbox/templates/dcim/inc/panels/racktype_dimensions.html
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
<div class="card">
|
||||||
|
<h5 class="card-header">{% trans "Dimensions" %}</h5>
|
||||||
|
<table class="table table-hover attr-table">
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Form factor" %}</th>
|
||||||
|
<td>{{ object.get_form_factor_display|placeholder }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Width" %}</th>
|
||||||
|
<td>{{ object.get_width_display }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Height" %}</th>
|
||||||
|
<td>{{ object.u_height }}U</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Outer Width" %}</th>
|
||||||
|
<td>
|
||||||
|
{% if object.outer_width %}
|
||||||
|
{{ object.outer_width }} {{ object.get_outer_unit_display }}
|
||||||
|
{% else %}
|
||||||
|
{{ ''|placeholder }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Outer Depth" %}</th>
|
||||||
|
<td>
|
||||||
|
{% if object.outer_depth %}
|
||||||
|
{{ object.outer_depth }} {{ object.get_outer_unit_display }}
|
||||||
|
{% else %}
|
||||||
|
{{ ''|placeholder }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Mounting Depth" %}</th>
|
||||||
|
<td>
|
||||||
|
{% if object.mounting_depth %}
|
||||||
|
{{ object.mounting_depth }} {% trans "Millimeters" %}
|
||||||
|
{% else %}
|
||||||
|
{{ ''|placeholder }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
14
netbox/templates/dcim/inc/panels/racktype_numbering.html
Normal file
14
netbox/templates/dcim/inc/panels/racktype_numbering.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
<div class="card">
|
||||||
|
<h5 class="card-header">{% trans "Numbering" %}</h5>
|
||||||
|
<table class="table table-hover attr-table">
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Starting Unit" %}</th>
|
||||||
|
<td>{{ object.starting_unit }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{% trans "Descending Units" %}</th>
|
||||||
|
<td>{% checkmark object.desc_units %}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
@ -14,9 +14,7 @@
|
|||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Region" %}</th>
|
<th scope="row">{% trans "Region" %}</th>
|
||||||
<td>
|
<td>{% nested_tree object.site.region %}</td>
|
||||||
{% nested_tree object.site.region %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Site" %}</th>
|
<th scope="row">{% trans "Site" %}</th>
|
||||||
@ -73,57 +71,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
{% include 'dcim/inc/panels/racktype_dimensions.html' %}
|
||||||
|
{% include 'dcim/inc/panels/racktype_numbering.html' %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Dimensions" %}</h5>
|
<h5 class="card-header">{% trans "Weight" %}</h5>
|
||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Form factor" %}</th>
|
|
||||||
<td>{{ object.get_form_factor_display|placeholder }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Width" %}</th>
|
|
||||||
<td>{{ object.get_width_display }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Height" %}</th>
|
|
||||||
<td>{{ object.u_height }}U ({% if object.desc_units %}{% trans "descending" %}{% else %}{% trans "ascending" %}{% endif %})</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Starting Unit" %}</th>
|
|
||||||
<td>
|
|
||||||
{{ object.starting_unit }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Outer Width" %}</th>
|
|
||||||
<td>
|
|
||||||
{% if object.outer_width %}
|
|
||||||
{{ object.outer_width }} {{ object.get_outer_unit_display }}
|
|
||||||
{% else %}
|
|
||||||
{{ ''|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Outer Depth" %}</th>
|
|
||||||
<td>
|
|
||||||
{% if object.outer_depth %}
|
|
||||||
{{ object.outer_depth }} {{ object.get_outer_unit_display }}
|
|
||||||
{% else %}
|
|
||||||
{{ ''|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Mounting Depth" %}</th>
|
|
||||||
<td>
|
|
||||||
{% if object.mounting_depth %}
|
|
||||||
{{ object.mounting_depth }} {% trans "Millimeters" %}
|
|
||||||
{% else %}
|
|
||||||
{{ ''|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Rack Weight" %}</th>
|
<th scope="row">{% trans "Rack Weight" %}</th>
|
||||||
<td>
|
<td>
|
||||||
|
@ -20,63 +20,22 @@
|
|||||||
<th scope="row">{% trans "Name" %}</th>
|
<th scope="row">{% trans "Name" %}</th>
|
||||||
<td>{{ object.name }}</td>
|
<td>{{ object.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Form factor" %}</th>
|
|
||||||
<td>{{ object.get_form_factor_display|placeholder }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Description" %}</th>
|
<th scope="row">{% trans "Description" %}</th>
|
||||||
<td>{{ object.description|placeholder }}</td>
|
<td>{{ object.description|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
{% include 'dcim/inc/panels/racktype_dimensions.html' %}
|
||||||
|
{% include 'inc/panels/tags.html' %}
|
||||||
|
{% include 'inc/panels/comments.html' %}
|
||||||
|
{% plugin_left_page object %}
|
||||||
|
</div>
|
||||||
|
<div class="col col-6">
|
||||||
|
{% include 'dcim/inc/panels/racktype_numbering.html' %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Dimensions" %}</h5>
|
<h5 class="card-header">{% trans "Weight" %}</h5>
|
||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Width" %}</th>
|
|
||||||
<td>{{ object.get_width_display }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Height" %}</th>
|
|
||||||
<td>{{ object.u_height }}U ({% if object.desc_units %}{% trans "descending" %}{% else %}{% trans "ascending" %}{% endif %})</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Starting Unit" %}</th>
|
|
||||||
<td>
|
|
||||||
{{ object.starting_unit }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Outer Width" %}</th>
|
|
||||||
<td>
|
|
||||||
{% if object.outer_width %}
|
|
||||||
{{ object.outer_width }} {{ object.get_outer_unit_display }}
|
|
||||||
{% else %}
|
|
||||||
{{ ''|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Outer Depth" %}</th>
|
|
||||||
<td>
|
|
||||||
{% if object.outer_depth %}
|
|
||||||
{{ object.outer_depth }} {{ object.get_outer_unit_display }}
|
|
||||||
{% else %}
|
|
||||||
{{ ''|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">{% trans "Mounting Depth" %}</th>
|
|
||||||
<td>
|
|
||||||
{% if object.mounting_depth %}
|
|
||||||
{{ object.mounting_depth }} {% trans "Millimeters" %}
|
|
||||||
{% else %}
|
|
||||||
{{ ''|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Rack Weight" %}</th>
|
<th scope="row">{% trans "Rack Weight" %}</th>
|
||||||
<td>
|
<td>
|
||||||
@ -99,11 +58,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/panels/tags.html' %}
|
|
||||||
{% include 'inc/panels/comments.html' %}
|
|
||||||
{% plugin_left_page object %}
|
|
||||||
</div>
|
|
||||||
<div class="col col-6">
|
|
||||||
{% include 'inc/panels/custom_fields.html' %}
|
{% include 'inc/panels/custom_fields.html' %}
|
||||||
{% include 'inc/panels/related_objects.html' %}
|
{% include 'inc/panels/related_objects.html' %}
|
||||||
{% plugin_right_page object %}
|
{% plugin_right_page object %}
|
||||||
|
Loading…
Reference in New Issue
Block a user