Browse Source

Remplace tâche suivante par piocher une tâche

master
vincent 2 weeks ago
parent
commit
eae6b05495
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      src/Controller/TaskController.php
  2. +2
    -2
      templates/task/show.html.twig

+ 2
- 2
src/Controller/TaskController.php View File

@ -95,7 +95,7 @@ class TaskController extends AbstractController
}
$project = $task->getProject();
$nextTask = $repository->findNextOne($task);
$randomTask = $repository->findRandomByProject($project, Task::STATUS_TODO);
$comment = new Comment();
$commentForm = $this->createForm(CommentType::class, $comment, [
@ -145,7 +145,7 @@ class TaskController extends AbstractController
'task' => $task,
'project' => $project,
'commentForm' => $commentForm,
'nextTask' => $nextTask,
'randomTask' => $randomTask,
'josmCommands' => json_encode($josmCommands),
]);
}


+ 2
- 2
templates/task/show.html.twig View File

@ -45,8 +45,8 @@
>Télécommande JOSM</button>
{% endif %}
{% endif %}
{% if nextTask %}
<a href="{{ path('app_task_show', {'slug': nextTask.slug}) }}" class="btn btn-secondary">Tâche suivante</a>
{% if randomTask %}
<a href="{{ path('app_task_show', {'slug': randomTask.slug}) }}" class="btn btn-secondary">Piocher une tâche</a>
{% endif %}
</div>
</div>


Loading…
Cancel
Save