diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Controller/TaskInternalLink.php (renamed from app/Controller/Tasklink.php) | 18 | ||||
-rw-r--r-- | app/ServiceProvider/AuthenticationProvider.php | 4 | ||||
-rw-r--r-- | app/ServiceProvider/RouteProvider.php | 2 | ||||
-rw-r--r-- | app/Template/board/task_menu.php | 2 | ||||
-rw-r--r-- | app/Template/task/dropdown.php | 2 | ||||
-rw-r--r-- | app/Template/task/layout.php | 2 | ||||
-rw-r--r-- | app/Template/task/menu.php | 2 | ||||
-rw-r--r-- | app/Template/task/public.php | 2 | ||||
-rw-r--r-- | app/Template/task/show.php | 2 | ||||
-rw-r--r-- | app/Template/task/sidebar.php | 2 | ||||
-rw-r--r-- | app/Template/task_internal_link/create.php (renamed from app/Template/tasklink/create.php) | 2 | ||||
-rw-r--r-- | app/Template/task_internal_link/edit.php (renamed from app/Template/tasklink/edit.php) | 2 | ||||
-rw-r--r-- | app/Template/task_internal_link/remove.php (renamed from app/Template/tasklink/remove.php) | 2 | ||||
-rw-r--r-- | app/Template/task_internal_link/show.php (renamed from app/Template/tasklink/show.php) | 2 | ||||
-rw-r--r-- | app/Template/task_internal_link/table.php (renamed from app/Template/tasklink/table.php) | 4 |
15 files changed, 22 insertions, 28 deletions
diff --git a/app/Controller/Tasklink.php b/app/Controller/TaskInternalLink.php index a7f4914b..ac5e04b7 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 5ed28fe1..d59ffd9e 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 d551f25d..0e7548d4 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 bd582185..51a2e72e 100644 --- a/app/Template/board/task_menu.php +++ b/app/Template/board/task_menu.php @@ -6,7 +6,7 @@ <li><i class="fa fa-align-left fa-fw"></i> <?= $this->url->link(t('Change description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> <li><i class="fa fa-pencil-square-o fa-fw"></i> <?= $this->url->link(t('Edit this task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> <li><i class="fa fa-comment-o fa-fw"></i> <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> - <li><i class="fa fa-code-fork fa-fw"></i> <?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> + <li><i class="fa fa-code-fork fa-fw"></i> <?= $this->url->link(t('Add a link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> <li><i class="fa fa-external-link fa-fw"></i> <?= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> <li><i class="fa fa-camera fa-fw"></i> <?= $this->url->link(t('Add a screenshot'), 'BoardPopover', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> <?php if ($task['is_active'] == 1): ?> diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php index 3300ccf0..f98f5172 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -21,7 +21,7 @@ </li> <li> <i class="fa fa-code-fork fa-fw"></i> - <?= $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') ?> </li> <li> <i class="fa fa-external-link fa-fw"></i> diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php index b588384c..48360664 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 cddd930a..fe30d06e 100644 --- a/app/Template/task/menu.php +++ b/app/Template/task/menu.php @@ -26,7 +26,7 @@ </li> <li> <i class="fa fa-code-fork fa-fw"></i> - <?= $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') ?> </li> <li> <i class="fa fa-external-link fa-fw"></i> diff --git a/app/Template/task/public.php b/app/Template/task/public.php index 723882c3..94782163 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 98221bcf..d68f6c48 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 955b17c4..ee3b1594 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -44,7 +44,7 @@ </li> <li> <i class="fa fa-code-fork fa-fw"></i> - <?= $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') ?> </li> <li> <i class="fa fa-external-link fa-fw"></i> diff --git a/app/Template/tasklink/create.php b/app/Template/task_internal_link/create.php index 02d38a9b..94dcdd66 100644 --- a/app/Template/tasklink/create.php +++ b/app/Template/task_internal_link/create.php @@ -2,7 +2,7 @@ <h2><?= t('Add a new link') ?></h2> </div> -<form class="popover-form" action="<?= $this->url->href('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> +<form class="popover-form" action="<?= $this->url->href('TaskInternalLink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?> diff --git a/app/Template/tasklink/edit.php b/app/Template/task_internal_link/edit.php index b174c348..03622df7 100644 --- a/app/Template/tasklink/edit.php +++ b/app/Template/task_internal_link/edit.php @@ -2,7 +2,7 @@ <h2><?= t('Edit link') ?></h2> </div> -<form action="<?= $this->url->href('tasklink', '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('TaskInternalLink', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'link_id' => $task_link['id'])) ?>" method="post" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> diff --git a/app/Template/tasklink/remove.php b/app/Template/task_internal_link/remove.php index 42bf3012..82156ece 100644 --- a/app/Template/tasklink/remove.php +++ b/app/Template/task_internal_link/remove.php @@ -8,7 +8,7 @@ </p> <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'tasklink', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'TaskInternalLink', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?> <?= t('or') ?> <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> </div> diff --git a/app/Template/tasklink/show.php b/app/Template/task_internal_link/show.php index 9f718fc9..cc05429c 100644 --- a/app/Template/tasklink/show.php +++ b/app/Template/task_internal_link/show.php @@ -3,7 +3,7 @@ <h3><a href="#" class="fa accordion-toggle"></a> <?= t('Internal links') ?></h3> </div> <div class="accordion-content"> - <?= $this->render('tasklink/table', array( + <?= $this->render('task_internal_link/table', array( 'links' => $links, 'task' => $task, 'project' => $project, diff --git a/app/Template/tasklink/table.php b/app/Template/task_internal_link/table.php index df7bc4f5..8f25b29b 100644 --- a/app/Template/tasklink/table.php +++ b/app/Template/task_internal_link/table.php @@ -72,8 +72,8 @@ <div class="dropdown"> <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a> <ul> - <li><?= $this->url->link(t('Edit'), 'tasklink', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> - <li><?= $this->url->link(t('Remove'), 'tasklink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> + <li><?= $this->url->link(t('Edit'), 'TaskInternalLink', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> + <li><?= $this->url->link(t('Remove'), 'TaskInternalLink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li> </ul> </div> </td> |