Clean up table sizing; remove cards

This commit is contained in:
jeremystretch 2021-07-11 21:24:36 -04:00
parent 0f99e5fcaa
commit 1b132379be
4 changed files with 54 additions and 84 deletions

View File

@ -4,39 +4,29 @@
{% block title %}Delete {{ table.rows|length }} {{ obj_type_plural|bettertitle }}?{% endblock %}
{% block content %}
<div class="row">
<div class="col col-md-12 col-lg-8 offset-lg-2">
<div class="alert alert-danger mb-3" role="alert">
<h4 class="alert-heading">Confirm Bulk Deletion</h4>
<hr />
<div>
<strong>Warning:</strong> The following operation will delete <strong>{{ table.rows|length }}</strong> {{ obj_type_plural }}. Please carefully review the {{ obj_type_plural }} to be deleted and confirm below.
</div>
{% block message_extra %}{% endblock %}
<div class="container-md px-0">
<div class="alert alert-danger mb-3" role="alert">
<h4 class="alert-heading">Confirm Bulk Deletion</h4>
<hr />
<div>
<strong>Warning:</strong> The following operation will delete <strong>{{ table.rows|length }}</strong> {{ obj_type_plural }}. Please carefully review the {{ obj_type_plural }} to be deleted and confirm below.
</div>
{% block message_extra %}{% endblock %}
</div>
</div>
<div class="row">
<div class="col col-md-12 col-lg-8 offset-lg-2">
<div class="card">
<div class="card-body">
{% include 'inc/table.html' %}
</div>
<div class="container-xl px-0">
{% include 'inc/table.html' %}
<div class="row mt-3">
<form action="" method="post">
{% csrf_token %}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
<div class="text-end">
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
<button type="submit" name="_confirm" class="btn btn-danger">Delete {{ table.rows|length }} {{ obj_type_plural }}</button>
</div>
</div>
</form>
</div>
<div class="row mt-3">
<div class="col col-md-12 col-lg-8 offset-lg-2">
<form action="" method="post">
{% csrf_token %}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
<div class="text-end">
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
<button type="submit" name="_confirm" class="btn btn-danger">Delete {{ table.rows|length }} {{ obj_type_plural }}</button>
</div>
</form>
</div>
</div>
{% endblock content %}

View File

@ -15,11 +15,7 @@
{% endfor %}
<div class="row mb-3">
<div class="col col-md-8">
<div class="card">
<div class="card-body">
{% include 'inc/table.html' %}
</div>
</div>
{% include 'inc/table.html' %}
</div>
<div class="col col-md-4">
<div class="card">

View File

@ -4,37 +4,25 @@
{% block title %}Remove {{ table.rows|length }} {{ obj_type_plural|bettertitle }}?{% endblock %}
{% block content %}
<div class="row mb-3">
<div class="col col-md-6 offset-md-3">
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">Confirm Bulk Removal</h4>
<p><strong>Warning:</strong> The following operation will remove {{ table.rows|length }} {{ obj_type_plural }} from {{ parent_obj }}.</p>
<hr />
<p class="mb-0">Please carefully review the {{ obj_type_plural }} to be removed and confirm below.</p>
</div>
</div>
<div class="container-md px-0">
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">Confirm Bulk Removal</h4>
<p><strong>Warning:</strong> The following operation will remove {{ table.rows|length }} {{ obj_type_plural }} from {{ parent_obj }}.</p>
<hr />
<p class="mb-0">Please carefully review the {{ obj_type_plural }} to be removed and confirm below.</p>
</div>
</div>
<div class="row mb-3">
<div class="col col-md-12">
<div class="card">
<div class="card-body">
{% include 'inc/table.html' %}
</div>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col col-md-6 offset-md-3">
<form action="." method="post" class="form">
{% csrf_token %}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
<div class="text-center">
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
<button type="submit" name="_confirm" class="btn btn-danger">Delete these {{ table.rows|length }} {{ obj_type_plural }}</button>
</div>
</form>
<div class="container-xl px-0">
{% include 'inc/table.html' %}
<form action="." method="post" class="form">
{% csrf_token %}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
<div class="text-center">
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
<button type="submit" name="_confirm" class="btn btn-danger">Delete these {{ table.rows|length }} {{ obj_type_plural }}</button>
</div>
</form>
</div>
{% endblock content %}

View File

@ -7,26 +7,22 @@
{% block content %}
<div class="row mb-3">
<div class="col col-md-7">
<div class="card">
<div class="card-body">
<table class="table">
<thead>
<tr>
<th>Current Name</th>
<th>New Name</th>
</tr>
</thead>
<tbody>
{% for obj in selected_objects %}
<tr{% if obj.new_name and obj.name != obj.new_name %} class="success"{% endif %}>
<td>{{ obj.name }}</td>
<td>{{ obj.new_name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<table class="table">
<thead>
<tr>
<th>Current Name</th>
<th>New Name</th>
</tr>
</thead>
<tbody>
{% for obj in selected_objects %}
<tr{% if obj.new_name and obj.name != obj.new_name %} class="success"{% endif %}>
<td>{{ obj.name }}</td>
<td>{{ obj.new_name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="col col-md-5">
<form action="" method="post" class="form form-horizontal">