2019-04-26 18:31:09 +02:00
|
|
|
{% extends "AdminPages/EntityAdminBase.html.twig" %}
|
|
|
|
|
|
|
|
{% block card_title %}
|
|
|
|
<i class="fas fa-archive fa-fw"></i> {% trans %}device.caption{% endtrans %}
|
2020-05-11 22:59:25 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block edit_title %}
|
|
|
|
{% trans %}device.edit{% endtrans %}: {{ entity.name }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block new_title %}
|
|
|
|
{% trans %}device.new{% endtrans %}
|
2022-12-18 20:34:25 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
2022-12-23 13:12:22 +01:00
|
|
|
{% block additional_pills %}
|
|
|
|
<li class="nav-item"><a data-bs-toggle="tab" class="nav-link link-anchor" href="#bom">BOM</a></li>
|
|
|
|
{% endblock %}
|
|
|
|
|
2022-12-18 20:34:25 +01:00
|
|
|
{% block additional_controls %}
|
|
|
|
{{ form_row(form.description) }}
|
2022-12-23 13:12:22 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block additional_panes %}
|
|
|
|
<div class="tab-pane" id="bom">
|
|
|
|
{% form_theme form.bom_entries with ['Form/collection_types_layout.html.twig'] %}
|
|
|
|
|
|
|
|
{% import 'components/collection_type.macro.html.twig' as collection %}
|
2022-12-27 13:03:19 +01:00
|
|
|
<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>
|
|
|
|
|
2022-12-23 13:12:22 +01:00
|
|
|
<tbody>
|
2022-12-27 13:03:19 +01:00
|
|
|
{% for entry in form.bom_entries %}
|
|
|
|
{{ form_widget(entry) }}
|
2022-12-23 13:12:22 +01:00
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2022-12-27 13:03:19 +01:00
|
|
|
<button type="button" class="btn btn-success mb-2" {{ collection.create_btn() }}>
|
2022-12-23 13:12:22 +01:00
|
|
|
<i class="fas fa-plus-square fa-fw"></i>
|
2022-12-27 13:03:19 +01:00
|
|
|
{% trans %}project.bom.add_entry{% endtrans %}
|
2022-12-23 13:12:22 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-04-26 18:31:09 +02:00
|
|
|
{% endblock %}
|