Part-DB.Part-DB-server/templates/Parts/edit/_orderdetails.html.twig
2022-08-03 19:26:16 +02:00

18 lines
974 B
Twig

{# Leave this template at bootstrap 4 for now, as it otherwise destroys our layout #}
{% form_theme form.orderdetails with ['Parts/edit/edit_form_styles.html.twig', "bootstrap_4_layout.html.twig"] %}
{% import 'components/collection_type.macro.html.twig' as collection %}
<div {{ collection.controller(form.orderdetails, 'orderdetails.edit.delete.confirm') }}>
<table class="table table-striped table-sm table-responsive-md" id="orderdetails_table" {{ collection.target() }}>
<tbody>
{% for detail in form.orderdetails %}
{{ form_widget(detail, {'disable_delete' : not is_granted('orderdetails.delete', part)}) }}
{% endfor %}
</tbody>
</table>
<button type="button" class="btn btn-success" {{ collection.create_btn() }} {% if not is_granted('orderdetails.create', part) %}disabled{% endif %}>
<i class="fas fa-plus-square fa-fw"></i>
{% trans %}orderdetail.create{% endtrans %}
</button>
</div>