From 82b5b491bec94cb3d40a5820fbef9959435309be Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 26 May 2016 22:23:12 -0400 Subject: [PATCH] Rename task view controller --- app/Api/BaseApi.php | 2 +- app/Controller/Comment.php | 8 ++++---- app/Controller/SubtaskController.php | 6 +++--- app/Controller/SubtaskConverterController.php | 2 +- .../SubtaskRestrictionController.php | 2 +- app/Controller/SubtaskStatusController.php | 1 - .../{TaskHelper.php => TaskAjaxController.php} | 6 +++--- app/Controller/TaskExternalLink.php | 6 +++--- app/Controller/TaskFile.php | 6 +++--- app/Controller/TaskInternalLinkController.php | 6 +++--- app/Controller/TaskModificationController.php | 6 +++--- app/Controller/TaskRecurrenceController.php | 2 +- app/Controller/TaskStatusController.php | 2 +- .../{Task.php => TaskViewController.php} | 8 ++++---- app/Controller/Taskduplication.php | 6 +++--- app/Controller/WebNotificationController.php | 4 ++-- app/Core/Markdown.php | 4 ++-- .../SubtaskTimeTrackingCalendarFormatter.php | 2 +- app/Formatter/TaskCalendarFormatter.php | 2 +- app/Formatter/TaskGanttFormatter.php | 2 +- app/Formatter/TaskICalFormatter.php | 2 +- app/ServiceProvider/AuthenticationProvider.php | 4 ++-- app/ServiceProvider/RouteProvider.php | 12 ++++++------ app/Template/analytic/compare_hours.php | 4 ++-- app/Template/board/task_private.php | 6 +++--- app/Template/board/task_public.php | 6 +++--- app/Template/board/tooltip_tasklinks.php | 4 ++-- app/Template/comment/create.php | 2 +- app/Template/comment/edit.php | 2 +- app/Template/comment/remove.php | 4 ++-- app/Template/dashboard/subtasks.php | 2 +- app/Template/dashboard/tasks.php | 2 +- app/Template/event/comment_create.php | 2 +- app/Template/event/comment_update.php | 2 +- app/Template/event/subtask_create.php | 4 ++-- app/Template/event/subtask_update.php | 2 +- app/Template/event/task_assignee_change.php | 6 +++--- app/Template/event/task_close.php | 2 +- app/Template/event/task_create.php | 2 +- app/Template/event/task_file_create.php | 2 +- app/Template/event/task_move_column.php | 2 +- app/Template/event/task_move_position.php | 2 +- app/Template/event/task_move_swimlane.php | 4 ++-- app/Template/event/task_open.php | 2 +- app/Template/event/task_update.php | 2 +- app/Template/feed/project.php | 4 ++-- app/Template/feed/user.php | 4 ++-- app/Template/listing/show.php | 2 +- app/Template/notification/footer.php | 2 +- app/Template/notification/task_overdue.php | 2 +- app/Template/project_user/tasks.php | 4 ++-- app/Template/search/results.php | 4 ++-- app/Template/subtask/create.php | 2 +- app/Template/subtask/edit.php | 2 +- app/Template/subtask/remove.php | 2 +- app/Template/subtask_converter/show.php | 2 +- app/Template/subtask_restriction/show.php | 2 +- app/Template/task/details.php | 2 +- app/Template/task/dropdown.php | 2 +- app/Template/task/remove.php | 4 ++-- app/Template/task/sidebar.php | 18 +++++++++--------- app/Template/task_duplication/copy.php | 4 ++-- app/Template/task_duplication/duplicate.php | 4 ++-- app/Template/task_duplication/move.php | 4 ++-- app/Template/task_external_link/find.php | 4 ++-- app/Template/task_file/create.php | 4 ++-- app/Template/task_file/remove.php | 4 ++-- app/Template/task_file/screenshot.php | 4 ++-- app/Template/task_internal_link/create.php | 4 ++-- app/Template/task_internal_link/edit.php | 4 ++-- app/Template/task_internal_link/remove.php | 2 +- app/Template/task_internal_link/table.php | 4 ++-- .../task_modification/edit_description.php | 2 +- app/Template/task_modification/edit_task.php | 2 +- app/Template/task_recurrence/edit.php | 2 +- app/Template/task_recurrence/info.php | 6 +++--- app/Template/task_status/close.php | 2 +- app/Template/task_status/open.php | 2 +- app/Template/user_view/timesheet.php | 6 +++--- tests/units/Helper/TextHelperTest.php | 4 ++-- 80 files changed, 146 insertions(+), 147 deletions(-) rename app/Controller/{TaskHelper.php => TaskAjaxController.php} (92%) rename app/Controller/{Task.php => TaskViewController.php} (95%) diff --git a/app/Api/BaseApi.php b/app/Api/BaseApi.php index 37e11030d..d8c46fd52 100644 --- a/app/Api/BaseApi.php +++ b/app/Api/BaseApi.php @@ -75,7 +75,7 @@ abstract class BaseApi extends Base protected function formatTask($task) { if (! empty($task)) { - $task['url'] = $this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), '', true); + $task['url'] = $this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), '', true); $task['color'] = $this->color->getColorProperties($task['color_id']); } diff --git a/app/Controller/Comment.php b/app/Controller/Comment.php index 83a67b41f..8d3b7862b 100644 --- a/app/Controller/Comment.php +++ b/app/Controller/Comment.php @@ -82,7 +82,7 @@ class Comment extends BaseController $this->flash->failure(t('Unable to create your comment.')); } - return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'), true); } return $this->create($values, $errors); @@ -131,7 +131,7 @@ class Comment extends BaseController $this->flash->failure(t('Unable to update your comment.')); } - return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), false); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), false); } return $this->edit($values, $errors); @@ -171,7 +171,7 @@ class Comment extends BaseController $this->flash->failure(t('Unable to remove this comment.')); } - $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments')); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments')); } /** @@ -186,6 +186,6 @@ class Comment extends BaseController $order = $this->userSession->getCommentSorting() === 'ASC' ? 'DESC' : 'ASC'; $this->userSession->setCommentSorting($order); - $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments')); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments')); } } diff --git a/app/Controller/SubtaskController.php b/app/Controller/SubtaskController.php index 830548da9..26659fb40 100644 --- a/app/Controller/SubtaskController.php +++ b/app/Controller/SubtaskController.php @@ -64,7 +64,7 @@ class SubtaskController extends BaseController return $this->create(array('project_id' => $task['project_id'], 'task_id' => $task['id'], 'another_subtask' => 1)); } - return $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']), 'subtasks'), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']), 'subtasks'), true); } return $this->create($values, $errors); @@ -114,7 +114,7 @@ class SubtaskController extends BaseController $this->flash->failure(t('Unable to update your sub-task.')); } - return $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); } return $this->edit($values, $errors); @@ -153,7 +153,7 @@ class SubtaskController extends BaseController $this->flash->failure(t('Unable to remove this sub-task.')); } - $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); } /** diff --git a/app/Controller/SubtaskConverterController.php b/app/Controller/SubtaskConverterController.php index 829b937a1..8a3021e20 100644 --- a/app/Controller/SubtaskConverterController.php +++ b/app/Controller/SubtaskConverterController.php @@ -34,6 +34,6 @@ class SubtaskConverterController extends BaseController $this->flash->failure(t('Unable to convert the subtask.')); } - $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $project['id'], 'task_id' => $task_id)), true); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $project['id'], 'task_id' => $task_id)), true); } } diff --git a/app/Controller/SubtaskRestrictionController.php b/app/Controller/SubtaskRestrictionController.php index 185371e7a..77626ba92 100644 --- a/app/Controller/SubtaskRestrictionController.php +++ b/app/Controller/SubtaskRestrictionController.php @@ -56,6 +56,6 @@ class SubtaskRestrictionController extends BaseController 'status' => SubtaskModel::STATUS_INPROGRESS, )); - $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); } } diff --git a/app/Controller/SubtaskStatusController.php b/app/Controller/SubtaskStatusController.php index e24002dc5..909123ec4 100644 --- a/app/Controller/SubtaskStatusController.php +++ b/app/Controller/SubtaskStatusController.php @@ -66,7 +66,6 @@ class SubtaskStatusController extends BaseController 'task' => $task, 'subtasks' => $this->subtask->getAll($task['id']), 'editable' => true, - 'redirect' => 'task', )); } } diff --git a/app/Controller/TaskHelper.php b/app/Controller/TaskAjaxController.php similarity index 92% rename from app/Controller/TaskHelper.php rename to app/Controller/TaskAjaxController.php index 2f14c0ebe..d630b9626 100644 --- a/app/Controller/TaskHelper.php +++ b/app/Controller/TaskAjaxController.php @@ -9,12 +9,12 @@ use Kanboard\Filter\TaskTitleFilter; use Kanboard\Formatter\TaskAutoCompleteFormatter; /** - * Task Ajax Helper + * Task Ajax Controller * - * @package controller + * @package Kanboard\Controller * @author Frederic Guillot */ -class TaskHelper extends BaseController +class TaskAjaxController extends BaseController { /** * Task auto-completion (Ajax) diff --git a/app/Controller/TaskExternalLink.php b/app/Controller/TaskExternalLink.php index 9f0409574..0bd55dba8 100644 --- a/app/Controller/TaskExternalLink.php +++ b/app/Controller/TaskExternalLink.php @@ -78,7 +78,7 @@ class TaskExternalLink extends BaseController if ($valid && $this->taskExternalLink->create($values)) { $this->flash->success(t('Link added successfully.')); - return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } return $this->edit($values, $errors); @@ -130,7 +130,7 @@ class TaskExternalLink extends BaseController if ($valid && $this->taskExternalLink->update($values)) { $this->flash->success(t('Link updated successfully.')); - return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } return $this->edit($values, $errors); @@ -173,6 +173,6 @@ class TaskExternalLink extends BaseController $this->flash->failure(t('Unable to remove this link.')); } - $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); } } diff --git a/app/Controller/TaskFile.php b/app/Controller/TaskFile.php index 0fcd2d697..544c1ea72 100644 --- a/app/Controller/TaskFile.php +++ b/app/Controller/TaskFile.php @@ -21,7 +21,7 @@ class TaskFile extends BaseController if ($this->request->isPost() && $this->taskFile->uploadScreenshot($task['id'], $this->request->getValue('screenshot')) !== false) { $this->flash->success(t('Screenshot uploaded successfully.')); - return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } return $this->response->html($this->template->render('task_file/screenshot', array( @@ -57,7 +57,7 @@ class TaskFile extends BaseController $this->flash->failure(t('Unable to upload the file.')); } - $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } /** @@ -77,7 +77,7 @@ class TaskFile extends BaseController $this->flash->failure(t('Unable to remove this file.')); } - $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); } /** diff --git a/app/Controller/TaskInternalLinkController.php b/app/Controller/TaskInternalLinkController.php index f97426c69..4018c3a54 100644 --- a/app/Controller/TaskInternalLinkController.php +++ b/app/Controller/TaskInternalLinkController.php @@ -67,7 +67,7 @@ class TaskInternalLinkController extends BaseController if ($valid) { if ($this->taskLink->create($values['task_id'], $values['opposite_task_id'], $values['link_id'])) { $this->flash->success(t('Link added successfully.')); - return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } $errors = array('title' => array(t('The exact same link already exists'))); @@ -121,7 +121,7 @@ class TaskInternalLinkController extends BaseController if ($valid) { if ($this->taskLink->update($values['id'], $values['task_id'], $values['opposite_task_id'], $values['link_id'])) { $this->flash->success(t('Link updated successfully.')); - return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])).'#links'); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])).'#links'); } $this->flash->failure(t('Unable to update your link.')); @@ -162,6 +162,6 @@ class TaskInternalLinkController extends BaseController $this->flash->failure(t('Unable to remove this link.')); } - $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); } } diff --git a/app/Controller/TaskModificationController.php b/app/Controller/TaskModificationController.php index 47c075113..09a8fabeb 100644 --- a/app/Controller/TaskModificationController.php +++ b/app/Controller/TaskModificationController.php @@ -21,7 +21,7 @@ class TaskModificationController extends BaseController { $task = $this->getTask(); $this->taskModification->update(array('id' => $task['id'], 'date_started' => time())); - $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']))); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']))); } /** @@ -67,7 +67,7 @@ class TaskModificationController extends BaseController $this->flash->failure(t('Unable to update your task.')); } - return $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); } return $this->description($values, $errors); @@ -121,7 +121,7 @@ class TaskModificationController extends BaseController if ($valid && $this->taskModification->update($values)) { $this->flash->success(t('Task updated successfully.')); - $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); + $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); } else { $this->flash->failure(t('Unable to update your task.')); $this->edit($values, $errors); diff --git a/app/Controller/TaskRecurrenceController.php b/app/Controller/TaskRecurrenceController.php index 1acf40386..cd9a2c925 100644 --- a/app/Controller/TaskRecurrenceController.php +++ b/app/Controller/TaskRecurrenceController.php @@ -57,7 +57,7 @@ class TaskRecurrenceController extends BaseController $this->flash->failure(t('Unable to update your task.')); } - return $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); } return $this->edit($values, $errors); diff --git a/app/Controller/TaskStatusController.php b/app/Controller/TaskStatusController.php index fca168ec9..98ab4e1e2 100644 --- a/app/Controller/TaskStatusController.php +++ b/app/Controller/TaskStatusController.php @@ -52,7 +52,7 @@ class TaskStatusController extends BaseController $this->flash->failure($failure_message); } - return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } return $this->response->html($this->template->render($template, array( diff --git a/app/Controller/Task.php b/app/Controller/TaskViewController.php similarity index 95% rename from app/Controller/Task.php rename to app/Controller/TaskViewController.php index 1ce13f69e..833d42a43 100644 --- a/app/Controller/Task.php +++ b/app/Controller/TaskViewController.php @@ -7,12 +7,12 @@ use Kanboard\Core\Controller\PageNotFoundException; use Kanboard\Core\DateParser; /** - * Task controller + * Task Controller * - * @package controller + * @package Kanboard\Controller * @author Frederic Guillot */ -class Task extends BaseController +class TaskViewController extends BaseController { /** * Public access (display a task) @@ -114,7 +114,7 @@ class Task extends BaseController $task = $this->getTask(); $subtask_paginator = $this->paginator - ->setUrl('task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'pagination' => 'subtasks')) + ->setUrl('TaskViewController', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'pagination' => 'subtasks')) ->setMax(15) ->setOrder('start') ->setDirection('DESC') diff --git a/app/Controller/Taskduplication.php b/app/Controller/Taskduplication.php index ff60228e0..1ea3a3f96 100644 --- a/app/Controller/Taskduplication.php +++ b/app/Controller/Taskduplication.php @@ -25,7 +25,7 @@ class Taskduplication extends BaseController if ($task_id > 0) { $this->flash->success(t('Task created successfully.')); - return $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task_id))); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task_id))); } else { $this->flash->failure(t('Unable to create this task.')); return $this->response->redirect($this->helper->url->to('taskduplication', 'duplicate', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); @@ -57,7 +57,7 @@ class Taskduplication extends BaseController $values['category_id'], $values['owner_id'])) { $this->flash->success(t('Task updated successfully.')); - return $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $values['project_id'], 'task_id' => $task['id']))); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $values['project_id'], 'task_id' => $task['id']))); } $this->flash->failure(t('Unable to update your task.')); @@ -87,7 +87,7 @@ class Taskduplication extends BaseController if ($task_id > 0) { $this->flash->success(t('Task created successfully.')); - return $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $values['project_id'], 'task_id' => $task_id))); + return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $values['project_id'], 'task_id' => $task_id))); } } diff --git a/app/Controller/WebNotificationController.php b/app/Controller/WebNotificationController.php index c7b9c8fff..263d6d9e4 100644 --- a/app/Controller/WebNotificationController.php +++ b/app/Controller/WebNotificationController.php @@ -52,14 +52,14 @@ class WebNotificationController extends BaseController $this->response->redirect($this->helper->url->to('DashboardController', 'notifications', array('user_id' => $user_id))); } elseif ($this->helper->text->contains($notification['event_name'], 'comment')) { $this->response->redirect($this->helper->url->to( - 'task', + 'TaskViewController', 'show', array('task_id' => $notification['event_data']['task']['id'], 'project_id' => $notification['event_data']['task']['project_id']), 'comment-'.$notification['event_data']['comment']['id'] )); } else { $this->response->redirect($this->helper->url->to( - 'task', + 'TaskViewController', 'show', array('task_id' => $notification['event_data']['task']['id'], 'project_id' => $notification['event_data']['task']['project_id']) )); diff --git a/app/Core/Markdown.php b/app/Core/Markdown.php index 0e7b6425b..592c29b14 100644 --- a/app/Core/Markdown.php +++ b/app/Core/Markdown.php @@ -120,7 +120,7 @@ class Markdown extends Parsedown if (! empty($token)) { return $this->container['helper']->url->href( - 'task', + 'TaskViewController', 'readonly', array( 'token' => $token, @@ -133,7 +133,7 @@ class Markdown extends Parsedown } return $this->container['helper']->url->href( - 'task', + 'TaskViewController', 'show', array('task_id' => $task_id) ); diff --git a/app/Formatter/SubtaskTimeTrackingCalendarFormatter.php b/app/Formatter/SubtaskTimeTrackingCalendarFormatter.php index c5d4e2bee..047a39b9d 100644 --- a/app/Formatter/SubtaskTimeTrackingCalendarFormatter.php +++ b/app/Formatter/SubtaskTimeTrackingCalendarFormatter.php @@ -28,7 +28,7 @@ class SubtaskTimeTrackingCalendarFormatter extends BaseFormatter implements Form 'backgroundColor' => $this->color->getBackgroundColor($row['color_id']), 'borderColor' => $this->color->getBorderColor($row['color_id']), 'textColor' => 'black', - 'url' => $this->helper->url->to('task', 'show', array('task_id' => $row['task_id'], 'project_id' => $row['project_id'])), + 'url' => $this->helper->url->to('TaskViewController', 'show', array('task_id' => $row['task_id'], 'project_id' => $row['project_id'])), 'editable' => false, ); } diff --git a/app/Formatter/TaskCalendarFormatter.php b/app/Formatter/TaskCalendarFormatter.php index ca0d5c051..d478d2bda 100644 --- a/app/Formatter/TaskCalendarFormatter.php +++ b/app/Formatter/TaskCalendarFormatter.php @@ -50,7 +50,7 @@ class TaskCalendarFormatter extends BaseTaskCalendarFormatter implements Formatt 'backgroundColor' => $this->color->getBackgroundColor($task['color_id']), 'borderColor' => $this->color->getBorderColor($task['color_id']), 'textColor' => 'black', - 'url' => $this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), + 'url' => $this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), 'start' => date($this->getDateTimeFormat(), $task[$this->startColumn]), 'end' => date($this->getDateTimeFormat(), $task[$this->endColumn] ?: time()), 'editable' => $this->fullDay, diff --git a/app/Formatter/TaskGanttFormatter.php b/app/Formatter/TaskGanttFormatter.php index 3209aa37e..4ff5c0194 100644 --- a/app/Formatter/TaskGanttFormatter.php +++ b/app/Formatter/TaskGanttFormatter.php @@ -70,7 +70,7 @@ class TaskGanttFormatter extends BaseFormatter implements FormatterInterface 'column_title' => $task['column_name'], 'assignee' => $task['assignee_name'] ?: $task['assignee_username'], 'progress' => $this->task->getProgress($task, $this->columns[$task['project_id']]).'%', - 'link' => $this->helper->url->href('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), + 'link' => $this->helper->url->href('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), 'color' => $this->color->getColorProperties($task['color_id']), 'not_defined' => empty($task['date_due']) || empty($task['date_started']), ); diff --git a/app/Formatter/TaskICalFormatter.php b/app/Formatter/TaskICalFormatter.php index a149f725a..890674c7f 100644 --- a/app/Formatter/TaskICalFormatter.php +++ b/app/Formatter/TaskICalFormatter.php @@ -117,7 +117,7 @@ class TaskICalFormatter extends BaseTaskCalendarFormatter implements FormatterIn $vEvent->setModified($dateModif); $vEvent->setUseTimezone(true); $vEvent->setSummary(t('#%d', $task['id']).' '.$task['title']); - $vEvent->setUrl($this->helper->url->base().$this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); + $vEvent->setUrl($this->helper->url->base().$this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); if (! empty($task['owner_id'])) { $vEvent->setOrganizer($task['assignee_name'] ?: $task['assignee_username'], $task['assignee_email']); diff --git a/app/ServiceProvider/AuthenticationProvider.php b/app/ServiceProvider/AuthenticationProvider.php index ce0c6f27f..759ec168b 100644 --- a/app/ServiceProvider/AuthenticationProvider.php +++ b/app/ServiceProvider/AuthenticationProvider.php @@ -91,7 +91,7 @@ class AuthenticationProvider implements ServiceProviderInterface $acl->add('SubtaskRestrictionController', '*', Role::PROJECT_MEMBER); $acl->add('SubtaskStatusController', '*', Role::PROJECT_MEMBER); $acl->add('Swimlane', '*', Role::PROJECT_MANAGER); - $acl->add('Task', 'remove', Role::PROJECT_MEMBER); + $acl->add('TaskViewController', 'remove', Role::PROJECT_MEMBER); $acl->add('TaskCreationController', '*', Role::PROJECT_MEMBER); $acl->add('TaskBulkController', '*', Role::PROJECT_MEMBER); $acl->add('Taskduplication', '*', Role::PROJECT_MEMBER); @@ -124,7 +124,7 @@ class AuthenticationProvider implements ServiceProviderInterface $acl->add('Captcha', '*', Role::APP_PUBLIC); $acl->add('PasswordReset', '*', Role::APP_PUBLIC); $acl->add('Webhook', '*', Role::APP_PUBLIC); - $acl->add('Task', 'readonly', Role::APP_PUBLIC); + $acl->add('TaskViewController', 'readonly', Role::APP_PUBLIC); $acl->add('Board', 'readonly', Role::APP_PUBLIC); $acl->add('Ical', '*', Role::APP_PUBLIC); $acl->add('Feed', '*', Role::APP_PUBLIC); diff --git a/app/ServiceProvider/RouteProvider.php b/app/ServiceProvider/RouteProvider.php index d8c9fd45e..61f43ae6a 100644 --- a/app/ServiceProvider/RouteProvider.php +++ b/app/ServiceProvider/RouteProvider.php @@ -90,14 +90,14 @@ class RouteProvider implements ServiceProviderInterface $container['route']->addRoute('project/:project_id/categories', 'category', 'index'); // Task routes - $container['route']->addRoute('project/:project_id/task/:task_id', 'task', 'show'); - $container['route']->addRoute('t/:task_id', 'task', 'show'); - $container['route']->addRoute('public/task/:task_id/:token', 'task', 'readonly'); + $container['route']->addRoute('project/:project_id/task/:task_id', 'TaskViewController', 'show'); + $container['route']->addRoute('t/:task_id', 'TaskViewController', 'show'); + $container['route']->addRoute('public/task/:task_id/:token', 'TaskViewController', 'readonly'); $container['route']->addRoute('project/:project_id/task/:task_id/activity', 'activity', 'task'); - $container['route']->addRoute('project/:project_id/task/:task_id/transitions', 'task', 'transitions'); - $container['route']->addRoute('project/:project_id/task/:task_id/analytics', 'task', 'analytics'); - $container['route']->addRoute('project/:project_id/task/:task_id/time-tracking', 'task', 'timetracking'); + $container['route']->addRoute('project/:project_id/task/:task_id/transitions', 'TaskViewController', 'transitions'); + $container['route']->addRoute('project/:project_id/task/:task_id/analytics', 'TaskViewController', 'analytics'); + $container['route']->addRoute('project/:project_id/task/:task_id/time-tracking', 'TaskViewController', 'timetracking'); // Exports $container['route']->addRoute('export/tasks/:project_id', 'export', 'tasks'); diff --git a/app/Template/analytic/compare_hours.php b/app/Template/analytic/compare_hours.php index 8249e7ba3..03a2981a4 100644 --- a/app/Template/analytic/compare_hours.php +++ b/app/Template/analytic/compare_hours.php @@ -34,10 +34,10 @@ getCollection() as $task): ?> - url->link('#'.$this->text->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> - url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php index 03ed39501..e852c33c5 100644 --- a/app/Template/board/task_private.php +++ b/app/Template/board/task_private.php @@ -9,7 +9,7 @@ data-owner-id="" data-category-id="" data-due-date="" - data-task-url="url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> + data-task-url="url->href('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> @@ -27,7 +27,7 @@ text->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?> - - url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title tooltip', $this->text->e($task['title'])) ?> + url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title tooltip', $this->text->e($task['title'])) ?>
@@ -48,7 +48,7 @@ hook->render('template:board:private:task:before-title', array('task' => $task)) ?>
- url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
hook->render('template:board:private:task:after-title', array('task' => $task)) ?> diff --git a/app/Template/board/task_public.php b/app/Template/board/task_public.php index a53d42c81..82eb65359 100644 --- a/app/Template/board/task_public.php +++ b/app/Template/board/task_public.php @@ -1,6 +1,6 @@
- url->link('#'.$task['id'], 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?> + url->link('#'.$task['id'], 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?> @@ -12,7 +12,7 @@ hook->render('template:board:public:task:before-title', array('task' => $task)) ?>
- url->link($this->text->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?> + url->link($this->text->e($task['title']), 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
hook->render('template:board:public:task:after-title', array('task' => $task)) ?> @@ -21,4 +21,4 @@ 'not_editable' => $not_editable, 'project' => $project, )) ?> -
\ No newline at end of file +
diff --git a/app/Template/board/tooltip_tasklinks.php b/app/Template/board/tooltip_tasklinks.php index 6424c39df..d1156cbeb 100644 --- a/app/Template/board/tooltip_tasklinks.php +++ b/app/Template/board/tooltip_tasklinks.php @@ -12,7 +12,7 @@ url->link( $this->text->e('#'.$link['task_id'].' '.$link['title']), - 'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']), + 'TaskViewController', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']), false, $link['is_active'] ? '' : 'task-link-closed' ) ?> @@ -31,4 +31,4 @@ - \ No newline at end of file + diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php index fa7c0ca60..2a92a2f83 100644 --- a/app/Template/comment/create.php +++ b/app/Template/comment/create.php @@ -24,6 +24,6 @@
- url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/comment/edit.php b/app/Template/comment/edit.php index 4036b6732..abe98804b 100644 --- a/app/Template/comment/edit.php +++ b/app/Template/comment/edit.php @@ -22,6 +22,6 @@
- url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/comment/remove.php b/app/Template/comment/remove.php index 3174df02e..c7de80536 100644 --- a/app/Template/comment/remove.php +++ b/app/Template/comment/remove.php @@ -16,6 +16,6 @@
url->link(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
- \ No newline at end of file + diff --git a/app/Template/dashboard/subtasks.php b/app/Template/dashboard/subtasks.php index ee6caf027..40e567b12 100644 --- a/app/Template/dashboard/subtasks.php +++ b/app/Template/dashboard/subtasks.php @@ -21,7 +21,7 @@ url->link($this->text->e($subtask['project_name']), 'board', 'show', array('project_id' => $subtask['project_id'])) ?> - url->link($this->text->e($subtask['task_name']), 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?> + url->link($this->text->e($subtask['task_name']), 'TaskViewController', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?> subtask->toggleStatus($subtask, $subtask['project_id']) ?> diff --git a/app/Template/dashboard/tasks.php b/app/Template/dashboard/tasks.php index 756bd9b42..cd245aa16 100644 --- a/app/Template/dashboard/tasks.php +++ b/app/Template/dashboard/tasks.php @@ -23,7 +23,7 @@ url->link($this->text->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?> - url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> = 0): ?> diff --git a/app/Template/event/comment_create.php b/app/Template/event/comment_create.php index 9869c94b7..45132e6d5 100644 --- a/app/Template/event/comment_create.php +++ b/app/Template/event/comment_create.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> dt->datetime($date_creation) ?>

diff --git a/app/Template/event/comment_update.php b/app/Template/event/comment_update.php index 19420cf9f..5a0821bd0 100644 --- a/app/Template/event/comment_update.php +++ b/app/Template/event/comment_update.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> dt->datetime($date_creation) ?>

diff --git a/app/Template/event/subtask_create.php b/app/Template/event/subtask_create.php index 7e41d5c98..1bf36c059 100644 --- a/app/Template/event/subtask_create.php +++ b/app/Template/event/subtask_create.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> dt->datetime($date_creation) ?>

@@ -20,4 +20,4 @@ - \ No newline at end of file + diff --git a/app/Template/event/subtask_update.php b/app/Template/event/subtask_update.php index 9fea4fe89..201402f6d 100644 --- a/app/Template/event/subtask_update.php +++ b/app/Template/event/subtask_update.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> dt->datetime($date_creation) ?>

diff --git a/app/Template/event/task_assignee_change.php b/app/Template/event/task_assignee_change.php index db78e7df7..7c9622233 100644 --- a/app/Template/event/task_assignee_change.php +++ b/app/Template/event/task_assignee_change.php @@ -4,14 +4,14 @@ text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), $this->text->e($assignee) ) ?> - text->e($author), $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> + text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> dt->datetime($date_creation) ?>

text->e($task['title']) ?>

-
\ No newline at end of file + diff --git a/app/Template/event/task_close.php b/app/Template/event/task_close.php index 04157b0da..90ff92074 100644 --- a/app/Template/event/task_close.php +++ b/app/Template/event/task_close.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> dt->datetime($date_creation) ?>

diff --git a/app/Template/event/task_create.php b/app/Template/event/task_create.php index 6e26cdb8b..017a5adab 100644 --- a/app/Template/event/task_create.php +++ b/app/Template/event/task_create.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> dt->datetime($date_creation) ?>

diff --git a/app/Template/event/task_file_create.php b/app/Template/event/task_file_create.php index 0d8e545d9..d329529ad 100644 --- a/app/Template/event/task_file_create.php +++ b/app/Template/event/task_file_create.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> dt->datetime($date_creation) ?>

diff --git a/app/Template/event/task_move_column.php b/app/Template/event/task_move_column.php index 0a78bca7a..f3155e47b 100644 --- a/app/Template/event/task_move_column.php +++ b/app/Template/event/task_move_column.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), $this->text->e($task['column_title']) ) ?> dt->datetime($date_creation) ?> diff --git a/app/Template/event/task_move_position.php b/app/Template/event/task_move_position.php index eeadfa02f..ecdd02b60 100644 --- a/app/Template/event/task_move_position.php +++ b/app/Template/event/task_move_position.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), $task['position'], $this->text->e($task['column_title']) ) ?> diff --git a/app/Template/event/task_move_swimlane.php b/app/Template/event/task_move_swimlane.php index a190bc0aa..fe9bfb55b 100644 --- a/app/Template/event/task_move_swimlane.php +++ b/app/Template/event/task_move_swimlane.php @@ -2,12 +2,12 @@ text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), $this->text->e($task['swimlane_name']) ) ?> diff --git a/app/Template/event/task_open.php b/app/Template/event/task_open.php index d9cd90b33..548aa98f5 100644 --- a/app/Template/event/task_open.php +++ b/app/Template/event/task_open.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> dt->datetime($date_creation) ?>

