summaryrefslogtreecommitdiff
path: root/lib/plugins/extension/helper/gui.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-08-04 20:08:30 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-08-04 20:08:30 +0200
commit5d7f3164ea4199d7cf1215a1a8a5785218c9e149 (patch)
tree729133c18692c3892909670b7517b56dfa6d21c9 /lib/plugins/extension/helper/gui.php
parentd7410643d8e3db12a76845370d8eee2508fa6115 (diff)
downloadrpg-5d7f3164ea4199d7cf1215a1a8a5785218c9e149.tar.gz
rpg-5d7f3164ea4199d7cf1215a1a8a5785218c9e149.tar.bz2
moved display stuff to gui class, added template list
Diffstat (limited to 'lib/plugins/extension/helper/gui.php')
-rw-r--r--lib/plugins/extension/helper/gui.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php
index eba5fbc7f..41afc2069 100644
--- a/lib/plugins/extension/helper/gui.php
+++ b/lib/plugins/extension/helper/gui.php
@@ -16,6 +16,43 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin {
protected $tabs = array('plugins', 'templates', 'search');
+
+ public function pluginList(){
+ /* @var Doku_Plugin_Controller $plugin_controller */
+ global $plugin_controller;
+
+ $pluginlist = $plugin_controller->getList('', true);
+ /* @var helper_plugin_extension_extension $extension */
+ $extension = $this->loadHelper('extension_extension');
+ /* @var helper_plugin_extension_list $list */
+ $list = $this->loadHelper('extension_list');
+ $list->start_form();
+ foreach ($pluginlist as $name) {
+ $extension->setExtension($name, false);
+ $list->add_row($extension, $name == $this->infoFor);
+ }
+ $list->end_form();
+ $list->render();
+ }
+
+ public function templateList(){
+ // FIXME do we have a real way?
+ $tpllist = glob(DOKU_INC.'lib/tpl/*', GLOB_ONLYDIR);
+ $tpllist = array_map('basename', $tpllist);
+
+ /* @var helper_plugin_extension_extension $extension */
+ $extension = $this->loadHelper('extension_extension');
+ /* @var helper_plugin_extension_list $list */
+ $list = $this->loadHelper('extension_list');
+ $list->start_form();
+ foreach ($tpllist as $name) {
+ $extension->setExtension($name, true);
+ $list->add_row($extension, $name == $this->infoFor);
+ }
+ $list->end_form();
+ $list->render();
+ }
+
/**
* Print the tab navigation
*