mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
link between lists of task and tasks
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
{% macro date_status(title, tasks, count, paginator) %}
|
||||
{% macro date_status(title, tasks, count, paginator, status, isSingleStatus, person) %}
|
||||
{% if tasks|length > 0 %}
|
||||
<h2>{{ title|trans }}</h2>
|
||||
|
||||
@@ -78,8 +78,33 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if tasks|length > paginator.getTotalItems %}
|
||||
|
||||
{% if isSingleStatus %}
|
||||
{% if tasks|length > paginator.getTotalItems %}
|
||||
{{ chill_pagination(paginator) }}
|
||||
{% endif %}
|
||||
|
||||
<!-- lien retour -->
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_task_task_list_by_person', {'personId': person.id}) }}" class="sc-button bt-cancel">
|
||||
{{ 'Back to the list' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_task_task_list_by_person', {'personId': person.id, 'date_status' : [ status ] }) }}" class="sc-button bt-cancel">
|
||||
{{ 'See more' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
@@ -93,27 +118,29 @@
|
||||
<h1>{{ 'Task list'|trans }}</h1>
|
||||
|
||||
{% 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) }}
|
||||
{{ 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) }}
|
||||
{{ 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) }}
|
||||
{{ 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) }}
|
||||
{{ 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 %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% if isSingleStatus == false %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_task_single_task_new', {'person_id': person.id}) }}" class="sc-button bt-create">
|
||||
{{ 'Add a new task' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user