diff --git a/app/Controller/BoardPopover.php b/app/Controller/BoardPopover.php index f2b39d8d9..965669ffc 100644 --- a/app/Controller/BoardPopover.php +++ b/app/Controller/BoardPopover.php @@ -93,7 +93,7 @@ class BoardPopover extends Base { $task = $this->getTask(); - $this->response->html($this->template->render('file/screenshot', array( + $this->response->html($this->template->render('task_file/screenshot', array( 'task' => $task, ))); } diff --git a/app/Controller/File.php b/app/Controller/TaskFile.php similarity index 92% rename from app/Controller/File.php rename to app/Controller/TaskFile.php index c5517df81..102fdc5c3 100644 --- a/app/Controller/File.php +++ b/app/Controller/TaskFile.php @@ -5,12 +5,12 @@ namespace Kanboard\Controller; use Kanboard\Core\ObjectStorage\ObjectStorageException; /** - * File controller + * File File Controller * * @package controller * @author Frederic Guillot */ -class File extends Base +class TaskFile extends Base { /** * Screenshot @@ -26,7 +26,7 @@ class File extends Base return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } - $this->response->html($this->helper->layout->task('file/screenshot', array( + $this->response->html($this->helper->layout->task('task_file/screenshot', array( 'task' => $task, ))); } @@ -40,7 +40,7 @@ class File extends Base { $task = $this->getTask(); - $this->response->html($this->helper->layout->task('file/new', array( + $this->response->html($this->helper->layout->task('task_file/new', array( 'task' => $task, 'max_size' => $this->helper->text->phpToBytes(ini_get('upload_max_filesize')), ))); @@ -95,7 +95,7 @@ class File extends Base $file = $this->taskFile->getById($this->request->getIntegerParam('file_id')); if ($file['task_id'] == $task['id']) { - $this->response->html($this->template->render('file/open', array( + $this->response->html($this->template->render('task_file/open', array( 'file' => $file, 'task' => $task, ))); @@ -178,7 +178,7 @@ class File extends Base $task = $this->getTask(); $file = $this->taskFile->getById($this->request->getIntegerParam('file_id')); - $this->response->html($this->helper->layout->task('file/remove', array( + $this->response->html($this->helper->layout->task('task_file/remove', array( 'task' => $task, 'file' => $file, ))); diff --git a/app/ServiceProvider/AuthenticationProvider.php b/app/ServiceProvider/AuthenticationProvider.php index c2f7a5c43..cc7b9302c 100644 --- a/app/ServiceProvider/AuthenticationProvider.php +++ b/app/ServiceProvider/AuthenticationProvider.php @@ -76,7 +76,7 @@ class AuthenticationProvider implements ServiceProviderInterface $acl->add('Comment', '*', Role::PROJECT_MEMBER); $acl->add('Customfilter', '*', Role::PROJECT_MEMBER); $acl->add('Export', '*', Role::PROJECT_MANAGER); - $acl->add('File', array('screenshot', 'create', 'save', 'remove', 'confirm'), Role::PROJECT_MEMBER); + $acl->add('TaskFile', array('screenshot', 'create', 'save', 'remove', 'confirm'), Role::PROJECT_MEMBER); $acl->add('Gantt', '*', Role::PROJECT_MANAGER); $acl->add('Project', array('share', 'integrations', 'notifications', 'duplicate', 'disable', 'enable', 'remove'), Role::PROJECT_MANAGER); $acl->add('ProjectPermission', '*', Role::PROJECT_MANAGER); diff --git a/app/ServiceProvider/RouteProvider.php b/app/ServiceProvider/RouteProvider.php index 5003eb889..c723140ee 100644 --- a/app/ServiceProvider/RouteProvider.php +++ b/app/ServiceProvider/RouteProvider.php @@ -94,8 +94,6 @@ class RouteProvider implements ServiceProviderInterface $container['route']->addRoute('public/task/:task_id/:token', 'task', 'readonly'); $container['route']->addRoute('project/:project_id/task/:task_id/activity', 'activity', 'task'); - $container['route']->addRoute('project/:project_id/task/:task_id/screenshot', 'file', 'screenshot'); - $container['route']->addRoute('project/:project_id/task/:task_id/upload', 'file', 'create'); $container['route']->addRoute('project/:project_id/task/:task_id/transitions', 'task', 'transitions'); $container['route']->addRoute('project/:project_id/task/:task_id/analytics', 'task', 'analytics'); $container['route']->addRoute('project/:project_id/task/:task_id/subtasks', 'subtask', 'show'); diff --git a/app/Template/board/tooltip_files.php b/app/Template/board/tooltip_files.php index 407309b30..4fa14b57f 100644 --- a/app/Template/board/tooltip_files.php +++ b/app/Template/board/tooltip_files.php @@ -8,9 +8,9 @@
= t('Take a screenshot and press CTRL+V or ⌘+V to paste here.') ?>