mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
add logic to filter tasks
This commit is contained in:
@@ -143,55 +143,59 @@
|
||||
|
||||
<p>Filter the tasks</p>
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.user) }}
|
||||
{{ form_row(form.user_id) }}
|
||||
{{ form_row(form.status) }}
|
||||
{{ form_row(form.person_id) }}
|
||||
<button type="submit">{{ 'Filter'|trans }}</button>
|
||||
{{ form_end(form)}}
|
||||
|
||||
|
||||
|
||||
{% if view.tasks_count == 0 %}
|
||||
{% if tasks_count == 0 %}
|
||||
<p class="chill-no-data-statement">{{ "There is no tasks."|trans }}</p>
|
||||
{% if view.person is not null %}
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': view.person.id}) }}" class="sc-button bt-create">
|
||||
{% if person is not null %}
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
<!-- Pour l'instant, il n'est pas encore possible d'ajouter une tache sans personne liée -->
|
||||
<!-- {% if view.person is null %}
|
||||
<!-- {% if person is null %}
|
||||
<a href="{{ path('chill_task_single_task_new') }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% endif %} -->
|
||||
{% else %}
|
||||
|
||||
{% if view.single_task_ended_tasks is defined %}
|
||||
{{ helper.date_status('Tasks with expired deadline', view.single_task_ended_tasks, view.single_task_ended_count, view.single_task_ended_paginator, 'ended', view.isSingleStatus, view.person) }}
|
||||
{% 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 view.single_task_warning_tasks is defined %}
|
||||
{{ helper.date_status('Tasks with warning deadline reached', view.single_task_warning_tasks, view.single_task_warning_count, view.single_task_warning_paginator, 'warning', view.isSingleStatus, view.person) }}
|
||||
{% 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 view.single_task_current_tasks is defined %}
|
||||
{{ helper.date_status('Current tasks', view.single_task_current_tasks, view.single_task_current_count, view.single_task_current_paginator, 'current', view.isSingleStatus, view.person) }}
|
||||
{% 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 view.single_task_not_started_tasks is defined %}
|
||||
{{ helper.date_status('Tasks not started', view.single_task_not_started_tasks, view.single_task_not_started_count, view.single_task_not_started_paginator, 'not_started', view.isSingleStatus, view.person) }}
|
||||
{% 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 view.single_task_closed_tasks is defined %}
|
||||
{{ helper.date_status('Closed', view.single_task_closed_tasks, view.single_task_closed_count, view.single_task_closed_paginator, 'closed', view.isSingleStatus, view.person) }}
|
||||
{% if single_task_closed_tasks is defined %}
|
||||
{{ helper.date_status('Closed', single_task_closed_tasks, single_task_closed_count, single_task_closed_paginator, 'closed', isSingleStatus, person) }}
|
||||
{% endif %}
|
||||
|
||||
{% if view.isSingleStatus == false %}
|
||||
{% if isSingleStatus == false %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{% if view.person is not null %}
|
||||
{% if person is not null %}
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
<!-- Pour l'instant, il n'est pas encore possible d'ajouter une tache sans personne liée -->
|
||||
<!-- {% if view.person is null %}
|
||||
<!-- {% if person is null %}
|
||||
<a href="{{ path('chill_task_single_task_new') }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{% extends view.layout %}
|
||||
{% extends layout %}
|
||||
|
||||
{% set activeRouteKey = 'chill_task_single_task_new' %}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
{# filter tasks #}
|
||||
|
||||
{% if view.person is not null %}
|
||||
{% if person is not null %}
|
||||
{% block personcontent %}
|
||||
{% include 'ChillTaskBundle:SingleTask:_list.html.twig' %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user