|
@@ -1,31 +1,9 @@
|
|
|
-{% extends 'generic/object.html' %}
|
|
|
|
|
|
|
+{% extends 'dcim/rack/base.html' %}
|
|
|
{% load buttons %}
|
|
{% load buttons %}
|
|
|
{% load helpers %}
|
|
{% load helpers %}
|
|
|
{% load static %}
|
|
{% load static %}
|
|
|
{% load plugins %}
|
|
{% load plugins %}
|
|
|
|
|
|
|
|
-{% block title %}Rack {{ object }}{% endblock %}
|
|
|
|
|
-
|
|
|
|
|
-{% block breadcrumbs %}
|
|
|
|
|
- {{ block.super }}
|
|
|
|
|
- <li class="breadcrumb-item"><a href="{% url 'dcim:rack_list' %}?site_id={{ object.site.pk }}">{{ object.site }}</a></li>
|
|
|
|
|
- {% if object.location %}
|
|
|
|
|
- {% for location in object.location.get_ancestors %}
|
|
|
|
|
- <li class="breadcrumb-item"><a href="{% url 'dcim:rack_list' %}?location_id={{ location.pk }}">{{ location }}</a></li>
|
|
|
|
|
- {% endfor %}
|
|
|
|
|
- <li class="breadcrumb-item"><a href="{% url 'dcim:rack_list' %}?location_id={{ object.location.pk }}">{{ object.location }}</a></li>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
-{% endblock %}
|
|
|
|
|
-
|
|
|
|
|
-{% block extra_controls %}
|
|
|
|
|
- <a {% if prev_rack %}href="{% url 'dcim:rack' pk=prev_rack.pk %}{% endif %}" class="btn btn-sm btn-primary{% if not prev_rack %} disabled{% endif %}">
|
|
|
|
|
- <i class="mdi mdi-chevron-left" aria-hidden="true"></i> Previous
|
|
|
|
|
- </a>
|
|
|
|
|
- <a {% if next_rack %}href="{% url 'dcim:rack' pk=next_rack.pk %}{% endif %}" class="btn btn-sm btn-primary{% if not next_rack %} disabled{% endif %}">
|
|
|
|
|
- <i class="mdi mdi-chevron-right" aria-hidden="true"></i> Next
|
|
|
|
|
- </a>
|
|
|
|
|
-{% endblock %}
|
|
|
|
|
-
|
|
|
|
|
{% block content %}
|
|
{% block content %}
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<div class="col col-12 col-xl-5">
|
|
<div class="col col-12 col-xl-5">
|
|
@@ -187,55 +165,6 @@
|
|
|
{% include 'inc/panels/tags.html' %}
|
|
{% include 'inc/panels/tags.html' %}
|
|
|
{% include 'inc/panels/comments.html' %}
|
|
{% include 'inc/panels/comments.html' %}
|
|
|
{% include 'inc/panels/image_attachments.html' %}
|
|
{% include 'inc/panels/image_attachments.html' %}
|
|
|
- <div class="card">
|
|
|
|
|
- <h5 class="card-header">
|
|
|
|
|
- Reservations
|
|
|
|
|
- </h5>
|
|
|
|
|
- <div class="card-body">
|
|
|
|
|
- {% if reservations %}
|
|
|
|
|
- <table class="table table-hover">
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>Units</th>
|
|
|
|
|
- <th>Tenant</th>
|
|
|
|
|
- <th>Description</th>
|
|
|
|
|
- <th></th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- {% for resv in reservations %}
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td>{{ resv|linkify:"unit_list" }}</td>
|
|
|
|
|
- <td>{{ resv.tenant|linkify|placeholder }}</td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {{ resv.description }}<br />
|
|
|
|
|
- <small>{{ resv.user }} · {{ resv.created|annotated_date }}</small>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td class="text-end noprint">
|
|
|
|
|
- {% if perms.dcim.change_rackreservation %}
|
|
|
|
|
- <a href="{% url 'dcim:rackreservation_edit' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-sm" title="Edit Reservation">
|
|
|
|
|
- <i class="mdi mdi-pencil" aria-hidden="true"></i>
|
|
|
|
|
- </a>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- {% if perms.dcim.delete_rackreservation %}
|
|
|
|
|
- <a href="{% url 'dcim:rackreservation_delete' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger btn-sm" title="Delete Reservation">
|
|
|
|
|
- <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
|
|
|
|
|
- </a>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- {% endfor %}
|
|
|
|
|
- </table>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <div class="text-muted">None</div>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- </div>
|
|
|
|
|
- {% if perms.dcim.add_rackreservation %}
|
|
|
|
|
- <div class="card-footer text-end noprint">
|
|
|
|
|
- <a href="{% url 'dcim:rackreservation_add' %}?rack={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-sm">
|
|
|
|
|
- <i class="mdi mdi-plus-thick" aria-hidden="true"></i>
|
|
|
|
|
- Add a Reservation
|
|
|
|
|
- </a>
|
|
|
|
|
- </div>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- </div>
|
|
|
|
|
{% plugin_left_page object %}
|
|
{% plugin_left_page object %}
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col col-12 col-xl-7">
|
|
<div class="col col-12 col-xl-7">
|