aboutsummaryrefslogtreecommitdiff
path: root/views/default/admin/plugins_opt/plugin.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-20 15:11:42 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-20 15:11:42 +0000
commit44fedcf732370708395227b3fd89cb336389ec8e (patch)
tree8b9debc278f1770f52a79a42c595abdcd02e7513 /views/default/admin/plugins_opt/plugin.php
parent2953dea01d0e6e01688b18627c384fddb637e8e1 (diff)
downloadelgg-44fedcf732370708395227b3fd89cb336389ec8e.tar.gz
elgg-44fedcf732370708395227b3fd89cb336389ec8e.tar.bz2
Closes #20: Plugin management and config panel
http://trac.elgg.org/elgg/ticket/20 git-svn-id: https://code.elgg.org/elgg/trunk@1027 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/admin/plugins_opt/plugin.php')
-rw-r--r--views/default/admin/plugins_opt/plugin.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/views/default/admin/plugins_opt/plugin.php b/views/default/admin/plugins_opt/plugin.php
new file mode 100644
index 000000000..58bde4d67
--- /dev/null
+++ b/views/default/admin/plugins_opt/plugin.php
@@ -0,0 +1,46 @@
+<?php
+ /**
+ * Elgg plugin manifest class
+ *
+ * This file renders a plugin for the admin screen, including active/deactive, manifest details & display plugin
+ * settings.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+
+ $plugin = $vars['plugin'];
+ $details = $vars['details'];
+
+ $active = $details['active'];
+ $manifest = $details['manifest'];
+?>
+<div id="plugin_details" class="<?php if ($active) echo "active"; else "not-active" ?>">
+ <div><h2><?php echo $plugin; ?></h2></div>
+
+ <?php if ($manifest) { ?>
+ <div><?php echo $manifest['description'] ?></div>
+ <div><?php echo elgg_echo('admin:plugins:label:author') . ": ". $manifest['author'] ?></div>
+ <div><?php echo elgg_echo('admin:plugins:label:copyright') . ": ". $manifest['copyright'] ?></div>
+ <div><?php echo elgg_echo('admin:plugins:label:website') . ": "; ?><a href="<?php echo $manifest['website']; ?>"><?php echo $manifest['website']; ?></a></div>
+ <?php } ?>
+
+ <?php if ($plugin_object = find_plugin_settings($plugin)) { ?>
+ <div id="<?php echo $plugin; ?>_settings">
+ <?php echo elgg_view("object/plugin", array('plugin_object' => $plugin_object)) ?>
+ </div>
+ <?php } ?>
+
+ <div>
+ <?php if ($active) { ?>
+ <a href="<?php echo $vars['url']; ?>actions/admin/plugins/disable?plugin=<?php echo $plugin; ?>"><?php echo elgg_echo("disable"); ?></a>
+ <?php } else { ?>
+ <a href="<?php echo $vars['url']; ?>actions/admin/plugins/enable?plugin=<?php echo $plugin; ?>"><?php echo elgg_echo("enable"); ?></a>
+ <?php } ?>
+ </div>
+</div> \ No newline at end of file