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

52 lines
2.6 KiB
HTML
Raw Normal View History

{% extends 'dcim/device/base.html' %}
{% load render_table from django_tables2 %}
{% load helpers %}
{% load static %}
{% block content %}
<form method="post">
{% csrf_token %}
<div class="card">
<div class="card-header">
<h5>Device Bays</h5>
<div class="float-end noprint">
{% if request.user.is_authenticated %}
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#DeviceDeviceBayTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
{% endif %}
</div>
</div>
<div class="card-body">
{% render_table devicebay_table 'inc/table.html' %}
</div>
<div class="card-footer noprint">
{% if perms.dcim.change_devicebay %}
<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">
<i class="bi bi-input-cursor-text" aria-hidden="true"></i> Rename
</button>
<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
</button>
{% endif %}
{% if perms.dcim.delete_devicebay %}
<button type="submit" formaction="{% url 'dcim:devicebay_bulk_delete' %}?return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-outline-danger btn-sm">
<i class="bi bi-trash-fill" aria-hidden="true"></i> Delete selected
</button>
{% endif %}
{% if perms.dcim.add_devicebay %}
<div class="float-end">
<a href="{% url 'dcim:devicebay_add' %}?device={{ object.pk }}&return_url={{ object.get_absolute_url }}%23tab_devicebays" class="btn btn-primary btn-sm">
<i class="bi bi-plus" aria-hidden="true"></i> Add Device Bays
</a>
</div>
{% endif %}
<div class="clearfix"></div>
</div>
</div>
</form>
{% table_config_form devicebay_table %}
{% endblock %}
{% block javascript %}
<script src="{% static 'js/tableconfig.js' %}?v{{ settings.VERSION }}"></script>
{% endblock %}