summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-18 22:07:49 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-18 22:07:49 -0400
commit49f43090b214c4346a114922696b7d9d96d2c02e (patch)
tree418c2f2322cf59dc0a9bf0c65fe0d2c1030af6c3 /app/Controller
parentbfd59d9e544028a1ea041806fd60e112f3a90167 (diff)
Added plugin controller (WIP)
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Config.php13
-rw-r--r--app/Controller/PluginController.php38
2 files changed, 38 insertions, 13 deletions
diff --git a/app/Controller/Config.php b/app/Controller/Config.php
index deafd05b..abf6565c 100644
--- a/app/Controller/Config.php
+++ b/app/Controller/Config.php
@@ -65,19 +65,6 @@ class Config extends BaseController
}
/**
- * Display the plugin page
- *
- * @access public
- */
- public function plugins()
- {
- $this->response->html($this->helper->layout->config('config/plugins', array(
- 'plugins' => $this->pluginLoader->plugins,
- 'title' => t('Settings').' &gt; '.t('Plugins'),
- )));
- }
-
- /**
* Display the application settings page
*
* @access public
diff --git a/app/Controller/PluginController.php b/app/Controller/PluginController.php
new file mode 100644
index 00000000..8d5628f1
--- /dev/null
+++ b/app/Controller/PluginController.php
@@ -0,0 +1,38 @@
+<?php
+
+namespace Kanboard\Controller;
+
+/**
+ * Class PluginController
+ *
+ * @package Kanboard\Controller
+ * @author Frederic Guillot
+ */
+class PluginController extends BaseController
+{
+ /**
+ * Display the plugin page
+ *
+ * @access public
+ */
+ public function show()
+ {
+ $this->response->html($this->helper->layout->plugin('plugin/show', array(
+ 'plugins' => $this->pluginLoader->plugins,
+ 'title' => t('Installed Plugins'),
+ )));
+ }
+
+ /**
+ * Display list of available plugins
+ */
+ public function directory()
+ {
+ $plugins = $this->httpClient->getJson(PLUGIN_API_URL);
+
+ $this->response->html($this->helper->layout->plugin('plugin/directory', array(
+ 'plugins' => $plugins,
+ 'title' => t('Plugin Directory'),
+ )));
+ }
+}