2023-02-04 23:34:39 +01:00
|
|
|
{% extends "admin/base_admin.html.twig" %}
|
2019-04-26 18:31:09 +02:00
|
|
|
|
2022-12-29 16:21:04 +01:00
|
|
|
{# @var entity App\Entity\ProjectSystem\Project #}
|
|
|
|
|
2019-04-26 18:31:09 +02:00
|
|
|
{% block card_title %}
|
2023-01-08 19:36:56 +01:00
|
|
|
<i class="fas fa-archive fa-fw"></i> {% trans %}project.caption{% endtrans %}
|
2020-05-11 22:59:25 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block edit_title %}
|
2023-01-08 19:36:56 +01:00
|
|
|
{% trans %}project.edit{% endtrans %}: {{ entity.name }}
|
2020-05-11 22:59:25 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block new_title %}
|
2023-01-08 19:36:56 +01:00
|
|
|
{% trans %}project.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 %}
|
|
|
|
|
2023-01-08 23:14:25 +01:00
|
|
|
{% block quick_links %}
|
2023-02-05 20:00:11 +01:00
|
|
|
<div class="btn-toolbar" style="display: inline-block;">
|
2023-01-08 23:14:25 +01:00
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-outline-secondary" href="{{ entity_url(entity) }}"><i class="fas fa-eye fa-fw"></i></a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
2022-12-18 20:34:25 +01:00
|
|
|
{% block additional_controls %}
|
|
|
|
{{ form_row(form.description) }}
|
2022-12-29 15:22:34 +01:00
|
|
|
{{ form_row(form.status) }}
|
2022-12-29 16:21:04 +01:00
|
|
|
{% if entity.id %}
|
|
|
|
<div class="mb-2 row">
|
|
|
|
<label class="col-form-label col-sm-3">{% trans %}project.edit.associated_build_part{% endtrans %}</label>
|
|
|
|
<div class="col-sm-9">
|
|
|
|
{% if entity.buildPart %}
|
|
|
|
<span class="form-control-static"><a href="{{ entity_url(entity.buildPart) }}">{{ entity.buildPart.name }}</a></span>
|
|
|
|
{% else %}
|
2023-11-11 23:14:22 +01:00
|
|
|
<a href="{{ path('part_new_build_part', {"project_id": entity.id , "_redirect": app.request.baseUrl ~ app.request.requestUri}) }}"
|
2022-12-29 16:21:04 +01:00
|
|
|
class="btn btn-outline-success">{% trans %}project.edit.associated_build_part.add{% endtrans %}</a>
|
|
|
|
{% endif %}
|
|
|
|
<p class="text-muted">{% trans %}project.edit.associated_build.hint{% endtrans %}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2022-12-23 13:12:22 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block additional_panes %}
|
|
|
|
<div class="tab-pane" id="bom">
|
2023-02-04 23:21:36 +01:00
|
|
|
{% form_theme form.bom_entries with ['form/collection_types_layout.html.twig'] %}
|
2022-12-29 17:52:13 +01:00
|
|
|
{{ form_errors(form.bom_entries) }}
|
2022-12-28 23:06:52 +01:00
|
|
|
{{ form_widget(form.bom_entries) }}
|
2023-03-16 23:56:46 +01:00
|
|
|
{% if entity.id %}
|
|
|
|
<a href="{{ path('project_import_bom', {'id': entity.id}) }}" class="btn btn-secondary mb-2"
|
|
|
|
{% if not is_granted('edit', entity) %}disabled="disabled"{% endif %}>
|
|
|
|
<i class="fa-solid fa-file-import fa-fw"></i>
|
|
|
|
{% trans %}project.edit.bom.import_bom{% endtrans %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2022-12-23 13:12:22 +01:00
|
|
|
</div>
|
2019-04-26 18:31:09 +02:00
|
|
|
{% endblock %}
|