access granted condition lifted temporarily to show the 'add new task' button on index page for Person

This commit is contained in:
Julie Lenaerts 2021-10-01 10:51:02 +02:00
parent 1403ee2ba5
commit 262fefa92f
2 changed files with 14 additions and 13 deletions

View File

@ -203,17 +203,18 @@
<h2>{{ 'Tasks'|trans }}</h2>
{% endif %}
{% if person is not null and is_granted('CHILL_TASK_TASK_CREATE', person) %}
<ul class="record_actions">
<li>
{% if person is not null %}
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="btn btn-create">
{{ 'Add a new task' | trans }}
</a>
{% endif %}
</li>
</ul>
{% endif %}
{# TODO reimplement right to create task. #}
{# {% if person is not null and is_granted('CHILL_TASK_TASK_CREATE', person) %} #}
<ul class="record_actions">
<li>
{% if person is not null %}
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="btn btn-create">
{{ 'Add a new task' | trans }}
</a>
{% endif %}
</li>
</ul>
{# {% endif %} #}
{% if single_task_ended_tasks is defined %}
{{ helper.date_status('Tasks with expired deadline', single_task_ended_tasks, single_task_ended_count, single_task_ended_paginator, 'ended', isSingleStatus, person) }}

View File

@ -31,14 +31,14 @@
{% if person is not null %}
{% block personcontent %}
<div class="tasks">
{% include '@ChillTask/SingleTask/_list.html.twig' %}
{% include '@ChillTask/SingleTask/Person/list.html.twig' %}
</div>
{% endblock %}
{% else %}
{% block content %}
<div class="col-md-10 col-xxl tasks">
{% include '@ChillTask/SingleTask/_listCourse.html.twig' %}
{% include '@ChillTask/SingleTask/AccompanyingCourse/list.html.twig' %}
</div>
{% endblock %}