change view btn to edit btn

This commit is contained in:
Julie Lenaerts 2022-04-06 16:53:26 +02:00
parent 38a26f0bc1
commit 291d340aa0

View File

@ -28,9 +28,9 @@
{% macro period_actions(period) %}
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %}
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', period) %}
<li>
<a href="{{ chill_path_add_return_path('chill_person_accompanying_course_index', {'accompanying_period_id': period.id}) }}" class="btn btn-show"></a>
<a href="{{ chill_path_add_return_path('chill_person_accompanying_course_edit', {'accompanying_period_id': period.id}) }}" class="btn btn-edit"></a>
</li>
{% endif %}
{% endmacro %}
@ -77,11 +77,11 @@
<div id="form_periods">
<div class="flex-table">
{# {{ dump(assignForm.periods.vars.choices) }} #}
{{ dump(assignForm.periods.vars.choices) }}
{% for choice in assignForm.periods.vars.choices %}
<div class="form_check" style="display:flex; margin-bottom:1rem;">
<input id="form_periods_{{ choice.value }}" class="form-check-input" type="checkbox" style="margin-right: 1rem;"
name="form[periods][{{ choice.value }}]" value="{{ choice.value }}">
name="form[periods][{{ choice.value }}]" value="{{ choice.data.id }}">
<label class="form-check-label" for="form_periods_{{ choice.value }}" style="display: block; width: 100%;">
{% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {'period': choice.data,
'recordAction': m.period_actions(choice.data), 'itemMeta': m.period_meta(choice.data) } %}
@ -112,4 +112,3 @@
</div>
{% endblock %}