Remove `project_id` from task URLs

This commit is contained in:
Tomas Dittmann 2022-02-05 05:59:33 +01:00 committed by GitHub
parent 2150ca73b9
commit 61e63ef9e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
97 changed files with 209 additions and 219 deletions

View File

@ -24,15 +24,12 @@ class CommentController extends BaseController
*/ */
public function create(array $values = array(), array $errors = array()) public function create(array $values = array(), array $errors = array())
{ {
$project = $this->getProject();
$task = $this->getTask(); $task = $this->getTask();
$values['project_id'] = $task['project_id'];
$this->response->html($this->helper->layout->task('comment/create', array( $this->response->html($this->helper->layout->task('comment/create', array(
'values' => $values, 'values' => $values,
'errors' => $errors, 'errors' => $errors,
'task' => $task, 'task' => $task
'project' => $project,
))); )));
} }
@ -57,7 +54,7 @@ class CommentController extends BaseController
$this->flash->failure(t('Unable to create your comment.')); $this->flash->failure(t('Unable to create your comment.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id']), 'comments'), true);
} else { } else {
$this->create($values, $errors); $this->create($values, $errors);
} }
@ -81,8 +78,6 @@ class CommentController extends BaseController
$values = $comment; $values = $comment;
} }
$values['project_id'] = $task['project_id'];
$this->response->html($this->template->render('comment/edit', array( $this->response->html($this->template->render('comment/edit', array(
'values' => $values, 'values' => $values,
'errors' => $errors, 'errors' => $errors,
@ -115,7 +110,7 @@ class CommentController extends BaseController
$this->flash->failure(t('Unable to update your comment.')); $this->flash->failure(t('Unable to update your comment.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', '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'])), true);
return; return;
} }
@ -156,7 +151,7 @@ class CommentController extends BaseController
$this->flash->failure(t('Unable to remove this comment.')); $this->flash->failure(t('Unable to remove this comment.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id']), 'comments'), true);
} }
/** /**
@ -173,7 +168,7 @@ class CommentController extends BaseController
$this->response->redirect($this->helper->url->to( $this->response->redirect($this->helper->url->to(
'TaskViewController', 'TaskViewController',
'show', 'show',
array('task_id' => $task['id'], 'project_id' => $task['project_id']), array('task_id' => $task['id']),
'comments' 'comments'
)); ));
} }

View File

@ -12,15 +12,13 @@ class CommentMailController extends BaseController
{ {
public function create(array $values = array(), array $errors = array()) public function create(array $values = array(), array $errors = array())
{ {
$project = $this->getProject();
$task = $this->getTask(); $task = $this->getTask();
$this->response->html($this->helper->layout->task('comment_mail/create', array( $this->response->html($this->helper->layout->task('comment_mail/create', array(
'values' => $values, 'values' => $values,
'errors' => $errors, 'errors' => $errors,
'task' => $task, 'task' => $task,
'project' => $project, 'members' => $this->projectPermissionModel->getMembersWithEmail($task['project_id']),
'members' => $this->projectPermissionModel->getMembersWithEmail($project['id']),
))); )));
} }
@ -43,7 +41,7 @@ class CommentMailController extends BaseController
$this->flash->failure(t('Unable to create your comment.')); $this->flash->failure(t('Unable to create your comment.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id']), 'comments'), true);
} else { } else {
$this->create($values, $errors); $this->create($values, $errors);
} }

View File

@ -91,7 +91,7 @@ class ExternalTaskCreationController extends BaseController
} else { } else {
$taskId = $this->taskCreationModel->create($values); $taskId = $this->taskCreationModel->create($values);
$this->flash->success(t('Task created successfully.')); $this->flash->success(t('Task created successfully.'));
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $project['id'], 'task_id' => $taskId)), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $taskId)), true);
} }
} }
} }

View File

@ -37,7 +37,7 @@ class SubtaskController extends BaseController
'task' => $task, 'task' => $task,
))); )));
} }
/** /**
* Prepare form values * Prepare form values
* *
@ -86,7 +86,7 @@ class SubtaskController extends BaseController
if (! $this->subtaskModel->create($subtaskValues)) { if (! $this->subtaskModel->create($subtaskValues)) {
$this->flash->failure(t('Unable to create your sub-task.')); $this->flash->failure(t('Unable to create your sub-task.'));
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']), 'subtasks'), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id']), 'subtasks'), true);
return false; return false;
} }
@ -110,7 +110,7 @@ class SubtaskController extends BaseController
} }
} }
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']), 'subtasks'), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id']), 'subtasks'), true);
} }
/** /**
@ -160,7 +160,7 @@ class SubtaskController extends BaseController
$this->flash->failure(t('Unable to update your sub-task.')); $this->flash->failure(t('Unable to update your sub-task.'));
} }
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])), true);
} }
return $this->edit($values, $errors); return $this->edit($values, $errors);
@ -199,7 +199,7 @@ class SubtaskController extends BaseController
$this->flash->failure(t('Unable to remove this sub-task.')); $this->flash->failure(t('Unable to remove this sub-task.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])), true);
} }
/** /**

View File

@ -23,11 +23,10 @@ class SubtaskConverterController extends BaseController
public function save() public function save()
{ {
$project = $this->getProject();
$task = $this->getTask(); $task = $this->getTask();
$subtask = $this->getSubtask($task); $subtask = $this->getSubtask($task);
$task_id = $this->subtaskTaskConversionModel->convertToTask($project['id'], $subtask['id']); $task_id = $this->subtaskTaskConversionModel->convertToTask($task['project_id'], $subtask['id']);
if ($task_id !== false) { if ($task_id !== false) {
$this->flash->success(t('Subtask converted to task successfully.')); $this->flash->success(t('Subtask converted to task successfully.'));
@ -35,6 +34,6 @@ class SubtaskConverterController extends BaseController
$this->flash->failure(t('Unable to convert the subtask.')); $this->flash->failure(t('Unable to convert the subtask.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $project['id'], 'task_id' => $task_id)), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task_id)), true);
} }
} }

View File

@ -56,6 +56,6 @@ class SubtaskRestrictionController extends BaseController
'status' => SubtaskModel::STATUS_INPROGRESS, 'status' => SubtaskModel::STATUS_INPROGRESS,
)); ));
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])), true);
} }
} }

View File

@ -25,10 +25,10 @@ class TaskDuplicationController extends BaseController
if ($task_id > 0) { if ($task_id > 0) {
$this->flash->success(t('Task created successfully.')); $this->flash->success(t('Task created successfully.'));
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task_id))); return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task_id)));
} else { } else {
$this->flash->failure(t('Unable to create this task.')); $this->flash->failure(t('Unable to create this task.'));
return $this->response->redirect($this->helper->url->to('TaskDuplicationController', 'duplicate', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); return $this->response->redirect($this->helper->url->to('TaskDuplicationController', 'duplicate', array('task_id' => $task['id'])), true);
} }
} }
@ -57,7 +57,7 @@ class TaskDuplicationController extends BaseController
$values['category_id'], $values['category_id'],
$values['owner_id'])) { $values['owner_id'])) {
$this->flash->success(t('Task updated successfully.')); $this->flash->success(t('Task updated successfully.'));
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $values['project_id'], 'task_id' => $task['id']))); return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])));
} }
$this->flash->failure(t('Unable to update your task.')); $this->flash->failure(t('Unable to update your task.'));

View File

@ -85,7 +85,7 @@ class TaskExternalLinkController extends BaseController
$this->flash->success(t('Unable to create your link.')); $this->flash->success(t('Unable to create your link.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', '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'])), true);
} else { } else {
$provider = $this->externalLinkManager->getProvider($values['link_type']); $provider = $this->externalLinkManager->getProvider($values['link_type']);
$this->response->html($this->template->render('task_external_link/create', array( $this->response->html($this->template->render('task_external_link/create', array(
@ -140,7 +140,7 @@ class TaskExternalLinkController extends BaseController
if ($valid && $this->taskExternalLinkModel->update($values)) { if ($valid && $this->taskExternalLinkModel->update($values)) {
$this->flash->success(t('Link updated successfully.')); $this->flash->success(t('Link updated successfully.'));
return $this->response->redirect($this->helper->url->to('TaskViewController', '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'])), true);
} }
return $this->edit($values, $errors); return $this->edit($values, $errors);
@ -179,6 +179,6 @@ class TaskExternalLinkController extends BaseController
$this->flash->failure(t('Unable to remove this link.')); $this->flash->failure(t('Unable to remove this link.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', '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'])));
} }
} }

View File

@ -21,7 +21,7 @@ class TaskFileController extends BaseController
if ($this->request->isPost() && $this->taskFileModel->uploadScreenshot($task['id'], $this->request->getValue('screenshot')) !== false) { if ($this->request->isPost() && $this->taskFileModel->uploadScreenshot($task['id'], $this->request->getValue('screenshot')) !== false) {
$this->flash->success(t('Screenshot uploaded successfully.')); $this->flash->success(t('Screenshot uploaded successfully.'));
return $this->response->redirect($this->helper->url->to('TaskViewController', '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'])), true);
} }
return $this->response->html($this->template->render('task_file/screenshot', array( return $this->response->html($this->template->render('task_file/screenshot', array(
@ -66,7 +66,7 @@ class TaskFileController extends BaseController
$this->flash->failure(t('Unable to upload files, check the permissions of your data folder.')); $this->flash->failure(t('Unable to upload files, check the permissions of your data folder.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', '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'])), true);
} }
} }
@ -87,7 +87,7 @@ class TaskFileController extends BaseController
$this->flash->failure(t('Unable to remove this file.')); $this->flash->failure(t('Unable to remove this file.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', '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'])));
} }
/** /**

View File

@ -65,7 +65,7 @@ class TaskInternalLinkController extends BaseController
)); ));
} }
return $this->response->redirect($this->helper->url->to('TaskViewController', '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'])), true);
} }
$errors = array('title' => array(t('The exact same link already exists'))); $errors = array('title' => array(t('The exact same link already exists')));
@ -123,7 +123,7 @@ class TaskInternalLinkController extends BaseController
if ($valid) { if ($valid) {
if ($this->taskLinkModel->update($values['id'], $values['task_id'], $values['opposite_task_id'], $values['link_id'])) { if ($this->taskLinkModel->update($values['id'], $values['task_id'], $values['opposite_task_id'], $values['link_id'])) {
$this->flash->success(t('Link updated successfully.')); $this->flash->success(t('Link updated successfully.'));
return $this->response->redirect($this->helper->url->to('TaskViewController', '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'])).'#links');
} }
$this->flash->failure(t('Unable to update your link.')); $this->flash->failure(t('Unable to update your link.'));
@ -165,6 +165,6 @@ class TaskInternalLinkController extends BaseController
$this->flash->failure(t('Unable to remove this link.')); $this->flash->failure(t('Unable to remove this link.'));
} }
$this->response->redirect($this->helper->url->to('TaskViewController', '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'])));
} }
} }

View File

@ -12,15 +12,13 @@ class TaskMailController extends BaseController
{ {
public function create(array $values = array(), array $errors = array()) public function create(array $values = array(), array $errors = array())
{ {
$project = $this->getProject();
$task = $this->getTask(); $task = $this->getTask();
$this->response->html($this->helper->layout->task('task_mail/create', array( $this->response->html($this->helper->layout->task('task_mail/create', array(
'values' => $values, 'values' => $values,
'errors' => $errors, 'errors' => $errors,
'task' => $task, 'task' => $task,
'project' => $project, 'members' => $this->projectPermissionModel->getMembersWithEmail($task['project_id']),
'members' => $this->projectPermissionModel->getMembersWithEmail($project['id']),
))); )));
} }
@ -41,7 +39,7 @@ class TaskMailController extends BaseController
'task_id' => $task['id'], 'task_id' => $task['id'],
)); ));
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comments'), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id']), 'comments'), true);
} else { } else {
$this->create($values, $errors); $this->create($values, $errors);
} }

View File

@ -23,7 +23,7 @@ class TaskModificationController extends BaseController
if (! $this->helper->projectRole->canUpdateTask($task)) { if (! $this->helper->projectRole->canUpdateTask($task)) {
throw new AccessForbiddenException(t('You are not allowed to update tasks assigned to someone else.')); throw new AccessForbiddenException(t('You are not allowed to update tasks assigned to someone else.'));
} }
if (! $this->helper->projectRole->canChangeAssignee($task)) { if (! $this->helper->projectRole->canChangeAssignee($task)) {
throw new AccessForbiddenException(t('You are not allowed to change the assignee.')); throw new AccessForbiddenException(t('You are not allowed to change the assignee.'));
} }
@ -67,7 +67,7 @@ class TaskModificationController extends BaseController
$this->response->redirect($this->helper->url->to('DashboardController', 'tasks', ['user_id' => $this->userSession->getId()])); $this->response->redirect($this->helper->url->to('DashboardController', 'tasks', ['user_id' => $this->userSession->getId()]));
break; break;
default: default:
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', ['project_id' => $task['project_id'], 'task_id' => $task['id']])); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', ['task_id' => $task['id']]));
} }
} }
@ -146,7 +146,7 @@ class TaskModificationController extends BaseController
if ($valid && $this->updateTask($task, $values, $errors)) { if ($valid && $this->updateTask($task, $values, $errors)) {
$this->flash->success(t('Task updated successfully.')); $this->flash->success(t('Task updated successfully.'));
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])), true);
} else { } else {
$this->flash->failure(t('Unable to update your task.')); $this->flash->failure(t('Unable to update your task.'));
$this->edit($values, $errors); $this->edit($values, $errors);

View File

@ -47,6 +47,6 @@ class TaskMovePositionController extends BaseController
$values['swimlane_id'] $values['swimlane_id']
); );
$this->response->redirect($this->helper->url->to('TaskViewController', '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'])));
} }
} }

View File

@ -58,7 +58,7 @@ class TaskRecurrenceController extends BaseController
$this->flash->failure(t('Unable to update your task.')); $this->flash->failure(t('Unable to update your task.'));
} }
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true); return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])), true);
} }
return $this->edit($values, $errors); return $this->edit($values, $errors);

View File

@ -52,7 +52,7 @@ class TaskStatusController extends BaseController
$this->flash->failure($failure_message); $this->flash->failure($failure_message);
} }
$this->response->redirect($this->helper->url->to('TaskViewController', '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'])), true);
} else { } else {
$this->response->html($this->template->render($template, array( $this->response->html($this->template->render($template, array(
'task' => $task, 'task' => $task,

View File

@ -107,7 +107,7 @@ class TaskViewController extends BaseController
$task = $this->getTask(); $task = $this->getTask();
$subtask_paginator = $this->paginator $subtask_paginator = $this->paginator
->setUrl('TaskViewController', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'pagination' => 'subtasks')) ->setUrl('TaskViewController', 'timetracking', array('task_id' => $task['id'], 'pagination' => 'subtasks'))
->setMax(15) ->setMax(15)
->setOrder('start') ->setOrder('start')
->setDirection('DESC') ->setDirection('DESC')

View File

@ -28,7 +28,7 @@ class SubtaskTimeTrackingCalendarFormatter extends BaseFormatter implements Form
'backgroundColor' => $this->colorModel->getBackgroundColor($row['color_id']), 'backgroundColor' => $this->colorModel->getBackgroundColor($row['color_id']),
'borderColor' => $this->colorModel->getBorderColor($row['color_id']), 'borderColor' => $this->colorModel->getBorderColor($row['color_id']),
'textColor' => 'black', 'textColor' => 'black',
'url' => $this->helper->url->to('TaskViewController', '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'])),
'editable' => false, 'editable' => false,
); );
} }

View File

@ -28,7 +28,7 @@ class TaskApiFormatter extends BaseFormatter implements FormatterInterface
public function format() public function format()
{ {
if (! empty($this->task)) { if (! empty($this->task)) {
$this->task['url'] = $this->helper->url->to('TaskViewController', 'show', array('task_id' => $this->task['id'], 'project_id' => $this->task['project_id']), '', true); $this->task['url'] = $this->helper->url->to('TaskViewController', 'show', array('task_id' => $this->task['id']), '', true);
$this->task['color'] = $this->colorModel->getColorProperties($this->task['color_id']); $this->task['color'] = $this->colorModel->getColorProperties($this->task['color_id']);
} }

View File

@ -128,7 +128,7 @@ class TaskICalFormatter extends BaseFormatter implements FormatterInterface
$vEvent->setSummary(t('#%d', $task['id']).' '.$task['title']); $vEvent->setSummary(t('#%d', $task['id']).' '.$task['title']);
$vEvent->setDescription($task['description']); $vEvent->setDescription($task['description']);
$vEvent->setDescriptionHTML($this->helper->text->markdown($task['description'])); $vEvent->setDescriptionHTML($this->helper->text->markdown($task['description']));
$vEvent->setUrl($this->helper->url->base().$this->helper->url->to('TaskViewController', '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'])));
if (! empty($task['owner_id'])) { if (! empty($task['owner_id'])) {
$attendees = new Attendees; $attendees = new Attendees;

View File

@ -82,10 +82,10 @@ class SubtaskHelper extends Base
$html = '<span class="subtask-timer-toggle">'; $html = '<span class="subtask-timer-toggle">';
if ($subtask['is_timer_started']) { if ($subtask['is_timer_started']) {
$html .= $this->helper->url->icon('pause', t('Stop timer'), 'SubtaskStatusController', 'timer', array('timer' => 'stop', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'js-subtask-toggle-timer'); $html .= $this->helper->url->icon('pause', t('Stop timer'), 'SubtaskStatusController', 'timer', array('timer' => 'stop', 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'js-subtask-toggle-timer');
$html .= ' (' . $this->helper->dt->age($subtask['timer_start_date']) .')'; $html .= ' (' . $this->helper->dt->age($subtask['timer_start_date']) .')';
} else { } else {
$html .= $this->helper->url->icon('play-circle-o', t('Start timer'), 'SubtaskStatusController', 'timer', array('timer' => 'start', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'js-subtask-toggle-timer'); $html .= $this->helper->url->icon('play-circle-o', t('Start timer'), 'SubtaskStatusController', 'timer', array('timer' => 'start', 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'js-subtask-toggle-timer');
} }
$html .= '</span>'; $html .= '</span>';

View File

@ -89,14 +89,14 @@ class RouteProvider implements ServiceProviderInterface
$container['route']->addRoute('project/:project_id/import', 'TaskImportController', 'show'); $container['route']->addRoute('project/:project_id/import', 'TaskImportController', 'show');
// Task routes // Task routes
$container['route']->addRoute('project/:project_id/task/:task_id', 'TaskViewController', 'show'); $container['route']->addRoute('task/:task_id', 'TaskViewController', 'show');
$container['route']->addRoute('t/: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('public/task/:task_id/:token', 'TaskViewController', 'readonly');
$container['route']->addRoute('project/:project_id/task/:task_id/activity', 'ActivityController', 'task'); $container['route']->addRoute('task/:task_id/activity', 'ActivityController', 'task');
$container['route']->addRoute('project/:project_id/task/:task_id/transitions', 'TaskViewController', 'transitions'); $container['route']->addRoute('task/:task_id/transitions', 'TaskViewController', 'transitions');
$container['route']->addRoute('project/:project_id/task/:task_id/analytics', 'TaskViewController', 'analytics'); $container['route']->addRoute('task/:task_id/analytics', 'TaskViewController', 'analytics');
$container['route']->addRoute('project/:project_id/task/:task_id/time-tracking', 'TaskViewController', 'timetracking'); $container['route']->addRoute('task/:task_id/time-tracking', 'TaskViewController', 'timetracking');
// Exports // Exports
$container['route']->addRoute('export/tasks/:project_id', 'ExportController', 'tasks'); $container['route']->addRoute('export/tasks/:project_id', 'ExportController', 'tasks');

View File

@ -36,10 +36,10 @@
<?php foreach ($paginator->getCollection() as $task): ?> <?php foreach ($paginator->getCollection() as $task): ?>
<tr> <tr>
<td class="task-table color-<?= $task['color_id'] ?>"> <td class="task-table color-<?= $task['color_id'] ?>">
<?= $this->url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> <?= $this->url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id']), false, '', t('View this task')) ?>
</td> </td>
<td> <td>
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> <?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id']), false, '', t('View this task')) ?>
</td> </td>
<td> <td>
<?php if ($task['is_active'] == \Kanboard\Model\TaskModel::STATUS_OPEN): ?> <?php if ($task['is_active'] == \Kanboard\Model\TaskModel::STATUS_OPEN): ?>

View File

@ -3,7 +3,7 @@
<span <span
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> <?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
class="task-board-assignee task-board-change-assignee" class="task-board-assignee task-board-change-assignee"
data-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> data-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>">
<?php else: ?> <?php else: ?>
class="task-board-assignee"> class="task-board-assignee">
<?php endif ?> <?php endif ?>

View File

@ -8,7 +8,7 @@
$this->text->e($task['category_name']), $this->text->e($task['category_name']),
'TaskModificationController', 'TaskModificationController',
'edit', 'edit',
array('task_id' => $task['id'], 'project_id' => $task['project_id']), array('task_id' => $task['id']),
false, false,
'js-modal-large' . (! empty($task['category_description']) ? ' tooltip' : ''), 'js-modal-large' . (! empty($task['category_description']) ? ' tooltip' : ''),
t('Change category') t('Change category')
@ -79,27 +79,27 @@
<div class="task-board-icons-row"> <div class="task-board-icons-row">
<?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PENDING): ?> <?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PENDING): ?>
<?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?> <?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?>
<?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90 fa-inverse"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90 fa-inverse"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($task['nb_links'])): ?> <?php if (! empty($task['nb_links'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-code-fork fa-fw"></i>'.$task['nb_links'], $this->url->href('BoardTooltipController', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-code-fork fa-fw"></i>'.$task['nb_links'], $this->url->href('BoardTooltipController', 'tasklinks', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($task['nb_external_links'])): ?> <?php if (! empty($task['nb_external_links'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-external-link fa-fw"></i>'.$task['nb_external_links'], $this->url->href('BoardTooltipController', 'externallinks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-external-link fa-fw"></i>'.$task['nb_external_links'], $this->url->href('BoardTooltipController', 'externallinks', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($task['nb_subtasks'])): ?> <?php if (! empty($task['nb_subtasks'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-bars fa-fw"></i>'.round($task['nb_completed_subtasks'] / $task['nb_subtasks'] * 100, 0).'%', $this->url->href('BoardTooltipController', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-bars fa-fw"></i>'.round($task['nb_completed_subtasks'] / $task['nb_subtasks'] * 100, 0).'%', $this->url->href('BoardTooltipController', 'subtasks', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($task['nb_files'])): ?> <?php if (! empty($task['nb_files'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-paperclip fa-fw"></i>'.$task['nb_files'], $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-paperclip fa-fw"></i>'.$task['nb_files'], $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if ($task['nb_comments'] > 0): ?> <?php if ($task['nb_comments'] > 0): ?>
@ -112,14 +112,14 @@
$task['nb_comments'], $task['nb_comments'],
'CommentListController', 'CommentListController',
'show', 'show',
array('task_id' => $task['id'], 'project_id' => $task['project_id']), array('task_id' => $task['id']),
$task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments']) $task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments'])
) ?> ) ?>
<?php endif ?> <?php endif ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($task['description'])): ?> <?php if (! empty($task['description'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-file-text-o"></i>', $this->url->href('BoardTooltipController', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-file-text-o"></i>', $this->url->href('BoardTooltipController', 'description', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if ($task['is_active'] == 1): ?> <?php if ($task['is_active'] == 1): ?>

View File

@ -10,7 +10,7 @@
data-owner-id="<?= $task['owner_id'] ?>" data-owner-id="<?= $task['owner_id'] ?>"
data-category-id="<?= $task['category_id'] ?>" data-category-id="<?= $task['category_id'] ?>"
data-due-date="<?= $task['date_due'] ?>" data-due-date="<?= $task['date_due'] ?>"
data-task-url="<?= $this->url->href('TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> data-task-url="<?= $this->url->href('TaskViewController', 'show', array('task_id' => $task['id'])) ?>">
<div class="task-board-sort-handle" style="display: none;"><i class="fa fa-arrows-alt"></i></div> <div class="task-board-sort-handle" style="display: none;"><i class="fa fa-arrows-alt"></i></div>
@ -20,7 +20,7 @@
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> <?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
<?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?> <?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?>
<?php if ($this->projectRole->canUpdateTask($task)): ?> <?php if ($this->projectRole->canUpdateTask($task)): ?>
<?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>
<?php endif ?> <?php endif ?>
<?php else: ?> <?php else: ?>
<strong><?= '#'.$task['id'] ?></strong> <strong><?= '#'.$task['id'] ?></strong>
@ -31,7 +31,7 @@
<?= $this->text->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?> <?= $this->text->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?>
</span> - </span> -
<?php endif ?> <?php endif ?>
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', $this->text->e($task['title'])) ?> <?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id']), false, '', $this->text->e($task['title'])) ?>
</div> </div>
<?php else: ?> <?php else: ?>
<div class="task-board-expanded"> <div class="task-board-expanded">
@ -40,7 +40,7 @@
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> <?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
<?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?> <?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?>
<?php if ($this->projectRole->canUpdateTask($task)): ?> <?php if ($this->projectRole->canUpdateTask($task)): ?>
<?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>
<?php endif ?> <?php endif ?>
<?php else: ?> <?php else: ?>
<strong><?= '#'.$task['id'] ?></strong> <strong><?= '#'.$task['id'] ?></strong>
@ -57,7 +57,7 @@
<?= $this->hook->render('template:board:private:task:before-title', array('task' => $task)) ?> <?= $this->hook->render('template:board:private:task:before-title', array('task' => $task)) ?>
<div class="task-board-title"> <div class="task-board-title">
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'])) ?>
</div> </div>
<?= $this->hook->render('template:board:private:task:after-title', array('task' => $task)) ?> <?= $this->hook->render('template:board:private:task:after-title', array('task' => $task)) ?>

View File

@ -9,13 +9,13 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
<?php if ($this->file->getPreviewType($file['name']) !== null || $file['is_image'] == 1): ?> <?php if ($this->file->getPreviewType($file['name']) !== null || $file['is_image'] == 1): ?>
&nbsp;<?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> &nbsp;<?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
&nbsp;<?= $this->url->icon('external-link', t('View file'), 'FileViewerController', ($file['is_image'] == 1 ? 'image' : 'show'), array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?> &nbsp;<?= $this->url->icon('external-link', t('View file'), 'FileViewerController', ($file['is_image'] == 1 ? 'image' : 'show'), array('task_id' => $task['id'], 'file_id' => $file['id']), false, '', '', true) ?>
<?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?> <?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?>
<i class="fa fa-eye fa-fw"></i> <i class="fa fa-eye fa-fw"></i>
<?= $this->url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?> <?= $this->url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'file_id' => $file['id']), false, '', '', true) ?>
<?php endif ?> <?php endif ?>
</td> </td>
</tr> </tr>

View File

@ -2,11 +2,11 @@
<h2><?= t('Add a comment') ?></h2> <h2><?= t('Add a comment') ?></h2>
<ul> <ul>
<li> <li>
<?= $this->modal->medium('paper-plane', t('Send by email'), 'CommentMailController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('paper-plane', t('Send by email'), 'CommentMailController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
</ul> </ul>
</div> </div>
<form method="post" action="<?= $this->url->href('CommentController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('CommentController', 'save', array('task_id' => $task['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->textEditor('comment', $values, $errors, array('autofocus' => true, 'required' => true, 'aria-label' => t('New comment'))) ?> <?= $this->form->textEditor('comment', $values, $errors, array('autofocus' => true, 'required' => true, 'aria-label' => t('New comment'))) ?>

View File

@ -2,7 +2,7 @@
<h2><?= t('Edit a comment') ?></h2> <h2><?= t('Edit a comment') ?></h2>
</div> </div>
<form method="post" action="<?= $this->url->href('CommentController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('CommentController', 'update', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->textEditor('comment', $values, $errors, array('autofocus' => true, 'required' => true, 'aria-label' => t('Comment'))) ?> <?= $this->form->textEditor('comment', $values, $errors, array('autofocus' => true, 'required' => true, 'aria-label' => t('Comment'))) ?>

View File

@ -16,6 +16,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'CommentController', 'CommentController',
'remove', 'remove',
array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']) array('task_id' => $task['id'], 'comment_id' => $comment['id'])
) ?> ) ?>
</div> </div>

View File

@ -17,14 +17,14 @@
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a> <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a>
<ul> <ul>
<li> <li>
<?= $this->url->icon('link', t('Link'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', '', $this->app->isAjax(), 'comment-'.$comment['id']) ?> <?= $this->url->icon('link', t('Link'), 'TaskViewController', 'show', array('task_id' => $task['id']), false, '', '', $this->app->isAjax(), 'comment-'.$comment['id']) ?>
</li> </li>
<?php if ($editable && ($this->user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?> <?php if ($editable && ($this->user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?>
<li> <li>
<?= $this->modal->medium('edit', t('Edit'), 'CommentController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?> <?= $this->modal->medium('edit', t('Edit'), 'CommentController', 'edit', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'CommentController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?> <?= $this->modal->confirm('trash-o', t('Remove'), 'CommentController', 'confirm', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
</ul> </ul>

View File

@ -1,7 +1,7 @@
<div class="page-header"> <div class="page-header">
<h2><?= t('Add a comment') ?></h2> <h2><?= t('Add a comment') ?></h2>
</div> </div>
<form method="post" action="<?= $this->url->href('CommentListController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('CommentListController', 'save', array('task_id' => $task['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->textEditor('comment', array('project_id' => $task['project_id']), array(), array('required' => true, 'aria-label' => t('New comment'))) ?> <?= $this->form->textEditor('comment', array('project_id' => $task['project_id']), array(), array('required' => true, 'aria-label' => t('New comment'))) ?>
<?= $this->modal->submitButtons() ?> <?= $this->modal->submitButtons() ?>

View File

@ -3,11 +3,11 @@
<?php if (!isset($is_public) || !$is_public): ?> <?php if (!isset($is_public) || !$is_public): ?>
<ul> <ul>
<li> <li>
<?= $this->url->icon('sort', t('Change sorting'), 'CommentListController', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'js-modal-replace') ?> <?= $this->url->icon('sort', t('Change sorting'), 'CommentListController', 'toggleSorting', array('task_id' => $task['id']), false, 'js-modal-replace') ?>
</li> </li>
<?php if ($editable): ?> <?php if ($editable): ?>
<li> <li>
<?= $this->modal->medium('paper-plane', t('Send by email'), 'CommentMailController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('paper-plane', t('Send by email'), 'CommentMailController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
</ul> </ul>

View File

@ -1,7 +1,7 @@
<div class="page-header"> <div class="page-header">
<h2><?= t('Create and send a comment by email') ?></h2> <h2><?= t('Create and send a comment by email') ?></h2>
</div> </div>
<form method="post" action="<?= $this->url->href('CommentMailController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off" class="js-mail-form"> <form method="post" action="<?= $this->url->href('CommentMailController', 'save', array('task_id' => $task['id'])) ?>" autocomplete="off" class="js-mail-form">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->hidden('task_id', $values) ?> <?= $this->form->hidden('task_id', $values) ?>
<?= $this->form->hidden('user_id', $values) ?> <?= $this->form->hidden('user_id', $values) ?>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s commented the task %s', <?= e('%s commented the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s removed a comment on the task %s', <?= e('%s removed a comment on the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s updated a comment on the task %s', <?= e('%s updated a comment on the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s created a subtask for the task %s', <?= e('%s created a subtask for the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s removed a subtask for the task %s', <?= e('%s removed a subtask for the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s updated a subtask for the task %s', <?= e('%s updated a subtask for the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -4,11 +4,11 @@
<?php if (! empty($assignee)): ?> <?php if (! empty($assignee)): ?>
<?= e('%s changed the assignee of the task %s to %s', <?= e('%s changed the assignee of the task %s to %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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'])),
$this->text->e($assignee) $this->text->e($assignee)
) ?> ) ?>
<?php else: ?> <?php else: ?>
<?= e('%s removed the assignee of the task %s', $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= e('%s removed the assignee of the task %s', $this->text->e($author), $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s closed the task %s', <?= e('%s closed the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s created the task %s', <?= e('%s created the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s attached a new file to the task %s', <?= e('%s attached a new file to the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s removed a file from the task %s', <?= e('%s removed a file from the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s set a new internal link for the task %s', <?= e('%s set a new internal link for the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s removed an internal link for the task %s', <?= e('%s removed an internal link for the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s moved the task %s to the column "%s"', <?= e('%s moved the task %s to the column "%s"',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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'])),
$this->text->e($task['column_title']) $this->text->e($task['column_title'])
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s moved the task %s to the position #%d in the column "%s"', <?= e('%s moved the task %s to the position #%d in the column "%s"',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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'])),
$task['position'], $task['position'],
$this->text->e($task['column_title']) $this->text->e($task['column_title'])
) ?> ) ?>

View File

@ -2,12 +2,12 @@
<?php if ($task['swimlane_id'] == 0): ?> <?php if ($task['swimlane_id'] == 0): ?>
<?= e('%s moved the task %s to the first swimlane', <?= e('%s moved the task %s to the first swimlane',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<?php else: ?> <?php else: ?>
<?= e('%s moved the task %s to the swimlane "%s"', <?= e('%s moved the task %s to the swimlane "%s"',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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'])),
$this->text->e($task['swimlane_name']) $this->text->e($task['swimlane_name'])
) ?> ) ?>
<?php endif ?> <?php endif ?>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s opened the task %s', <?= e('%s opened the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -1,7 +1,7 @@
<p class="activity-title"> <p class="activity-title">
<?= e('%s updated the task %s', <?= e('%s updated the task %s',
$this->text->e($author), $this->text->e($author),
$this->url->link(t('#%d', $task['id']), 'TaskViewController', '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']))
) ?> ) ?>
<small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small> <small class="activity-date"><?= $this->dt->datetime($date_creation) ?></small>
</p> </p>

View File

@ -3,7 +3,7 @@ Kanboard
<?php if ($this->app->config('application_url') != ''): ?> <?php if ($this->app->config('application_url') != ''): ?>
<?php if (isset($task['id'])): ?> <?php if (isset($task['id'])): ?>
- <?= $this->url->absoluteLink(t('view the task on Kanboard'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - <?= $this->url->absoluteLink(t('view the task on Kanboard'), 'TaskViewController', 'show', array('task_id' => $task['id'])) ?>
<?php endif ?> <?php endif ?>
- <?= $this->url->absoluteLink(t('view the board on Kanboard'), 'BoardViewController', 'show', array('project_id' => $task['project_id'])) ?> - <?= $this->url->absoluteLink(t('view the board on Kanboard'), 'BoardViewController', 'show', array('project_id' => $task['project_id'])) ?>
<?php endif ?> <?php endif ?>

View File

@ -16,7 +16,7 @@
<td style="border: 1px solid #eee;">#<?= $task['id'] ?></td> <td style="border: 1px solid #eee;">#<?= $task['id'] ?></td>
<td style="border: 1px solid #eee;"> <td style="border: 1px solid #eee;">
<?php if ($this->app->config('application_url') !== ''): ?> <?php if ($this->app->config('application_url') !== ''): ?>
<?= $this->url->absoluteLink($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->url->absoluteLink($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'])) ?>
<?php else: ?> <?php else: ?>
<?= $this->text->e($task['title']) ?> <?= $this->text->e($task['title']) ?>
<?php endif ?> <?php endif ?>

View File

@ -14,7 +14,7 @@
<?php foreach ($paginator->getCollection() as $task): ?> <?php foreach ($paginator->getCollection() as $task): ?>
<tr> <tr>
<td class="task-table color-<?= $task['color_id'] ?>"> <td class="task-table color-<?= $task['color_id'] ?>">
<?= $this->url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> <?= $this->url->link('#'.$this->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id']), false, '', t('View this task')) ?>
</td> </td>
<td> <td>
<?= $this->url->link($this->text->e($task['project_name']), 'BoardViewController', 'show', array('project_id' => $task['project_id'])) ?> <?= $this->url->link($this->text->e($task['project_name']), 'BoardViewController', 'show', array('project_id' => $task['project_id'])) ?>
@ -23,7 +23,7 @@
<?= $this->text->e($task['column_name']) ?> <?= $this->text->e($task['column_name']) ?>
</td> </td>
<td> <td>
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> <?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id']), false, '', t('View this task')) ?>
</td> </td>
<td> <td>
<?php if ($task['assignee_username']): ?> <?php if ($task['assignee_username']): ?>

View File

@ -12,7 +12,7 @@
</p> </p>
<?php endif ?> <?php endif ?>
<form method="post" action="<?= $this->url->href('SubtaskController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('SubtaskController', 'save', array('task_id' => $task['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->subtask->renderBulkTitleField($values, $errors, array('autofocus')) ?> <?= $this->subtask->renderBulkTitleField($values, $errors, array('autofocus')) ?>
@ -20,7 +20,7 @@
<?= $this->subtask->renderTimeEstimatedField($values, $errors) ?> <?= $this->subtask->renderTimeEstimatedField($values, $errors) ?>
<?= $this->hook->render('template:subtask:form:create', array('values' => $values, 'errors' => $errors)) ?> <?= $this->hook->render('template:subtask:form:create', array('values' => $values, 'errors' => $errors)) ?>
<?= $this->form->checkbox('another_subtask', t('Create another sub-task'), 1, isset($values['another_subtask']) && $values['another_subtask'] == 1) ?> <?= $this->form->checkbox('another_subtask', t('Create another sub-task'), 1, isset($values['another_subtask']) && $values['another_subtask'] == 1) ?>
<?= $this->modal->submitButtons() ?> <?= $this->modal->submitButtons() ?>

View File

@ -2,7 +2,7 @@
<h2><?= t('Edit a sub-task') ?></h2> <h2><?= t('Edit a sub-task') ?></h2>
</div> </div>
<form method="post" action="<?= $this->url->href('SubtaskController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('SubtaskController', 'update', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->subtask->renderTitleField($values, $errors, array('autofocus')) ?> <?= $this->subtask->renderTitleField($values, $errors, array('autofocus')) ?>

View File

@ -2,13 +2,13 @@
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><div class="subtask-submenu"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></div></a> <a href="#" class="dropdown-menu dropdown-menu-link-icon"><div class="subtask-submenu"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></div></a>
<ul> <ul>
<li> <li>
<?= $this->modal->medium('edit', t('Edit'), 'SubtaskController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?> <?= $this->modal->medium('edit', t('Edit'), 'SubtaskController', 'edit', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'SubtaskController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?> <?= $this->modal->confirm('trash-o', t('Remove'), 'SubtaskController', 'confirm', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->confirm('clone', t('Convert to task'), 'SubtaskConverterController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?> <?= $this->modal->confirm('clone', t('Convert to task'), 'SubtaskConverterController', 'show', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -15,6 +15,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'SubtaskController', 'SubtaskController',
'remove', 'remove',
array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']) array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])
) ?> ) ?>
</div> </div>

View File

@ -1,7 +1,7 @@
<?php if (! empty($subtasks)): ?> <?php if (! empty($subtasks)): ?>
<table <table
class="subtasks-table table-striped table-scrolling" class="subtasks-table table-striped table-scrolling"
data-save-position-url="<?= $this->url->href('SubtaskController', 'movePosition', array('project_id' => $task['project_id'], 'task_id' => $task['id'])) ?>" data-save-position-url="<?= $this->url->href('SubtaskController', 'movePosition', array('task_id' => $task['id'])) ?>"
> >
<thead> <thead>
<tr> <tr>

View File

@ -15,6 +15,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'SubtaskConverterController', 'SubtaskConverterController',
'save', 'save',
array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']) array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])
) ?> ) ?>
</div> </div>

View File

@ -1,7 +1,7 @@
<div class="page-header"> <div class="page-header">
<h2><?= t('You already have one subtask in progress') ?></h2> <h2><?= t('You already have one subtask in progress') ?></h2>
</div> </div>
<form action="<?= $this->url->href('SubtaskRestrictionController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" method="post"> <form action="<?= $this->url->href('SubtaskRestrictionController', 'save', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>" method="post">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>

View File

@ -86,7 +86,7 @@
<?php endif ?> <?php endif ?>
</span> </span>
<?php if ($editable && $task['owner_id'] != $this->user->getId()): ?> <?php if ($editable && $task['owner_id'] != $this->user->getId()): ?>
- <span><?= $this->url->link(t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken()]) ?></span> - <span><?= $this->url->link(t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken()]) ?></span>
<?php endif ?> <?php endif ?>
</li> </li>
<?php if ($task['creator_username']): ?> <?php if ($task['creator_username']): ?>
@ -124,7 +124,7 @@
<?php if ($task['date_started']): ?> <?php if ($task['date_started']): ?>
<span><?= $this->dt->datetime($task['date_started']) ?></span> <span><?= $this->dt->datetime($task['date_started']) ?></span>
<?php elseif ($editable): ?> <?php elseif ($editable): ?>
<span><?= $this->url->link(t('Start now'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken()]) ?></span> <span><?= $this->url->link(t('Start now'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken()]) ?></span>
<?php endif ?> <?php endif ?>
</li> </li>
<li> <li>
@ -165,7 +165,7 @@
<?php if (! empty($task['external_uri']) && ! empty($task['external_provider'])): ?> <?php if (! empty($task['external_uri']) && ! empty($task['external_provider'])): ?>
<?= $this->app->component('external-task-view', array( <?= $this->app->component('external-task-view', array(
'url' => $this->url->href('ExternalTaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), 'url' => $this->url->href('ExternalTaskViewController', 'show', array('task_id' => $task['id'])),
)) ?> )) ?>
<?php endif ?> <?php endif ?>

View File

@ -6,46 +6,46 @@
<?php if ($this->projectRole->canUpdateTask($task)): ?> <?php if ($this->projectRole->canUpdateTask($task)): ?>
<?php if ($this->projectRole->canChangeAssignee($task) && array_key_exists('owner_id', $task) && $task['owner_id'] != $this->user->getId()): ?> <?php if ($this->projectRole->canChangeAssignee($task) && array_key_exists('owner_id', $task) && $task['owner_id'] != $this->user->getId()): ?>
<li> <li>
<?= $this->url->icon('hand-o-right', t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken(), 'redirect' => isset($redirect) ? $redirect : '']) ?> <?= $this->url->icon('hand-o-right', t('Assign to me'), 'TaskModificationController', 'assignToMe', ['task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken(), 'redirect' => isset($redirect) ? $redirect : '']) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?> <?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?>
<li> <li>
<?= $this->url->icon('play', t('Set the start date automatically'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'project_id' => $task['project_id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken(), 'redirect' => isset($redirect) ? $redirect : '']) ?> <?= $this->url->icon('play', t('Set the start date automatically'), 'TaskModificationController', 'start', ['task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken(), 'redirect' => isset($redirect) ? $redirect : '']) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<li> <li>
<?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<li> <li>
<?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:dropdown:after-basic-actions', array('task' => $task)) ?> <?= $this->hook->render('template:task:dropdown:after-basic-actions', array('task' => $task)) ?>
<li> <li>
<?= $this->modal->medium('code-fork', t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('code-fork', t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->medium('external-link', t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('external-link', t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:dropdown:after-add-links', array('task' => $task)) ?> <?= $this->hook->render('template:task:dropdown:after-add-links', array('task' => $task)) ?>
<li> <li>
<?= $this->modal->small('comment-o', t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('comment-o', t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:dropdown:after-add-comment', array('task' => $task)) ?> <?= $this->hook->render('template:task:dropdown:after-add-comment', array('task' => $task)) ?>
<li> <li>
<?= $this->modal->medium('file', t('Attach a document'), 'TaskFileController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('file', t('Attach a document'), 'TaskFileController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->medium('camera', t('Add a screenshot'), 'TaskPopoverController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('camera', t('Add a screenshot'), 'TaskPopoverController', 'screenshot', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:dropdown:after-add-attachments', array('task' => $task)) ?> <?= $this->hook->render('template:task:dropdown:after-add-attachments', array('task' => $task)) ?>
<li> <li>
<?= $this->modal->small('files-o', t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('files-o', t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->small('clipboard', t('Duplicate to project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('clipboard', t('Duplicate to project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
@ -56,21 +56,21 @@
<?= $this->modal->small('clone', t('Move to project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('clone', t('Move to project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->small('paper-plane', t('Send by email'), 'TaskMailController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('paper-plane', t('Send by email'), 'TaskMailController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:dropdown:after-send-mail', array('task' => $task)) ?> <?= $this->hook->render('template:task:dropdown:after-send-mail', array('task' => $task)) ?>
<?php if ($this->projectRole->canRemoveTask($task)): ?> <?php if ($this->projectRole->canRemoveTask($task)): ?>
<li> <li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<?php if (isset($task['is_active']) && $this->projectRole->canChangeTaskStatusInColumn($task['project_id'], $task['column_id'])): ?> <?php if (isset($task['is_active']) && $this->projectRole->canChangeTaskStatusInColumn($task['project_id'], $task['column_id'])): ?>
<li> <li>
<?php if ($task['is_active'] == 1): ?> <?php if ($task['is_active'] == 1): ?>
<?= $this->modal->confirm('times', t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->confirm('times', t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'])) ?>
<?php else: ?> <?php else: ?>
<?= $this->modal->confirm('check-square-o', t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->confirm('check-square-o', t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'])) ?>
<?php endif ?> <?php endif ?>
</li> </li>
<?php endif ?> <?php endif ?>

View File

@ -3,10 +3,10 @@
<?= $this->hook->render('template:task:layout:top', array('task' => $task)) ?> <?= $this->hook->render('template:task:layout:top', array('task' => $task)) ?>
<section <section
class="sidebar-container" id="task-view" class="sidebar-container" id="task-view"
data-edit-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" data-edit-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>"
data-subtask-url="<?= $this->url->href('SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" data-subtask-url="<?= $this->url->href('SubtaskController', 'create', array('task_id' => $task['id'])) ?>"
data-internal-link-url="<?= $this->url->href('TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" data-internal-link-url="<?= $this->url->href('TaskInternalLinkController', 'create', array('task_id' => $task['id'])) ?>"
data-comment-url="<?= $this->url->href('CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> data-comment-url="<?= $this->url->href('CommentController', 'create', array('task_id' => $task['id'])) ?>">
<?= $this->render($sidebar_template, array('task' => $task)) ?> <?= $this->render($sidebar_template, array('task' => $task)) ?>

View File

@ -4,20 +4,20 @@
</div> </div>
<ul> <ul>
<li <?= $this->app->checkMenuSelection('TaskViewController', 'show') ?>> <li <?= $this->app->checkMenuSelection('TaskViewController', 'show') ?>>
<?= $this->url->icon('newspaper-o', t('Summary'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->url->icon('newspaper-o', t('Summary'), 'TaskViewController', 'show', array('task_id' => $task['id'])) ?>
</li> </li>
<li <?= $this->app->checkMenuSelection('ActivityController', 'task') ?>> <li <?= $this->app->checkMenuSelection('ActivityController', 'task') ?>>
<?= $this->url->icon('dashboard', t('Activity stream'), 'ActivityController', 'task', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->url->icon('dashboard', t('Activity stream'), 'ActivityController', 'task', array('task_id' => $task['id'])) ?>
</li> </li>
<li <?= $this->app->checkMenuSelection('TaskViewController', 'transitions') ?>> <li <?= $this->app->checkMenuSelection('TaskViewController', 'transitions') ?>>
<?= $this->url->icon('arrows-h', t('Transitions'), 'TaskViewController', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->url->icon('arrows-h', t('Transitions'), 'TaskViewController', 'transitions', array('task_id' => $task['id'])) ?>
</li> </li>
<li <?= $this->app->checkMenuSelection('TaskViewController', 'analytics') ?>> <li <?= $this->app->checkMenuSelection('TaskViewController', 'analytics') ?>>
<?= $this->url->icon('bar-chart', t('Analytics'), 'TaskViewController', 'analytics', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->url->icon('bar-chart', t('Analytics'), 'TaskViewController', 'analytics', array('task_id' => $task['id'])) ?>
</li> </li>
<?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?> <?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?>
<li <?= $this->app->checkMenuSelection('TaskViewController', 'timetracking') ?>> <li <?= $this->app->checkMenuSelection('TaskViewController', 'timetracking') ?>>
<?= $this->url->icon('clock-o', t('Time tracking'), 'TaskViewController', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->url->icon('clock-o', t('Time tracking'), 'TaskViewController', 'timetracking', array('task_id' => $task['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
@ -33,40 +33,40 @@
<?php if ($this->projectRole->canUpdateTask($task)): ?> <?php if ($this->projectRole->canUpdateTask($task)): ?>
<li> <li>
<?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->medium('refresh fa-rotate-90', t('Edit recurrence'), 'TaskRecurrenceController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('refresh fa-rotate-90', t('Edit recurrence'), 'TaskRecurrenceController', 'edit', array('task_id' => $task['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<li> <li>
<?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:sidebar:after-basic-actions', array('task' => $task)) ?> <?= $this->hook->render('template:task:sidebar:after-basic-actions', array('task' => $task)) ?>
<li> <li>
<?= $this->modal->medium('code-fork', t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('code-fork', t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->medium('external-link', t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('external-link', t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:sidebar:after-add-links', array('task' => $task)) ?> <?= $this->hook->render('template:task:sidebar:after-add-links', array('task' => $task)) ?>
<li> <li>
<?= $this->modal->small('comment-o', t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('comment-o', t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:sidebar:after-add-comment', array('task' => $task)) ?> <?= $this->hook->render('template:task:sidebar:after-add-comment', array('task' => $task)) ?>
<li> <li>
<?= $this->modal->medium('file', t('Attach a document'), 'TaskFileController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('file', t('Attach a document'), 'TaskFileController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->medium('camera', t('Add a screenshot'), 'TaskFileController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('camera', t('Add a screenshot'), 'TaskFileController', 'screenshot', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:sidebar:after-add-attachments', array('task' => $task)) ?> <?= $this->hook->render('template:task:sidebar:after-add-attachments', array('task' => $task)) ?>
<li> <li>
<?= $this->modal->small('files-o', t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('files-o', t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->small('clipboard', t('Duplicate to project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('clipboard', t('Duplicate to project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
@ -77,29 +77,29 @@
<?= $this->modal->small('clone', t('Move to project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('clone', t('Move to project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->small('paper-plane', t('Send by email'), 'TaskMailController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('paper-plane', t('Send by email'), 'TaskMailController', 'create', array('task_id' => $task['id'])) ?>
</li> </li>
<?= $this->hook->render('template:task:sidebar:after-send-mail', array('task' => $task)) ?> <?= $this->hook->render('template:task:sidebar:after-send-mail', array('task' => $task)) ?>
<?php if ($task['is_active'] == 1 && $this->projectRole->isSortableColumn($task['project_id'], $task['column_id'])): ?> <?php if ($task['is_active'] == 1 && $this->projectRole->isSortableColumn($task['project_id'], $task['column_id'])): ?>
<li> <li>
<?= $this->modal->small('arrows', t('Move position'), 'TaskMovePositionController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->small('arrows', t('Move position'), 'TaskMovePositionController', 'show', array('task_id' => $task['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<?php if ($this->projectRole->canChangeTaskStatusInColumn($task['project_id'], $task['column_id'])): ?> <?php if ($this->projectRole->canChangeTaskStatusInColumn($task['project_id'], $task['column_id'])): ?>
<?php if ($task['is_active'] == 1): ?> <?php if ($task['is_active'] == 1): ?>
<li> <li>
<?= $this->modal->confirm('times', t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->confirm('times', t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'])) ?>
</li> </li>
<?php else: ?> <?php else: ?>
<li> <li>
<?= $this->modal->confirm('check-square-o', t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->confirm('check-square-o', t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<?php endif ?> <?php endif ?>
<?php if ($this->projectRole->canRemoveTask($task)): ?> <?php if ($this->projectRole->canRemoveTask($task)): ?>
<li> <li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board')) ?> <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'redirect' => 'board')) ?>
</li> </li>
<?php endif ?> <?php endif ?>

View File

@ -1,4 +1,4 @@
<form method="post" action="<?= $this->url->href('CommentController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('CommentController', 'save', array('task_id' => $task['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->hidden('task_id', $values) ?> <?= $this->form->hidden('task_id', $values) ?>
<?= $this->form->hidden('user_id', $values) ?> <?= $this->form->hidden('user_id', $values) ?>

View File

@ -4,9 +4,9 @@
<?php if (!isset($is_public) || !$is_public): ?> <?php if (!isset($is_public) || !$is_public): ?>
<div class="comment-sorting"> <div class="comment-sorting">
<small> <small>
<?= $this->url->icon('sort', t('Change sorting'), 'CommentController', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())) ?> <?= $this->url->icon('sort', t('Change sorting'), 'CommentController', 'toggleSorting', array('task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())) ?>
<?php if ($editable): ?> <?php if ($editable): ?>
<?= $this->modal->medium('paper-plane', t('Send by email'), 'CommentMailController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('paper-plane', t('Send by email'), 'CommentMailController', 'create', array('task_id' => $task['id'])) ?>
<?php endif ?> <?php endif ?>
</small> </small>
</div> </div>

View File

@ -5,11 +5,11 @@
<?php if (empty($projects_list)): ?> <?php if (empty($projects_list)): ?>
<p class="alert"><?= t('There is no destination project available.') ?></p> <p class="alert"><?= t('There is no destination project available.') ?></p>
<div class="form-actions"> <div class="form-actions">
<?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'js-modal-close btn') ?> <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id']), false, 'js-modal-close btn') ?>
</div> </div>
<?php else: ?> <?php else: ?>
<form method="post" action="<?= $this->url->href('TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('TaskDuplicationController', 'copy', array('task_id' => $task['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->hidden('id', $values) ?> <?= $this->form->hidden('id', $values) ?>
@ -21,7 +21,7 @@
'placeholder' => t('Choose a project'), 'placeholder' => t('Choose a project'),
'replace' => array( 'replace' => array(
'regex' => 'PROJECT_ID', 'regex' => 'PROJECT_ID',
'url' => $this->url->href('TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'dst_project_id' => 'PROJECT_ID')), 'url' => $this->url->href('TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'dst_project_id' => 'PROJECT_ID')),
) )
)) ?> )) ?>

View File

@ -10,6 +10,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'TaskDuplicationController', 'TaskDuplicationController',
'duplicate', 'duplicate',
array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes') array('task_id' => $task['id'], 'confirmation' => 'yes')
) ?> ) ?>
</div> </div>

View File

@ -5,11 +5,11 @@
<?php if (empty($projects_list)): ?> <?php if (empty($projects_list)): ?>
<p class="alert"><?= t('There is no destination project available.') ?></p> <p class="alert"><?= t('There is no destination project available.') ?></p>
<div class="form-actions"> <div class="form-actions">
<?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'js-modal-close btn') ?> <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id']), false, 'js-modal-close btn') ?>
</div> </div>
<?php else: ?> <?php else: ?>
<form method="post" action="<?= $this->url->href('TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('TaskDuplicationController', 'move', array('task_id' => $task['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->hidden('id', $values) ?> <?= $this->form->hidden('id', $values) ?>
@ -22,7 +22,7 @@
'placeholder' => t('Choose a project'), 'placeholder' => t('Choose a project'),
'replace' => array( 'replace' => array(
'regex' => 'PROJECT_ID', 'regex' => 'PROJECT_ID',
'url' => $this->url->href('TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'dst_project_id' => 'PROJECT_ID')), 'url' => $this->url->href('TaskDuplicationController', 'move', array('task_id' => $task['id'], 'dst_project_id' => 'PROJECT_ID')),
) )
)) ?> )) ?>

View File

@ -2,7 +2,7 @@
<h2><?= t('Add a new external link') ?></h2> <h2><?= t('Add a new external link') ?></h2>
</div> </div>
<form action="<?= $this->url->href('TaskExternalLinkController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> <form action="<?= $this->url->href('TaskExternalLinkController', 'save', array('task_id' => $task['id'])) ?>" method="post" autocomplete="off">
<?= $this->render('task_external_link/form', array('task' => $task, 'dependencies' => $dependencies, 'values' => $values, 'errors' => $errors)) ?> <?= $this->render('task_external_link/form', array('task' => $task, 'dependencies' => $dependencies, 'values' => $values, 'errors' => $errors)) ?>
<?= $this->modal->submitButtons() ?> <?= $this->modal->submitButtons() ?>
</form> </form>

View File

@ -2,7 +2,7 @@
<h2><?= t('Edit external link') ?></h2> <h2><?= t('Edit external link') ?></h2>
</div> </div>
<form action="<?= $this->url->href('TaskExternalLinkController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'link_id' => $link['id'])) ?>" method="post" autocomplete="off"> <form action="<?= $this->url->href('TaskExternalLinkController', 'update', array('task_id' => $task['id'], 'link_id' => $link['id'])) ?>" method="post" autocomplete="off">
<?= $this->render('task_external_link/form', array('task' => $task, 'dependencies' => $dependencies, 'values' => $values, 'errors' => $errors)) ?> <?= $this->render('task_external_link/form', array('task' => $task, 'dependencies' => $dependencies, 'values' => $values, 'errors' => $errors)) ?>
<?= $this->modal->submitButtons() ?> <?= $this->modal->submitButtons() ?>
</form> </form>

View File

@ -2,7 +2,7 @@
<h2><?= t('Add a new external link') ?></h2> <h2><?= t('Add a new external link') ?></h2>
</div> </div>
<form action="<?= $this->url->href('TaskExternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> <form action="<?= $this->url->href('TaskExternalLinkController', 'create', array('task_id' => $task['id'])) ?>" method="post" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->label(t('External link'), 'text') ?> <?= $this->form->label(t('External link'), 'text') ?>

View File

@ -10,6 +10,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'TaskExternalLinkController', 'TaskExternalLinkController',
'remove', 'remove',
array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']) array('link_id' => $link['id'], 'task_id' => $task['id'])
) ?> ) ?>
</div> </div>

View File

@ -18,10 +18,10 @@
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a> <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a>
<ul> <ul>
<li> <li>
<?= $this->modal->medium('edit', t('Edit'), 'TaskExternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('edit', t('Edit'), 'TaskExternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskExternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskExternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'])) ?>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -5,7 +5,7 @@
<?= $this->app->component('file-upload', array( <?= $this->app->component('file-upload', array(
'csrf' => $this->app->getToken()->getReusableCSRFToken(), 'csrf' => $this->app->getToken()->getReusableCSRFToken(),
'maxSize' => $max_size, 'maxSize' => $max_size,
'url' => $this->url->to('TaskFileController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), 'url' => $this->url->to('TaskFileController', 'save', array('task_id' => $task['id'])),
'labelDropzone' => t('Drag and drop your files here'), 'labelDropzone' => t('Drag and drop your files here'),
'labelOr' => t('or'), 'labelOr' => t('or'),
'labelChooseFiles' => t('choose files'), 'labelChooseFiles' => t('choose files'),

View File

@ -15,20 +15,20 @@
<ul> <ul>
<?php if ($this->file->getPreviewType($file['name']) !== null): ?> <?php if ($this->file->getPreviewType($file['name']) !== null): ?>
<li> <li>
<?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
</li> </li>
<?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?> <?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?>
<li> <li>
<i class="fa fa-eye fa-fw"></i> <i class="fa fa-eye fa-fw"></i>
<?= $this->url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?> <?= $this->url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'file_id' => $file['id']), false, '', '', true) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<li> <li>
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
</li> </li>
<?php if ($this->user->hasProjectAccess('TaskFileController', 'remove', $task['project_id'])): ?> <?php if ($this->user->hasProjectAccess('TaskFileController', 'remove', $task['project_id'])): ?>
<li> <li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<?= $this->hook->render('template:task-file:documents:dropdown', array('task' => $task, 'file' => $file)) ?> <?= $this->hook->render('template:task-file:documents:dropdown', array('task' => $task, 'file' => $file)) ?>

View File

@ -7,9 +7,9 @@
'image' => $file, 'image' => $file,
'regex' => 'FILE_ID', 'regex' => 'FILE_ID',
'url' => array( 'url' => array(
'image' => $this->url->to('FileViewerController', 'image', array('file_id' => 'FILE_ID', 'project_id' => $task['project_id'], 'task_id' => $task['id'])), 'image' => $this->url->to('FileViewerController', 'image', array('file_id' => 'FILE_ID', 'task_id' => $task['id'])),
'thumbnail' => $this->url->to('FileViewerController', 'thumbnail', array('file_id' => 'FILE_ID', 'project_id' => $task['project_id'], 'task_id' => $task['id'])), 'thumbnail' => $this->url->to('FileViewerController', 'thumbnail', array('file_id' => 'FILE_ID', 'task_id' => $task['id'])),
'download' => $this->url->to('FileViewerController', 'download', array('file_id' => 'FILE_ID', 'project_id' => $task['project_id'], 'task_id' => $task['id'])), 'download' => $this->url->to('FileViewerController', 'download', array('file_id' => 'FILE_ID', 'task_id' => $task['id'])),
) )
)) ?> )) ?>
@ -19,14 +19,14 @@
<a href="#" class="dropdown-menu dropdown-menu-link-text" title="<?= $this->text->e($file['name']) ?>"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a> <a href="#" class="dropdown-menu dropdown-menu-link-text" title="<?= $this->text->e($file['name']) ?>"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
<ul> <ul>
<li> <li>
<?= $this->url->icon('external-link', t('View file'), 'FileViewerController', 'image', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?> <?= $this->url->icon('external-link', t('View file'), 'FileViewerController', 'image', array('task_id' => $task['id'], 'file_id' => $file['id']), false, '', '', true) ?>
</li> </li>
<li> <li>
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
</li> </li>
<?php if ($this->user->hasProjectAccess('TaskFileController', 'remove', $task['project_id'])): ?> <?php if ($this->user->hasProjectAccess('TaskFileController', 'remove', $task['project_id'])): ?>
<li> <li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<?= $this->hook->render('template:task-file:images:dropdown', array('task' => $task, 'file' => $file)) ?> <?= $this->hook->render('template:task-file:images:dropdown', array('task' => $task, 'file' => $file)) ?>

View File

@ -10,6 +10,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'TaskFileController', 'TaskFileController',
'remove', 'remove',
array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']) array('task_id' => $task['id'], 'file_id' => $file['id'])
) ?> ) ?>
</div> </div>

View File

@ -6,7 +6,7 @@
<p id="screenshot-inner"><?= t('Take a screenshot and press CTRL+V or ⌘+V to paste here.') ?></p> <p id="screenshot-inner"><?= t('Take a screenshot and press CTRL+V or ⌘+V to paste here.') ?></p>
</div> </div>
<form action="<?= $this->url->href('TaskFileController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post"> <form action="<?= $this->url->href('TaskFileController', 'screenshot', array('task_id' => $task['id'])) ?>" method="post">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->app->component('screenshot') ?> <?= $this->app->component('screenshot') ?>
<?= $this->modal->submitButtons() ?> <?= $this->modal->submitButtons() ?>

View File

@ -2,7 +2,7 @@
<h2><?= t('Add a new link') ?></h2> <h2><?= t('Add a new link') ?></h2>
</div> </div>
<form action="<?= $this->url->href('TaskInternalLinkController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> <form action="<?= $this->url->href('TaskInternalLinkController', 'save', array('task_id' => $task['id'])) ?>" method="post" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->hidden('opposite_task_id', $values) ?> <?= $this->form->hidden('opposite_task_id', $values) ?>

View File

@ -2,7 +2,7 @@
<h2><?= t('Edit link') ?></h2> <h2><?= t('Edit link') ?></h2>
</div> </div>
<form action="<?= $this->url->href('TaskInternalLinkController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'link_id' => $task_link['id'])) ?>" method="post" autocomplete="off"> <form action="<?= $this->url->href('TaskInternalLinkController', 'update', array('task_id' => $task['id'], 'link_id' => $task_link['id'])) ?>" method="post" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->hidden('opposite_task_id', $values) ?> <?= $this->form->hidden('opposite_task_id', $values) ?>

View File

@ -10,6 +10,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'TaskInternalLinkController', 'TaskInternalLinkController',
'remove', 'remove',
array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']) array('link_id' => $link['id'], 'task_id' => $task['id'])
) ?> ) ?>
</div> </div>

View File

@ -32,10 +32,10 @@
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a> <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a>
<ul> <ul>
<li> <li>
<?= $this->modal->medium('edit', t('Edit'), 'TaskInternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->medium('edit', t('Edit'), 'TaskInternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'])) ?>
</li> </li>
<li> <li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'TaskInternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskInternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'])) ?>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -3,7 +3,7 @@
<span <span
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?> <?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
class="task-board-change-assignee" class="task-board-change-assignee"
data-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> data-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>">
<?php else: ?> <?php else: ?>
class="task-board-assignee"> class="task-board-assignee">
<?php endif ?> <?php endif ?>

View File

@ -10,7 +10,7 @@
$this->text->e($task['category_name']), $this->text->e($task['category_name']),
'TaskModificationController', 'TaskModificationController',
'edit', 'edit',
array('task_id' => $task['id'], 'project_id' => $task['project_id']), array('task_id' => $task['id']),
false, false,
'js-modal-medium' . (! empty($task['category_description']) ? ' tooltip' : ''), 'js-modal-medium' . (! empty($task['category_description']) ? ' tooltip' : ''),
t('Change category') t('Change category')

View File

@ -44,27 +44,27 @@
<?php endif ?> <?php endif ?>
<?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PENDING): ?> <?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PENDING): ?>
<?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?> <?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?>
<?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90 fa-inverse"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90 fa-inverse"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($task['nb_links'])): ?> <?php if (! empty($task['nb_links'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-code-fork fa-fw"></i>'.$task['nb_links'], $this->url->href('BoardTooltipController', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-code-fork fa-fw"></i>'.$task['nb_links'], $this->url->href('BoardTooltipController', 'tasklinks', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($task['nb_external_links'])): ?> <?php if (! empty($task['nb_external_links'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-external-link fa-fw"></i>'.$task['nb_external_links'], $this->url->href('BoardTooltipController', 'externallinks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-external-link fa-fw"></i>'.$task['nb_external_links'], $this->url->href('BoardTooltipController', 'externallinks', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($task['nb_subtasks'])): ?> <?php if (! empty($task['nb_subtasks'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-bars fa-fw"></i>'.round($task['nb_completed_subtasks'] / $task['nb_subtasks'] * 100, 0).'%', $this->url->href('BoardTooltipController', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-bars fa-fw"></i>'.round($task['nb_completed_subtasks'] / $task['nb_subtasks'] * 100, 0).'%', $this->url->href('BoardTooltipController', 'subtasks', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($task['nb_files'])): ?> <?php if (! empty($task['nb_files'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-paperclip fa-fw"></i>'.$task['nb_files'], $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-paperclip fa-fw"></i>'.$task['nb_files'], $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<?php if ($task['nb_comments'] > 0): ?> <?php if ($task['nb_comments'] > 0): ?>
@ -74,7 +74,7 @@
$task['nb_comments'], $task['nb_comments'],
'CommentListController', 'CommentListController',
'show', 'show',
array('task_id' => $task['id'], 'project_id' => $task['project_id']), array('task_id' => $task['id']),
$task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments']) $task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments'])
) ?> ) ?>
<?php else: ?> <?php else: ?>
@ -84,7 +84,7 @@
<?php endif ?> <?php endif ?>
<?php if (! empty($task['description'])): ?> <?php if (! empty($task['description'])): ?>
<?= $this->app->tooltipLink('<i class="fa fa-file-text-o"></i>', $this->url->href('BoardTooltipController', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?> <?= $this->app->tooltipLink('<i class="fa fa-file-text-o"></i>', $this->url->href('BoardTooltipController', 'description', array('task_id' => $task['id']))) ?>
<?php endif ?> <?php endif ?>
<span title="<?= t('Position') ?>">(<span class="ui-helper-hidden-accessible"><?= t('Position') ?> </span><?= $task['position'] ?>)</span> <span title="<?= t('Position') ?>">(<span class="ui-helper-hidden-accessible"><?= t('Position') ?> </span><?= $task['position'] ?>)</span>

View File

@ -9,6 +9,6 @@
<?php endif ?> <?php endif ?>
<span class="table-list-title <?= $task['is_active'] == 0 ? 'status-closed' : '' ?>"> <span class="table-list-title <?= $task['is_active'] == 0 ? 'status-closed' : '' ?>">
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])) ?> <?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'])) ?>
</span> </span>
</div> </div>

View File

@ -1,7 +1,7 @@
<div class="page-header"> <div class="page-header">
<h2><?= $this->text->e($task['title']) ?> &gt; <?= t('Send by email') ?></h2> <h2><?= $this->text->e($task['title']) ?> &gt; <?= t('Send by email') ?></h2>
</div> </div>
<form method="post" action="<?= $this->url->href('TaskMailController', 'send', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off" class="js-mail-form"> <form method="post" action="<?= $this->url->href('TaskMailController', 'send', array('task_id' => $task['id'])) ?>" autocomplete="off" class="js-mail-form">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->label(t('Email'), 'emails') ?> <?= $this->form->label(t('Email'), 'emails') ?>

View File

@ -1,7 +1,7 @@
<div class="page-header"> <div class="page-header">
<h2><?= $this->text->e($project['name']) ?> &gt; <?= $this->text->e($task['title']) ?></h2> <h2><?= $this->text->e($project['name']) ?> &gt; <?= $this->text->e($task['title']) ?></h2>
</div> </div>
<form method="post" action="<?= $this->url->href('TaskModificationController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('TaskModificationController', 'update', array('task_id' => $task['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<div class="task-form-container"> <div class="task-form-container">

View File

@ -5,7 +5,7 @@
<form> <form>
<?= $this->app->component('task-move-position', array( <?= $this->app->component('task-move-position', array(
'saveUrl' => $this->url->href('TaskMovePositionController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())), 'saveUrl' => $this->url->href('TaskMovePositionController', 'save', array('task_id' => $task['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())),
'board' => $board, 'board' => $board,
'task' => $task, 'task' => $task,
'swimlaneLabel' => t('Swimlane'), 'swimlaneLabel' => t('Swimlane'),

View File

@ -15,7 +15,7 @@
<?php if ($task['recurrence_status'] != \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?> <?php if ($task['recurrence_status'] != \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?>
<form method="post" action="<?= $this->url->href('TaskRecurrenceController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('TaskRecurrenceController', 'update', array('task_id' => $task['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>

View File

@ -25,13 +25,13 @@
<?php if ($task['recurrence_parent']): ?> <?php if ($task['recurrence_parent']): ?>
<li> <li>
<?= t('This task has been created by: ') ?> <?= t('This task has been created by: ') ?>
<?= $this->url->link('#'.$task['recurrence_parent'], 'TaskViewController', 'show', array('task_id' => $task['recurrence_parent'], 'project_id' => $task['project_id'])) ?> <?= $this->url->link('#'.$task['recurrence_parent'], 'TaskViewController', 'show', array('task_id' => $task['recurrence_parent'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<?php if ($task['recurrence_child']): ?> <?php if ($task['recurrence_child']): ?>
<li> <li>
<?= t('This task has created this child task: ') ?> <?= t('This task has created this child task: ') ?>
<?= $this->url->link('#'.$task['recurrence_child'], 'TaskViewController', 'show', array('task_id' => $task['recurrence_child'], 'project_id' => $task['project_id'])) ?> <?= $this->url->link('#'.$task['recurrence_child'], 'TaskViewController', 'show', array('task_id' => $task['recurrence_child'])) ?>
</li> </li>
<?php endif ?> <?php endif ?>
<?php endif ?> <?php endif ?>

View File

@ -10,6 +10,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'TaskStatusController', 'TaskStatusController',
'close', 'close',
array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes') array('task_id' => $task['id'], 'confirmation' => 'yes')
) ?> ) ?>
</div> </div>

View File

@ -10,6 +10,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'TaskStatusController', 'TaskStatusController',
'open', 'open',
array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes') array('task_id' => $task['id'], 'confirmation' => 'yes')
) ?> ) ?>
</div> </div>

View File

@ -10,6 +10,6 @@
<?= $this->modal->confirmButtons( <?= $this->modal->confirmButtons(
'TaskSuppressionController', 'TaskSuppressionController',
'remove', 'remove',
array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => $redirect) array('task_id' => $task['id'], 'redirect' => $redirect)
) ?> ) ?>
</div> </div>

View File

@ -16,8 +16,8 @@
</tr> </tr>
<?php foreach ($subtask_paginator->getCollection() as $record): ?> <?php foreach ($subtask_paginator->getCollection() as $record): ?>
<tr> <tr>
<td><?= $this->url->link($this->text->e($record['task_title']), 'TaskViewController', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td> <td><?= $this->url->link($this->text->e($record['task_title']), 'TaskViewController', 'show', array('task_id' => $record['task_id'])) ?></td>
<td><?= $this->url->link($this->text->e($record['subtask_title']), 'TaskViewController', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td> <td><?= $this->url->link($this->text->e($record['subtask_title']), 'TaskViewController', 'show', array('task_id' => $record['task_id'])) ?></td>
<td><?= $this->dt->datetime($record['start']) ?></td> <td><?= $this->dt->datetime($record['start']) ?></td>
<td><?= $this->dt->datetime($record['end']) ?></td> <td><?= $this->dt->datetime($record['end']) ?></td>
<td><?= n($record['time_spent']).' '.t('hours') ?></td> <td><?= n($record['time_spent']).' '.t('hours') ?></td>