Only show merge button if there are more than 1 works attached to the parcours

This commit is contained in:
Julie Lenaerts 2025-03-24 16:07:47 +01:00
parent 85781c8e14
commit 2a7fa517ee

View File

@ -68,12 +68,14 @@
{% endif %} {% endif %}
</div> </div>
</li> </li>
{% if work.accompanyingPeriod.getWorks|length > 1 %}
<li> <li>
<a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_assign_duplicate', { 'id': work.id }) }}"> <a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_assign_duplicate', { 'id': work.id }) }}">
<i class="bi bi-chevron-contract"></i> <i class="bi bi-chevron-contract"></i>
{{ 'Merge'|trans }} {{ 'Merge'|trans }}
</a> </a>
</li> </li>
{% endif %}
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', work) %} {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', work) %}
<li> <li>
<a class="btn btn-edit" <a class="btn btn-edit"