mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* initial work to render hierarchical region #13735 * adds site display #13735 * cleanup #13735 * adds display region tag #13735 * refactored region hierarchy #13735 * refactored region hierarchy #13735 * renamed display_region to nested_tree #13735 * Make render_tree suitable for generic use * Remove errant item from __all__ --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
104 lines
3.8 KiB
HTML
104 lines
3.8 KiB
HTML
{% extends 'generic/object.html' %}
|
|
{% load buttons %}
|
|
{% load helpers %}
|
|
{% load static %}
|
|
{% load plugins %}
|
|
{% load i18n %}
|
|
{% load mptt %}
|
|
|
|
{% block breadcrumbs %}
|
|
{{ block.super }}
|
|
<li class="breadcrumb-item"><a href="{% url 'dcim:rackreservation_list' %}?rack_id={{ object.rack.pk }}">{{ object.rack }}</a></li>
|
|
<li class="breadcrumb-item">{% trans "Units" %} {{ object.unit_list }}</li>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row mb-3">
|
|
<div class="col col-12 col-xl-5">
|
|
<div class="card">
|
|
<h5 class="card-header">
|
|
{% trans "Rack" %}
|
|
</h5>
|
|
<div class="card-body">
|
|
<table class="table table-hover attr-table">
|
|
<tr>
|
|
<th scope="row">{% trans "Region" %}</th>
|
|
<td>
|
|
{% nested_tree object.rack.site.region %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Site" %}</th>
|
|
<td>{{ object.rack.site|linkify }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Location" %}</th>
|
|
<td>{{ object.rack.location|linkify|placeholder }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Rack" %}</th>
|
|
<td>{{ object.rack|linkify }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<h5 class="card-header">
|
|
{% trans "Reservation Details" %}
|
|
</h5>
|
|
<div class="card-body">
|
|
<table class="table table-hover attr-table">
|
|
<tr>
|
|
<th scope="row">{% trans "Units" %}</th>
|
|
<td>{{ object.unit_list }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Tenant" %}</th>
|
|
<td>
|
|
{% if object.tenant.group %}
|
|
{{ object.tenant.group|linkify }} /
|
|
{% endif %}
|
|
{{ object.tenant|linkify|placeholder }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "User" %}</th>
|
|
<td>{{ object.user }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">{% trans "Description" %}</th>
|
|
<td>{{ object.description }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% include 'inc/panels/custom_fields.html' %}
|
|
{% include 'inc/panels/tags.html' %}
|
|
{% include 'inc/panels/comments.html' %}
|
|
{% plugin_left_page object %}
|
|
</div>
|
|
<div class="col col-12 col-xl-7">
|
|
<div class="row" style="margin-bottom: 20px">
|
|
<div class="col col-md-6 col-sm-6 col-xs-12 text-center">
|
|
<div style="margin-left: 30px">
|
|
<h4>{% trans "Front" %}</h4>
|
|
{% include 'dcim/inc/rack_elevation.html' with object=object.rack face='front' %}
|
|
</div>
|
|
</div>
|
|
<div class="col col-md-6 col-sm-6 col-xs-12 text-center">
|
|
<div style="margin-left: -30px">
|
|
<h4>{% trans "Rear" %}</h4>
|
|
{% include 'dcim/inc/rack_elevation.html' with object=object.rack face='rear' %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% plugin_right_page object %}
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col col-md-12">
|
|
{% plugin_full_width_page object %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|