{% macro date_status(title, tasks, count, paginator, status, isSingleStatus, person, user) %} {% if tasks|length > 0 %}

{{ title|trans }}

{% for task in tasks %} {% endfor %}
{{ task.title }}
{% if person is null %}
{{ 'For person'|trans }} : {{ task.person}}
{% endif %}
{{ task_workflow_metadata(task, 'definition.name')|trans }}
{% for place in workflow_marked_places(task) %} {{ place|trans }} {% endfor %} {% if task.assignee is not null %}
{{ 'By'|trans }} : {{ task.assignee.username }}
{% endif %}
{% if task.startDate is not null or task.warningDate is not null or task.endDate is not null %}
    {% if task.startDate is not null %}
  • {{ task.startDate|format_date('medium') }}
  • {% endif %} {% if task.warningDate is not null %}
  • {{ task.warningDate|format_date('medium') }}
  • {% endif %} {% if task.endDate is not null %}
  • {{ task.endDate|format_date('medium') }}
  • {% endif %}
{% endif %}
{% if isSingleStatus %} {% if tasks|length < paginator.getTotalItems %} {{ chill_pagination(paginator) }} {% endif %} {% else %} {% endif %} {% endif %} {% endmacro %} {% import _self as helper %}

{{ app.request.query.get('title', null)|escape('html')|default('Task list'|trans) }}

{% if false == app.request.query.boolean('hide_form', false) %}

{{ 'Filter the tasks'|trans }}

{{ form_start(form) }} {{ form_row(form.user_id) }} {% if form.status is defined %} {{ form_row(form.status) }} {% endif %} {% if form.types is defined %} {{ form_row(form.types) }} {% endif %} {% if form.person_id is defined %} {{ form_row(form.person_id) }} {% endif %} {% if form.center_id is defined %} {{ form_row(form.center_id) }} {% endif %} {{ form_end(form)}} {% endif %} {% if tasks_count == 0 %}

{{ "There is no tasks."|trans }}

{% if person is not null and is_granted('CHILL_TASK_TASK_CREATE', person) %} {% endif %} {% else %} {% if false == app.request.query.boolean('hide_form', false) %}

{{ 'Tasks'|trans }}

{% endif %} {% if person is not null and is_granted('CHILL_TASK_TASK_CREATE', person) %} {% 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) }} {% endif %} {% if single_task_warning_tasks is defined %} {{ helper.date_status('Tasks with warning deadline reached', single_task_warning_tasks, single_task_warning_count, single_task_warning_paginator, 'warning', isSingleStatus, person) }} {% endif %} {% if single_task_current_tasks is defined %} {{ helper.date_status('Current tasks', single_task_current_tasks, single_task_current_count, single_task_current_paginator, 'current', isSingleStatus, person) }} {% endif %} {% if single_task_not_started_tasks is defined %} {{ helper.date_status('Tasks not started', single_task_not_started_tasks, single_task_not_started_count, single_task_not_started_paginator, 'not_started', isSingleStatus, person) }} {% endif %} {% if single_task_closed_tasks is defined %} {{ helper.date_status('Closed tasks', single_task_closed_tasks, single_task_closed_count, single_task_closed_paginator, 'closed', isSingleStatus, person) }} {% endif %} {% if isSingleStatus == false %} {% endif %} {% endif %}