diff --git a/app/Template/event/task_update.php b/app/Template/event/task_update.php index 07b94ff85..7c7507c07 100644 --- a/app/Template/event/task_update.php +++ b/app/Template/event/task_update.php @@ -1,7 +1,7 @@

text->e($author), - $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ) ?> dt->datetime($date_creation) ?>

diff --git a/app/Template/feed/project.php b/app/Template/feed/project.php index 1c6d11667..eae41c926 100644 --- a/app/Template/feed/project.php +++ b/app/Template/feed/project.php @@ -10,7 +10,7 @@ <?= $e['event_title'] ?> - + @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/app/Template/feed/user.php b/app/Template/feed/user.php index 28847f1f3..483cf7cdd 100644 --- a/app/Template/feed/user.php +++ b/app/Template/feed/user.php @@ -10,7 +10,7 @@ <?= $e['event_title'] ?> - + @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/app/Template/listing/show.php b/app/Template/listing/show.php index 1c92de4c6..4ceb7f874 100644 --- a/app/Template/listing/show.php +++ b/app/Template/listing/show.php @@ -34,7 +34,7 @@ text->e($task['category_name']) ?> - url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> diff --git a/app/Template/notification/footer.php b/app/Template/notification/footer.php index c3b37884c..a56901abe 100644 --- a/app/Template/notification/footer.php +++ b/app/Template/notification/footer.php @@ -2,6 +2,6 @@ Kanboard - - + - - diff --git a/app/Template/notification/task_overdue.php b/app/Template/notification/task_overdue.php index a9fad2494..406e41f7f 100644 --- a/app/Template/notification/task_overdue.php +++ b/app/Template/notification/task_overdue.php @@ -14,7 +14,7 @@ # - text->e($task['title']) ?> + text->e($task['title']) ?> text->e($task['title']) ?> diff --git a/app/Template/project_user/tasks.php b/app/Template/project_user/tasks.php index 108d3b335..d459c1334 100644 --- a/app/Template/project_user/tasks.php +++ b/app/Template/project_user/tasks.php @@ -14,7 +14,7 @@ getCollection() as $task): ?> - url->link('#'.$this->text->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> url->link($this->text->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?> @@ -23,7 +23,7 @@ text->e($task['column_name']) ?> - url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> diff --git a/app/Template/search/results.php b/app/Template/search/results.php index 79df35440..58858867e 100644 --- a/app/Template/search/results.php +++ b/app/Template/search/results.php @@ -16,7 +16,7 @@ url->link($this->text->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?> - url->link('#'.$this->text->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> text->e($task['swimlane_name'] ?: $task['default_swimlane']) ?> @@ -28,7 +28,7 @@ text->e($task['category_name']) ?> - url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> diff --git a/app/Template/subtask/create.php b/app/Template/subtask/create.php index 31b99f903..3c080f7c2 100644 --- a/app/Template/subtask/create.php +++ b/app/Template/subtask/create.php @@ -15,6 +15,6 @@
- url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/subtask/edit.php b/app/Template/subtask/edit.php index 9e316ea53..8f256ceab 100644 --- a/app/Template/subtask/edit.php +++ b/app/Template/subtask/edit.php @@ -15,6 +15,6 @@
- url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/subtask/remove.php b/app/Template/subtask/remove.php index 33c10e88e..426c1a937 100644 --- a/app/Template/subtask/remove.php +++ b/app/Template/subtask/remove.php @@ -15,6 +15,6 @@
url->link(t('Yes'), 'SubtaskController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/subtask_converter/show.php b/app/Template/subtask_converter/show.php index af8af49eb..63f454827 100644 --- a/app/Template/subtask_converter/show.php +++ b/app/Template/subtask_converter/show.php @@ -15,6 +15,6 @@
url->link(t('Yes'), 'SubtaskConverterController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/subtask_restriction/show.php b/app/Template/subtask_restriction/show.php index 1ff49915d..ec8b8d5b8 100644 --- a/app/Template/subtask_restriction/show.php +++ b/app/Template/subtask_restriction/show.php @@ -12,6 +12,6 @@
- url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/task/details.php b/app/Template/task/details.php index 6e72ca3c4..bbbbfd8bb 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -32,7 +32,7 @@
  • - url->link(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?> + url->link(t('Public link'), 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?>
  • diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php index 2c3c38c67..6f887c0af 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -58,7 +58,7 @@ user->canRemoveTask($task)): ?>
  • - url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + url->link(t('Remove'), 'TaskViewController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  • diff --git a/app/Template/task/remove.php b/app/Template/task/remove.php index b869b6469..f963a325d 100644 --- a/app/Template/task/remove.php +++ b/app/Template/task/remove.php @@ -8,8 +8,8 @@

    - url->link(t('Yes'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red popover-link') ?> + url->link(t('Yes'), 'TaskViewController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red popover-link') ?> - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index c81aab9fd..a8e8ba09e 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -1,26 +1,26 @@ \ No newline at end of file + diff --git a/app/Template/task_duplication/move.php b/app/Template/task_duplication/move.php index beebf9eb0..50b29363a 100644 --- a/app/Template/task_duplication/move.php +++ b/app/Template/task_duplication/move.php @@ -41,8 +41,8 @@
    - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    - \ No newline at end of file + diff --git a/app/Template/task_external_link/find.php b/app/Template/task_external_link/find.php index 3977a66c4..09843d2f3 100644 --- a/app/Template/task_external_link/find.php +++ b/app/Template/task_external_link/find.php @@ -23,6 +23,6 @@
    - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    - \ No newline at end of file + diff --git a/app/Template/task_file/create.php b/app/Template/task_file/create.php index 4abe6634a..e3bbfa2b3 100644 --- a/app/Template/task_file/create.php +++ b/app/Template/task_file/create.php @@ -4,7 +4,7 @@ @@ -29,5 +29,5 @@
    - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/task_file/remove.php b/app/Template/task_file/remove.php index fe601f6fa..5097c66a3 100644 --- a/app/Template/task_file/remove.php +++ b/app/Template/task_file/remove.php @@ -10,6 +10,6 @@
    url->link(t('Yes'), 'TaskFile', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    - \ No newline at end of file + diff --git a/app/Template/task_file/screenshot.php b/app/Template/task_file/screenshot.php index 2880478db..75958db1f 100644 --- a/app/Template/task_file/screenshot.php +++ b/app/Template/task_file/screenshot.php @@ -12,8 +12,8 @@
    - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    -

    \ No newline at end of file +

    diff --git a/app/Template/task_internal_link/create.php b/app/Template/task_internal_link/create.php index 87b3fd28d..fed296050 100644 --- a/app/Template/task_internal_link/create.php +++ b/app/Template/task_internal_link/create.php @@ -21,13 +21,13 @@ 'placeholder="'.t('Start to type task title...').'"', 'title="'.t('Start to type task title...').'"', 'data-dst-field="opposite_task_id"', - 'data-search-url="'.$this->url->href('TaskHelper', 'autocomplete', array('exclude_task_id' => $task['id'])).'"', + 'data-search-url="'.$this->url->href('TaskAjaxController', 'autocomplete', array('exclude_task_id' => $task['id'])).'"', ), 'autocomplete') ?>
    - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/task_internal_link/edit.php b/app/Template/task_internal_link/edit.php index 15066443a..f4df57bdb 100644 --- a/app/Template/task_internal_link/edit.php +++ b/app/Template/task_internal_link/edit.php @@ -22,13 +22,13 @@ 'placeholder="'.t('Start to type task title...').'"', 'title="'.t('Start to type task title...').'"', 'data-dst-field="opposite_task_id"', - 'data-search-url="'.$this->url->href('TaskHelper', 'autocomplete', array('exclude_task_id' => $task['id'])).'"', + 'data-search-url="'.$this->url->href('TaskAjaxController', 'autocomplete', array('exclude_task_id' => $task['id'])).'"', ), 'autocomplete') ?>
    - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/task_internal_link/remove.php b/app/Template/task_internal_link/remove.php index 4dea7c9d7..966ad1161 100644 --- a/app/Template/task_internal_link/remove.php +++ b/app/Template/task_internal_link/remove.php @@ -10,6 +10,6 @@
    url->link(t('Yes'), 'TaskInternalLinkController', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/task_internal_link/table.php b/app/Template/task_internal_link/table.php index 631796bfd..424d47912 100644 --- a/app/Template/task_internal_link/table.php +++ b/app/Template/task_internal_link/table.php @@ -24,7 +24,7 @@ url->link( $this->text->e('#'.$link['task_id'].' '.$link['title']), - 'task', + 'TaskViewController', 'readonly', array('task_id' => $link['task_id'], 'token' => $project['token']), false, @@ -33,7 +33,7 @@ url->link( $this->text->e('#'.$link['task_id'].' '.$link['title']), - 'task', + 'TaskViewController', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']), false, diff --git a/app/Template/task_modification/edit_description.php b/app/Template/task_modification/edit_description.php index cddc0cf59..339ed0365 100644 --- a/app/Template/task_modification/edit_description.php +++ b/app/Template/task_modification/edit_description.php @@ -22,6 +22,6 @@
    - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/task_modification/edit_task.php b/app/Template/task_modification/edit_task.php index f7ecc9cb6..0707fd9a0 100644 --- a/app/Template/task_modification/edit_task.php +++ b/app/Template/task_modification/edit_task.php @@ -33,6 +33,6 @@
    - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/task_recurrence/edit.php b/app/Template/task_recurrence/edit.php index e1f0fecab..550db2f81 100644 --- a/app/Template/task_recurrence/edit.php +++ b/app/Template/task_recurrence/edit.php @@ -40,7 +40,7 @@
    - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/task_recurrence/info.php b/app/Template/task_recurrence/info.php index 1a6574df7..977946042 100644 --- a/app/Template/task_recurrence/info.php +++ b/app/Template/task_recurrence/info.php @@ -24,14 +24,14 @@
  • - url->link('#'.$task['recurrence_parent'], 'task', 'show', array('task_id' => $task['recurrence_parent'], 'project_id' => $task['project_id'])) ?> + url->link('#'.$task['recurrence_parent'], 'TaskViewController', 'show', array('task_id' => $task['recurrence_parent'], 'project_id' => $task['project_id'])) ?>
  • - url->link('#'.$task['recurrence_child'], 'task', 'show', array('task_id' => $task['recurrence_child'], 'project_id' => $task['project_id'])) ?> + url->link('#'.$task['recurrence_child'], 'TaskViewController', 'show', array('task_id' => $task['recurrence_child'], 'project_id' => $task['project_id'])) ?>
  • - \ No newline at end of file + diff --git a/app/Template/task_status/close.php b/app/Template/task_status/close.php index f78e051df..2d7b0ce5f 100644 --- a/app/Template/task_status/close.php +++ b/app/Template/task_status/close.php @@ -10,6 +10,6 @@
    url->link(t('Yes'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red popover-link') ?> - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/task_status/open.php b/app/Template/task_status/open.php index 1bd89cf41..242b5db50 100644 --- a/app/Template/task_status/open.php +++ b/app/Template/task_status/open.php @@ -10,6 +10,6 @@
    url->link(t('Yes'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red popover-link') ?> - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
    diff --git a/app/Template/user_view/timesheet.php b/app/Template/user_view/timesheet.php index 92ebafb58..3df574924 100644 --- a/app/Template/user_view/timesheet.php +++ b/app/Template/user_view/timesheet.php @@ -16,8 +16,8 @@ getCollection() as $record): ?> - url->link($this->text->e($record['task_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?> - url->link($this->text->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?> + url->link($this->text->e($record['task_title']), 'TaskViewController', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?> + url->link($this->text->e($record['subtask_title']), 'TaskViewController', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?> dt->datetime($record['start']) ?> dt->datetime($record['end']) ?> @@ -26,4 +26,4 @@ - \ No newline at end of file + diff --git a/tests/units/Helper/TextHelperTest.php b/tests/units/Helper/TextHelperTest.php index 95feab731..8f596541f 100644 --- a/tests/units/Helper/TextHelperTest.php +++ b/tests/units/Helper/TextHelperTest.php @@ -22,7 +22,7 @@ class TextHelperTest extends Base $this->assertEquals('

    Test

    ', $helper->markdown('Test')); $this->assertEquals( - '

    Task #123

    ', + '

    Task #123

    ', $helper->markdown('Task #123') ); @@ -32,7 +32,7 @@ class TextHelperTest extends Base ); $this->assertEquals( - '

    Task #1

    ', + '

    Task #1

    ', $helper->markdown('Task #1', true) );