Added an modal form on the part info page, to merge a part into another one

This commit is contained in:
Jan Böhmer 2023-11-22 22:50:25 +01:00
parent b0f5d9b55f
commit 73f6d79925
4 changed files with 167 additions and 1 deletions

View file

@ -7,7 +7,7 @@
</a>
{% endif %}
{# Create new button #}
{% if is_granted('create', part) %}
<br>
<div class="btn-group mt-2">
@ -27,6 +27,9 @@
</div>
{% endif %}
{# Merge modal #}
{% include "parts/info/_merge_modal.html.twig" %}
<form method="post" class="mt-2" action="{{ entity_url(part, 'delete') }}"
{{ stimulus_controller('elements/delete_btn') }} {{ stimulus_action('elements/delete_btn', "submit", "submit") }}
data-delete-title="{% trans with {'%name%': part.name|escape }%}part.delete.confirm_title{% endtrans %}"