adaptations for acl with tasks

This commit is contained in:
2021-10-26 18:05:06 +02:00
parent bae06fcc9c
commit 965ea528e3
22 changed files with 371 additions and 298 deletions

View File

@@ -10,7 +10,7 @@
{{ include('@ChillMain/Util/confirmation_template.html.twig',
{
'title' : 'Remove task'|trans,
'confirm_question' : 'Are you sure you want to remove the task about accompanying period "%id%" ?'|trans({ '%id%' : course.id } ),
'confirm_question' : 'Are you sure you want to remove the task "%title%" ?'|trans({ '%title%' : task.title } ),
'cancel_route' : 'chill_task_singletask_courselist',
'cancel_parameters' : app.request.query.get('list_params', { } ),
'form' : delete_form,

View File

@@ -95,11 +95,11 @@
</table>
{% endif %}
<ul class="record_actions">
<ul class="record_actions sticky-form-buttons">
<li>
{% if accompanyingCourse is not null %}
<a href="{{ path('chill_task_single_task_new', {'course_id': accompanyingCourse.id}) }}" class="btn btn-create">
{{ 'Add a new task' | trans }}
{{ 'Create' | trans }}
</a>
{% endif %}
</li>

View File

@@ -237,17 +237,11 @@
{% endif %}
{% if isSingleStatus == false %}
<ul class="record_actions">
<ul class="record_actions sticky-form-buttons">
<li>
{% if person is not null and is_granted('CHILL_TASK_TASK_CREATE', person) %}
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="btn btn-create">
{{ 'Add a new task' | trans }}
</a>
{% endif %}
{% if accompanyingCourse is not null %}
<a href="{{ path('chill_task_single_task_new', {'course_id': accompanyingCourse.id}) }}" class="btn btn-create">
{{ 'Add a new task' | trans }}
{{ 'Create' | trans }}
</a>
{% endif %}
</li>

View File

@@ -7,14 +7,16 @@
{{ form_row(form.title) }}
{{ form_row(form.description) }}
{{ form_row(form.assignee) }}
{{ form_row(form.circle) }}
{% if form.circle is defined %}
{{ form_row(form.circle) }}
{% endif %}
{{ form_row(form.startDate) }}
{{ form_row(form.endDate) }}
{{ form_row(form.warningInterval) }}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a class="btn btn-cancel" href={% if task.person is not null %} "{{ path('chill_task_singletask_list', { 'person_id': task.person.id, 'list_params': app.request.query.get('list_params', {} )} ) }}" {% else %} "{{ chill_return_path_or('chill_task_singletask_courselist', {'course_id': task.course.id}) }}" {% endif %}>
<a class="btn btn-cancel" href={% if task.person is not null %}"{{ chill_return_path_or('chill_task_singletask_list', { 'person_id': task.person.id } ) }}"{% else %}"{{ chill_return_path_or('chill_task_singletask_courselist', {'course_id': task.course.id}) }}" {% endif %}>
{{ 'Cancel'|trans }}</a>
</li>
<li>

View File

@@ -9,7 +9,9 @@
{{ form_row(form.title) }}
{{ form_row(form.description) }}
{{ form_row(form.assignee) }}
{{ form_row(form.circle) }}
{% if form.circle is defined %}
{{ form_row(form.circle) }}
{% endif %}
{{ form_row(form.startDate) }}
{{ form_row(form.endDate) }}
{{ form_row(form.warningInterval) }}