{% extends '_includes/html/base.html.twig' %}

{% set pageName='Tâches - ' %}
{% if task.activity is not null %}
{% set pageName=pageName~task.activity.name~' - ' %}
{% endif %}
{% set pageName=pageName~task.name %}

{% set page=task.name %}

{% set returnPath=[{label: 'Tâches', url: url('task_tasks', {}, false), title: 'Liste des tâches'}] %}
{% if task.activity is not null %}
{% set returnPath=returnPath|merge([{label: task.activity.name, url: url('activity_activity', {id: task.activity.id}, false), title: 'Editer l\'activité'}]) %}
{% endif %}

{% block pageContent %}
<div class="col-6">
	<div class="card-header">
		<h2>Editer</h2>
	</div>
	<div class="card-body">
		{% include '_includes/html/genericForm.html.twig' with {'form': taskEditForm} %}
	</div>
</div>
<div class="col-6">
	<div class="card-header">
		<h2>Supprimer</h2>
	</div>
	<div class="card-body">
		{% include '_includes/html/genericForm.html.twig' with {'form': taskDeleteForm, 'data': {task: task, variant: 'full'}} %}
	</div>
</div>
{% endblock %}