mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-18 05:28:16 -06:00
Separate bulk delete form & object list into tabs
This commit is contained in:
parent
08ee45bccb
commit
9b2c258e6a
@ -18,23 +18,37 @@ Context:
|
||||
{% trans "Delete" %} {{ table.rows|length }} {{ model|meta:"verbose_name_plural"|bettertitle }}?
|
||||
{% endblock %}
|
||||
|
||||
{% block tabs %}
|
||||
<ul class="nav nav-tabs px-3">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="delete-form-tab" data-bs-toggle="tab" data-bs-target="#delete-form" type="button" role="tab" aria-controls="delete-form" aria-selected="true">
|
||||
{% trans "Bulk Delete" %}
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="object-list-tab" data-bs-toggle="tab" data-bs-target="#object-list" type="button" role="tab" aria-controls="object-list" aria-selected="false">
|
||||
{% trans "Selected Objects" %}
|
||||
{% badge table.rows|length %}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock tabs %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-md px-0">
|
||||
|
||||
{# Confirmation form #}
|
||||
<div class="tab-pane show active" id="delete-form" role="tabpanel" aria-labelledby="delete-form-tab">
|
||||
<div class="alert alert-danger mb-3" role="alert">
|
||||
<h4 class="alert-heading">{% trans "Confirm Bulk Deletion" %}</h4>
|
||||
<hr />
|
||||
<strong>{% trans "Warning" context "Noun" %}:</strong>
|
||||
{% blocktrans trimmed with count=table.rows|length type_plural=model|meta:"verbose_name_plural" %}
|
||||
The following operation will delete <strong>{{ count }}</strong> {{ type_plural }}. Please
|
||||
carefully review the objects to be deleted and confirm below.
|
||||
carefully review the selected objects and confirm this action.
|
||||
{% endblocktrans %}
|
||||
{% block message_extra %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-xl px-0">
|
||||
<div class="table-responsive">
|
||||
{% render_table table 'inc/table.html' %}
|
||||
</div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
@ -48,4 +62,16 @@ Context:
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{# /Confirmation form #}
|
||||
|
||||
{# Selected objects list #}
|
||||
<div class="tab-pane" id="object-list" role="tabpanel" aria-labelledby="object-list-tab">
|
||||
<div class="card">
|
||||
<div class="card-body table-responsive">
|
||||
{% render_table table 'inc/table.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# /Selected objects list #}
|
||||
|
||||
{% endblock content %}
|
||||
|
Loading…
Reference in New Issue
Block a user