-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPlugin.php
More file actions
60 lines (47 loc) · 1.61 KB
/
Plugin.php
File metadata and controls
60 lines (47 loc) · 1.61 KB
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
<?php
namespace Kanboard\Plugin\TableView;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;
class Plugin extends Base
{
public function initialize()
{
if(file_exists("plugins/TableView/config.php"))
{
global $configs;
require_once('plugins/TableView/config.php');
$this->helper->register('tableDataHelper', '\Kanboard\Plugin\TableView\Helper\TableDataHelper');
$this->template->hook->attach('template:project-header:view-switcher', 'TableView:project_header/views');
$this->hook->on('template:layout:css', array('template' => 'plugins/TableView/Asset/main.css'));
$this->hook->on('template:layout:js', array('template' => 'plugins/TableView/Asset/main.js'));
if (!isset($configs["HIDE_LIST_VIEW"]) || $configs["HIDE_LIST_VIEW"] === true)
{
$this->hook->on('template:layout:js', array('template' => 'plugins/TableView/Asset/hide-list.js'));
}
}
}
public function onStartup()
{
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
}
public function getPluginName()
{
return 'TableView';
}
public function getPluginDescription()
{
return t('A Kanboard plugin that provides a table view of tasks in your project.');
}
public function getPluginAuthor()
{
return 'Greyaz';
}
public function getPluginVersion()
{
return '0.2.0';
}
public function getPluginHomepage()
{
return 'https://github.com/greyaz/TableView';
}
}