From 3719ce0896905a48101eaf5a798deb70fb6d8a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 27 Apr 2018 13:36:04 +0200 Subject: [PATCH] Insert "my tasks" link in user menu --- Controller/SingleTaskController.php | 15 +++++++++++++++ Resources/translations/messages.fr.yml | 1 + 2 files changed, 16 insertions(+) diff --git a/Controller/SingleTaskController.php b/Controller/SingleTaskController.php index a0d245e7e..7dff380d9 100644 --- a/Controller/SingleTaskController.php +++ b/Controller/SingleTaskController.php @@ -283,6 +283,21 @@ class SingleTaskController extends Controller return $form; } + + /** + * + * @return Response + * @Route( + * "/{_locale}/task/single-task/list/my", + * options={ "menus": { "user": { "order": -10, "label": "My tasks", "icon": "tasks" } } } + * ) + */ + public function myTasksAction() + { + return $this->redirectToRoute('chill_task_singletask_list', [ + 'user_id' => $this->getUser()->getId() + ]); + } /** * @Route( diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index f98b1f54e..2ec50a69e 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -35,6 +35,7 @@ User: Utilisateur 'Are you sure you want to remove the task about "%name%" ?': 'Êtes-vous sûr·e de vouloir supprimer la tâche de "%name%"?' Associated tasks: Tâches associées +My tasks: Mes tâches #Flash messages 'The task is created': 'La tâche a été créée'