diff --git a/app/Controller/Tasklink.php b/app/Controller/TaskInternalLink.php
similarity index 88%
rename from app/Controller/Tasklink.php
rename to app/Controller/TaskInternalLink.php
index a7f4914bf..ac5e04b73 100644
--- a/app/Controller/Tasklink.php
+++ b/app/Controller/TaskInternalLink.php
@@ -3,13 +3,13 @@
namespace Kanboard\Controller;
/**
- * TaskLink controller
+ * TaskInternalLink Controller
*
* @package controller
* @author Olivier Maridat
* @author Frederic Guillot
*/
-class Tasklink extends Base
+class TaskInternalLink extends Base
{
/**
* Get the current link
@@ -37,12 +37,11 @@ class Tasklink extends Base
{
$task = $this->getTask();
- $this->response->html($this->template->render('tasklink/create', array(
+ $this->response->html($this->template->render('task_internal_link/create', array(
'values' => $values,
'errors' => $errors,
'task' => $task,
'labels' => $this->link->getList(0, false),
- 'title' => t('Add a new link')
)));
}
@@ -61,7 +60,7 @@ class Tasklink extends Base
if ($valid) {
if ($this->taskLink->create($values['task_id'], $values['opposite_task_id'], $values['link_id'])) {
$this->flash->success(t('Link added successfully.'));
- return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])).'#links', true);
+ return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
}
$errors = array('title' => array(t('The exact same link already exists')));
@@ -87,13 +86,12 @@ class Tasklink extends Base
$values['title'] = '#'.$opposite_task['id'].' - '.$opposite_task['title'];
}
- $this->response->html($this->template->render('tasklink/edit', array(
+ $this->response->html($this->template->render('task_internal_link/edit', array(
'values' => $values,
'errors' => $errors,
'task_link' => $task_link,
'task' => $task,
- 'labels' => $this->link->getList(0, false),
- 'title' => t('Edit link')
+ 'labels' => $this->link->getList(0, false)
)));
}
@@ -131,7 +129,7 @@ class Tasklink extends Base
$task = $this->getTask();
$link = $this->getTaskLink();
- $this->response->html($this->template->render('tasklink/remove', array(
+ $this->response->html($this->template->render('task_internal_link/remove', array(
'link' => $link,
'task' => $task,
)));
@@ -153,6 +151,6 @@ class Tasklink extends Base
$this->flash->failure(t('Unable to remove this link.'));
}
- $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])).'#links');
+ $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])));
}
}
diff --git a/app/ServiceProvider/AuthenticationProvider.php b/app/ServiceProvider/AuthenticationProvider.php
index 5ed28fe10..d59ffd9e5 100644
--- a/app/ServiceProvider/AuthenticationProvider.php
+++ b/app/ServiceProvider/AuthenticationProvider.php
@@ -94,10 +94,8 @@ class AuthenticationProvider implements ServiceProviderInterface
$acl->add('Taskduplication', '*', Role::PROJECT_MEMBER);
$acl->add('TaskRecurrence', '*', Role::PROJECT_MEMBER);
$acl->add('TaskImport', '*', Role::PROJECT_MANAGER);
- $acl->add('Tasklink', '*', Role::PROJECT_MEMBER);
- $acl->add('Tasklink', array('show'), Role::PROJECT_VIEWER);
+ $acl->add('TaskInternalLink', '*', Role::PROJECT_MEMBER);
$acl->add('TaskExternalLink', '*', Role::PROJECT_MEMBER);
- $acl->add('TaskExternalLink', array('show'), Role::PROJECT_VIEWER);
$acl->add('Taskmodification', '*', Role::PROJECT_MEMBER);
$acl->add('Taskstatus', '*', Role::PROJECT_MEMBER);
$acl->add('UserHelper', array('mention'), Role::PROJECT_MEMBER);
diff --git a/app/ServiceProvider/RouteProvider.php b/app/ServiceProvider/RouteProvider.php
index d551f25d2..0e7548d47 100644
--- a/app/ServiceProvider/RouteProvider.php
+++ b/app/ServiceProvider/RouteProvider.php
@@ -101,8 +101,6 @@ class RouteProvider implements ServiceProviderInterface
$container['route']->addRoute('project/:project_id/task/:task_id/analytics', 'task', 'analytics');
$container['route']->addRoute('project/:project_id/task/:task_id/subtasks', 'subtask', 'show');
$container['route']->addRoute('project/:project_id/task/:task_id/time-tracking', 'task', 'timetracking');
- $container['route']->addRoute('project/:project_id/task/:task_id/internal/links', 'tasklink', 'show');
- $container['route']->addRoute('project/:project_id/task/:task_id/external/links', 'TaskExternalLink', 'show');
// Exports
$container['route']->addRoute('export/tasks/:project_id', 'export', 'tasks');
diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php
index bd5821851..51a2e72e4 100644
--- a/app/Template/board/task_menu.php
+++ b/app/Template/board/task_menu.php
@@ -6,7 +6,7 @@
= $this->url->link(t('Change description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
= $this->url->link(t('Edit this task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
- = $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ = $this->url->link(t('Add a link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
= $this->url->link(t('Add a screenshot'), 'BoardPopover', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php
index 3300ccf05..f98f51728 100644
--- a/app/Template/task/dropdown.php
+++ b/app/Template/task/dropdown.php
@@ -21,7 +21,7 @@
- = $this->url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ = $this->url->link(t('Add internal link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php
index b588384c7..483606646 100644
--- a/app/Template/task/layout.php
+++ b/app/Template/task/layout.php
@@ -24,7 +24,7 @@
class="sidebar-container" id="task-view"
data-edit-url="= $this->url->href('taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
data-subtask-url="= $this->url->href('subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
- data-internal-link-url="= $this->url->href('tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
+ data-internal-link-url="= $this->url->href('TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
data-comment-url="= $this->url->href('comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
= $this->render($sidebar_template, array('task' => $task)) ?>
diff --git a/app/Template/task/menu.php b/app/Template/task/menu.php
index cddd930a9..fe30d06ee 100644
--- a/app/Template/task/menu.php
+++ b/app/Template/task/menu.php
@@ -26,7 +26,7 @@
- = $this->url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ = $this->url->link(t('Add internal link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
diff --git a/app/Template/task/public.php b/app/Template/task/public.php
index 723882c32..947821635 100644
--- a/app/Template/task/public.php
+++ b/app/Template/task/public.php
@@ -13,7 +13,7 @@
'editable' => false
)) ?>
- = $this->render('tasklink/show', array(
+ = $this->render('task_internal_link/show', array(
'task' => $task,
'links' => $links,
'project' => $project,
diff --git a/app/Template/task/show.php b/app/Template/task/show.php
index 98221bcf1..d68f6c485 100644
--- a/app/Template/task/show.php
+++ b/app/Template/task/show.php
@@ -19,7 +19,7 @@
)) ?>
= $this->hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?>
-= $this->render('tasklink/show', array(
+= $this->render('task_internal_link/show', array(
'task' => $task,
'links' => $internal_links,
'project' => $project,
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
index 955b17c4d..ee3b15949 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -44,7 +44,7 @@
- = $this->url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ = $this->url->link(t('Add internal link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
diff --git a/app/Template/tasklink/create.php b/app/Template/task_internal_link/create.php
similarity index 85%
rename from app/Template/tasklink/create.php
rename to app/Template/task_internal_link/create.php
index 02d38a9b8..94dcdd663 100644
--- a/app/Template/tasklink/create.php
+++ b/app/Template/task_internal_link/create.php
@@ -2,7 +2,7 @@
= t('Add a new link') ?>
-