add ACL around creation of work in course

This commit is contained in:
Julien Fastré 2022-04-06 12:41:50 +02:00
parent 7d69ec6d6b
commit 5477a70c84

View File

@ -18,15 +18,7 @@
<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 %#}
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>
{% else %}
<div class="flex-table accompanying_course_work-list">
{% for w in works %}
@ -37,7 +29,7 @@
{{ chill_pagination(paginator) }}
{#% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_CREATE') %#}
{% 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 }) }}"
@ -46,7 +38,7 @@
</a>
</li>
</ul>
{#% endif %#}
{% endif %}
</div>
{% endblock %}