-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlugin.php
60 lines (50 loc) · 1.9 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
58
59
60
<?php
namespace Kanboard\Plugin\SortBoardByDates;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;
class Plugin extends Base
{
public function initialize()
{
// Template OVERRIDES ...
$this->template->setTemplateOverride('project_header/views', 'SortBoardByDates:project_header/views');
$this->template->setTemplateOverride('board/table_tasks', 'SortBoardByDates:board/table_tasks');
// make compatible with PLUGIN DelegateTask
if (file_exists('plugins/DelegateTask')){
$this->template->setTemplateOverride('board/table_column', 'SortBoardByDates:board/table_column_with_delegate_task');
} else {
$this->template->setTemplateOverride('board/table_column', 'SortBoardByDates:board/table_column_vanilla');
}
// Template HOOK-attachments ...
$this->template->hook->attach('template:project:dropdown', 'SortBoardByDates:board/dropdown');
$this->template->hook->attach('template:project:sidebar', 'SortBoardByDates:board/sidebar');
}
public function onStartup() {
// load Translation
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__ . '/Locale');
}
public function getPluginName()
{
return 'Sort_Board_By_Dates';
}
public function getPluginDescription()
{
return t('Allows boards to be sorted by different dates(Date due, started, created, modified, moved, closed) or in kanboard default-mode');
}
public function getPluginAuthor()
{
return 'Manfred Hoffmann';
}
public function getPluginVersion()
{
return '0.8.2';
}
public function getPluginHomepage()
{
return 'https://github.com/manne65-hd/kanboard-SortBoardByDates';
}
public function getCompatibleVersion()
{
return '>=1.2.18';
}
}