This commit is contained in:
Ross
2025-12-05 13:33:34 +00:00
parent 78240090f1
commit bb8298b18c
9 changed files with 185 additions and 30 deletions
+44 -8
View File
@@ -2,13 +2,29 @@
{% block content %}
<section class="section">
<div class="container">
<h2 class="title is-4">Cards overview — bulk edit</h2>
<p class="subtitle is-6">Edit multiple cards inline and save changes in one go.</p>
<style>
/* Allow inputs inside the table to wrap on narrow viewports */
.table-container .field.has-addons{white-space:normal}
.table-container .control.is-expanded{width:100%}
.table-container input.input{min-width:50px}
/* Ensure thumbnails don't shrink layout unexpectedly */
.bulk-thumb{flex:none}
/* Make this page full-bleed: allow the app container to use the full viewport width */
.app-container{max-width:none; width:100%; padding-left:0.5rem; padding-right:0.5rem}
/* Remove extra section padding so content touches edges if needed */
section.section{padding-left:0; padding-right:0}
/* Table container: allow horizontal scroll and make table use full available width */
.table-container{width:100%; overflow-x:auto}
.table-container .table{min-width:1100px}
</style>
<form method="post" action="{% url 'cards:overview_bulk_update' %}">
{% csrf_token %}
<table class="table is-fullwidth is-striped">
<div class="table-container">
<table class="table is-fullwidth is-striped">
<thead>
<tr>
<th>Preview</th>
@@ -61,16 +77,37 @@
{% endfor %}
</select></div>
</td>
<td><input class="input" name="speed-{{ card.pk }}" value="{{ card.speed }}"></td>
<td><input class="input" name="weight-{{ card.pk }}" value="{{ card.weight }}"></td>
<td><input class="input" name="height-{{ card.pk }}" value="{{ card.height }}"></td>
<td><input class="input" name="intelligence-{{ card.pk }}" value="{{ card.intelligence }}"></td>
<td style="width:90px">
<div class="field has-addons">
<div class="control is-expanded"><input class="input" name="speed-{{ card.pk }}" value="{{ card.speed }}"></div>
<div class="control"><a class="button is-static">km/h</a></div>
</div>
</td>
<td style="width:90px">
<div class="field has-addons">
<div class="control is-expanded"><input class="input" name="weight-{{ card.pk }}" value="{{ card.weight }}"></div>
<div class="control"><a class="button is-static">kg</a></div>
</div>
</td>
<td style="width:90px">
<div class="field has-addons">
<div class="control is-expanded"><input class="input" name="height-{{ card.pk }}" value="{{ card.height }}"></div>
<div class="control"><a class="button is-static">m</a></div>
</div>
</td>
<td style="width:90px">
<div class="field has-addons">
<div class="control is-expanded"><input class="input" name="intelligence-{{ card.pk }}" value="{{ card.intelligence }}"></div>
<div class="control"><a class="button is-static">score</a></div>
</div>
</td>
<td>ID: {{ card.pk }}</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</table>
</div>
<div class="field">
<div class="control">
@@ -79,6 +116,5 @@
</div>
</div>
</form>
</div>
</section>
{% endblock %}