diff --git a/app/Resources/views/admin/booking/_partial/bucket_modal.html.twig b/app/Resources/views/admin/booking/_partial/bucket_modal.html.twig index 5558f7c5e..d86e55444 100644 --- a/app/Resources/views/admin/booking/_partial/bucket_modal.html.twig +++ b/app/Resources/views/admin/booking/_partial/bucket_modal.html.twig @@ -1,8 +1,12 @@ {# Template for the modal popup used to change the user register for a shift bucket in /booking/admin +Also on the /schedule page to display more shift infos (without any action buttons) It use the materialize modal class https://materializeweb.com/modals.html id = "modal-bucket" #} +{% if (display_names ?? true) %} + {% set display_names = display_name_shifters %} +{% endif %} {% set nbBookableShifts = shifts | filter ( shift => not shift.shifter) | length %} {% set nbShifts = (shifts | length) %} {% set nbBookedShifts = nbShifts - nbBookableShifts %} @@ -33,7 +37,9 @@ id = "modal-bucket" {% if use_card_reader_to_validate_shifts and shift.isPastOrCurrent %} ◉ {% endif %} - {{ shift.shifter.displayNameWithMemberNumber }} + {% if display_names %} + {{ shift.shifter.displayNameWithMemberNumber }} + {% endif %} {% if shift.formation %} ({{ shift.formation.name }}){% endif %} {% if not shift.formation and shift.shifter.formations | length > 0 %} ({{ shift.shifter.formations | join(', ') }}) @@ -54,7 +60,7 @@ id = "modal-bucket" {% if shift.fixe %}fixe{% else %}volant{% endif %} {% endif %} réservé - {% if shift.shifter != shift.booker.beneficiary %} + {% if shift.shifter != shift.booker.beneficiary and display_names %} pour {{ shift.shifter }} {% endif %} le {{ shift.bookedTime | date_fr_full_with_time }} @@ -75,18 +81,20 @@ id = "modal-bucket" {% endif %} {{ form_end(shift_validate_invalidate_forms[shift.id]) }} {% endif %} - {{ form_start(shift_free_forms[shift.id], {'attr': { 'style': 'display:inline;' }}) }} - {% do shift_free_forms[shift.id].reason.setRendered() %} - {% if shift.isPast %} - - {% else %} - - {% endif %} - {{ form_end(shift_free_forms[shift.id]) }} + {% if shift_free_forms is defined %} + {{ form_start(shift_free_forms[shift.id], {'attr': { 'style': 'display:inline;' }}) }} + {% do shift_free_forms[shift.id].reason.setRendered() %} + {% if shift.isPast %} + + {% else %} + + {% endif %} + {{ form_end(shift_free_forms[shift.id]) }} + {% endif %} {% endif %} {% if shift.createdBy %} @@ -104,8 +112,13 @@ id = "modal-bucket"