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> <h1>{{ block('title') }}</h1>
{% if works|length == 0 %} {% 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 }}</p>
<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 %} {% else %}
<div class="flex-table accompanying_course_work-list"> <div class="flex-table accompanying_course_work-list">
{% for w in works %} {% for w in works %}
@ -37,7 +29,7 @@
{{ chill_pagination(paginator) }} {{ 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"> <ul class="record_actions sticky-form-buttons">
<li> <li>
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_new', { 'id': accompanyingCourse.id }) }}" <a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_new', { 'id': accompanyingCourse.id }) }}"
@ -46,7 +38,7 @@
</a> </a>
</li> </li>
</ul> </ul>
{#% endif %#} {% endif %}
</div> </div>
{% endblock %} {% endblock %}