mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* Enable HTMX rendering for embedded tables * Start converting embedded tables to use HTMX (WIP) * Additional table conversions (WIP) * Standardize HTMX usage for nested group models * Enable HTMX for additional emebedded tables * Fix HTMX table rendering for ObjectChildrenView * Standardize usage of inc/panel_table.html * Hide selection boxes in embedded tables
58 lines
2.5 KiB
HTML
58 lines
2.5 KiB
HTML
{% extends 'dcim/device/base.html' %}
|
|
{% load render_table from django_tables2 %}
|
|
{% load helpers %}
|
|
{% load static %}
|
|
|
|
{% block content %}
|
|
{% include 'inc/table_controls_htmx.html' with table_modal="DevicePowerOutletTable_config" %}
|
|
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
|
|
<div class="card">
|
|
<div class="card-body htmx-container table-responsive" id="object_list">
|
|
{% include 'htmx/table.html' %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="noprint bulk-buttons">
|
|
<div class="bulk-button-group">
|
|
{% if 'bulk_edit' in actions %}
|
|
<div class="btn-group" role="group">
|
|
<button type="submit" name="_edit" formaction="{% url 'dcim:poweroutlet_bulk_edit' %}?device={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-warning btn-sm">
|
|
<i class="mdi mdi-pencil" aria-hidden="true"></i> Edit
|
|
</button>
|
|
<button type="submit" name="_rename" formaction="{% url 'dcim:poweroutlet_bulk_rename' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-outline-warning btn-sm">
|
|
<i class="mdi mdi-pencil-outline" aria-hidden="true"></i> Rename
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
<div class="btn-group" role="group">
|
|
{% if 'bulk_delete' in actions %}
|
|
<button type="submit" formaction="{% url 'dcim:poweroutlet_bulk_delete' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-danger btn-sm">
|
|
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> Delete
|
|
</button>
|
|
{% endif %}
|
|
{% if 'bulk_edit' in actions %}
|
|
<button type="submit" name="_disconnect" formaction="{% url 'dcim:poweroutlet_bulk_disconnect' %}?return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-outline-danger btn-sm">
|
|
<span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> Disconnect
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% if perms.dcim.add_poweroutlet %}
|
|
<div class="bulk-button-group">
|
|
<a href="{% url 'dcim:poweroutlet_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-primary btn-sm">
|
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add Power Outlets
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|
|
|
|
{% block modals %}
|
|
{{ block.super }}
|
|
{% table_config_form table %}
|
|
{% endblock modals %}
|