-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlugin.php
57 lines (44 loc) · 1.46 KB
/
Plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
namespace Kanboard\Plugin\DelegateTask;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;
use Kanboard\Core\Security\Role;
use Kanboard\Model\TaskModel;
class Plugin extends Base
{
public function initialize()
{
// Set relevant rights, so that project-viewers can create a task
$this->projectAccessMap->add('TaskCreationController', array('show','save'), Role::PROJECT_VIEWER);
//Helpers
$this->helper->register('DelegateTaskHelper', '\Kanboard\Plugin\DelegateTask\Helper\DelegateTaskHelper');
// template overrides
$this->template->setTemplateOverride('board/table_column', 'DelegateTask:board/table_column');
$this->template->setTemplateOverride('project_header/dropdown', 'DelegateTask:project_header/dropdown');
}
public function onStartup()
{
// load Translation
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__ . '/Locale');
}
public function getPluginName()
{
return 'DelegateTask';
}
public function getPluginDescription()
{
return t('Allows project-viewers to delegate a task into the first column of the project');
}
public function getPluginAuthor()
{
return 'Manfred Hoffmann';
}
public function getPluginVersion()
{
return '0.0.2';
}
public function getPluginHomepage()
{
return 'https://github.com/manne65-hd/Kanboard-DelegateTask';
}
}