Improved styling of the BOM edit

This commit is contained in:
Jan Böhmer 2022-12-27 13:03:19 +01:00
parent b83b55b8d4
commit a3ee51e76b
6 changed files with 66 additions and 11 deletions

View file

@ -25,18 +25,28 @@
{% form_theme form.bom_entries with ['Form/collection_types_layout.html.twig'] %}
{% import 'components/collection_type.macro.html.twig' as collection %}
<div {{ collection.controller(form.bom_entries, 'attachment.edit.delete.confirm') }}>
<table class="table table-striped table-sm" {{ collection.target() }}>
<div {{ collection.controller(form.bom_entries, 'project.bom.delete.confirm') }}>
<table class="table table-striped table-bordered table-sm" {{ collection.target() }}>
<thead>
<tr>
<th></th> {# expand button #}
<th>{% trans %}project.bom.quantity{% endtrans %}</th>
<th>{% trans %}project.bom.part{% endtrans %}</th>
<th>{% trans %}project.bom.name{% endtrans %}</th>
<th></th> {# Remove button #}
</tr>
</thead>
<tbody>
{% for attachment in form.bom_entries %}
{{ form_widget(attachment) }}
{% for entry in form.bom_entries %}
{{ form_widget(entry) }}
{% endfor %}
</tbody>
</table>
<button type="button" class="btn btn-success" {{ collection.create_btn() }}>
<button type="button" class="btn btn-success mb-2" {{ collection.create_btn() }}>
<i class="fas fa-plus-square fa-fw"></i>
{% trans %}attachment.create{% endtrans %}
{% trans %}project.bom.add_entry{% endtrans %}
</button>
</div>
</div>