mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-13 23:32:17 -06:00
* Initial work on #19735 * Work in progress * Remove ClusterRemoveDevicesView (anti-pattern) * Misc cleanup * Fix has_bulk_actions * Fix has_bulk_actions for ObjectChildrenView * Restore clone button * Misc cleanup * Clean up custom bulk actions * Rename individual object actions * Collapse into a single template tag * Fix support for legacy action dicts * Rename bulk attr to multi * clone_button tag should fail silently if view name is invalid * Clean up action buttons * Fix export button label * Replace clone_button with an ObjectAction * Create object actions for adding device/VM components * Move core_sync.html to core app * Remove extra_bulk_buttons from template doc
49 lines
1.7 KiB
HTML
49 lines
1.7 KiB
HTML
{% extends base_template %}
|
|
{% load buttons %}
|
|
{% load helpers %}
|
|
{% load i18n %}
|
|
|
|
{% comment %}
|
|
Blocks:
|
|
- content: Primary page content
|
|
- table_controls: Control elements for the child objects table
|
|
- bulk_controls: Bulk action buttons which appear beneath the child objects table
|
|
- bulk_extra_controls: Other bulk action buttons
|
|
- modals: Any pre-loaded modals
|
|
|
|
Context:
|
|
- base_template: The template which this template extends
|
|
- object: The parent object
|
|
- child_model: The model of child objects being displayed
|
|
- table: The table containing child objects
|
|
- table_config: The ID of the table configuration modal
|
|
- actions: A list of enabled bulk actions
|
|
- tab: The currently active tab
|
|
- return_url: The URL to which the user is redirected after performing a bulk action
|
|
{% endcomment %}
|
|
|
|
{% block content %}
|
|
{% block table_controls %}
|
|
{% include 'inc/table_controls_htmx.html' with table_modal=table_config %}
|
|
{% endblock table_controls %}
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
<div class="card">
|
|
<div class="htmx-container table-responsive" id="object_list">
|
|
{% include 'htmx/table.html' %}
|
|
</div>
|
|
</div>
|
|
<div class="d-print-none mt-2">
|
|
{% block bulk_controls %}
|
|
{% action_buttons actions model multi=True %}
|
|
{% block bulk_extra_controls %}{% endblock %}
|
|
{% endblock bulk_controls %}
|
|
</div>
|
|
</form>
|
|
{% endblock content %}
|
|
|
|
{% block modals %}
|
|
{{ block.super }}
|
|
{% table_config_form table %}
|
|
{% endblock modals %}
|