2020-11-13 15:00:12 -05:00
|
|
|
{% extends 'dcim/device/base.html' %}
|
|
|
|
{% load render_table from django_tables2 %}
|
|
|
|
{% load helpers %}
|
|
|
|
{% load static %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<form method="post">
|
|
|
|
{% csrf_token %}
|
2021-03-13 14:15:23 -07:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
2021-04-18 16:42:28 -07:00
|
|
|
<h5 class="d-inline">Device Bays</h5>
|
2021-03-13 14:15:23 -07:00
|
|
|
<div class="float-end noprint">
|
|
|
|
{% if request.user.is_authenticated %}
|
2021-04-18 16:42:28 -07:00
|
|
|
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#DeviceDeviceBayTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
2021-03-13 14:15:23 -07:00
|
|
|
{% endif %}
|
2020-11-13 15:00:12 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-13 14:15:23 -07:00
|
|
|
<div class="card-body">
|
|
|
|
{% render_table devicebay_table 'inc/table.html' %}
|
|
|
|
</div>
|
|
|
|
<div class="card-footer noprint">
|
2020-11-13 15:00:12 -05:00
|
|
|
{% if perms.dcim.change_devicebay %}
|
2021-03-14 17:26:33 -07:00
|
|
|
<button type="submit" name="_rename" formaction="{% url 'dcim:devicebay_bulk_rename' %}?return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-outline-warning btn-sm">
|
2021-03-13 14:15:23 -07:00
|
|
|
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
|
2020-11-13 15:00:12 -05:00
|
|
|
</button>
|
2021-03-13 14:15:23 -07:00
|
|
|
<button type="submit" name="_edit" formaction="{% url 'dcim:devicebay_bulk_edit' %}?device={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-warning btn-sm">
|
|
|
|
<i class="bi bi-pencil-fill" aria-hidden="true"></i> Edit
|
2020-11-13 15:00:12 -05:00
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.delete_devicebay %}
|
2021-03-14 17:26:33 -07:00
|
|
|
<button type="submit" formaction="{% url 'dcim:devicebay_bulk_delete' %}?return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-outline-danger btn-sm">
|
2021-03-13 14:15:23 -07:00
|
|
|
<i class="bi bi-trash-fill" aria-hidden="true"></i> Delete selected
|
2020-11-13 15:00:12 -05:00
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.dcim.add_devicebay %}
|
2021-03-14 17:26:33 -07:00
|
|
|
<div class="float-end">
|
2021-03-13 14:15:23 -07:00
|
|
|
<a href="{% url 'dcim:devicebay_add' %}?device={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-primary btn-sm">
|
2021-03-14 17:26:33 -07:00
|
|
|
<i class="bi bi-plus" aria-hidden="true"></i> Add Device Bays
|
2020-11-13 15:00:12 -05:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2021-03-31 14:24:05 -04:00
|
|
|
{% include 'inc/paginator.html' with paginator=devicebay_table.paginator page=devicebay_table.page %}
|
2020-11-13 15:00:12 -05:00
|
|
|
{% table_config_form devicebay_table %}
|
|
|
|
{% endblock %}
|