accompanyingcourse work: add ACL rights for create and edit buttons

This commit is contained in:
nobohan 2022-03-30 12:01:35 +02:00
parent f29ead4961
commit 1d6d8dc002
2 changed files with 11 additions and 5 deletions

View File

@ -128,11 +128,13 @@
'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork',
w.id, [], suppEvaluations) }}
</li>
<li>
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
></a>
</li>
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
<li>
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
></a>
</li>
{% endif %}
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_DELETE', w) %}
<li>
<a class="btn btn-delete" title="{{ 'Delete'|trans }}"

View File

@ -18,12 +18,14 @@
<h1>{{ block('title') }}</h1>
{% if works|length == 0 %}
{#% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_CREATE') %#}
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}
<a class="btn btn-sm btn-create"
title="{{ 'accompanying_course_work.create'|trans }}"
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_new', { 'id': accompanyingCourse.id }) }}"
></a>
</p>
{#% endif %#}
{% else %}
<div class="flex-table accompanying_course_work-list">
@ -35,6 +37,7 @@
{{ chill_pagination(paginator) }}
{#% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_CREATE') %#}
<ul class="record_actions sticky-form-buttons">
<li>
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_new', { 'id': accompanyingCourse.id }) }}"
@ -43,6 +46,7 @@
</a>
</li>
</ul>
{#% endif %#}
</div>
{% endblock %}