From 00ea6e1ddd446c61c6ccd956989b4b9a1cd60119 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Tue, 22 Feb 2011 00:12:17 +0000 Subject: Refs #2950: Cleanup of plugin-related view structure git-svn-id: http://code.elgg.org/elgg/trunk@8394 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/core/settings/tools.php | 18 ++++++++----- views/default/core/settings/tools/plugin.php | 39 ---------------------------- 2 files changed, 11 insertions(+), 46 deletions(-) delete mode 100644 views/default/core/settings/tools/plugin.php (limited to 'views/default/core/settings') diff --git a/views/default/core/settings/tools.php b/views/default/core/settings/tools.php index 73af8d738..3836b7ef1 100644 --- a/views/default/core/settings/tools.php +++ b/views/default/core/settings/tools.php @@ -9,9 +9,10 @@ */ // Description of what's going on -echo "
" - . elgg_view('output/longtext', array('value' => elgg_echo("usersettings:plugins:description"))) - . "
"; +echo elgg_view('output/longtext', array( + 'value' => elgg_echo("usersettings:plugins:description"), + 'class' => 'user-settings mtm', +)); $limit = get_input('limit', 10); $offset = get_input('offset', 0); @@ -20,10 +21,13 @@ $offset = get_input('offset', 0); $installed_plugins = $vars['installed_plugins']; $count = count($installed_plugins); -// Display list of plugins -$n = 0; + +// Display all plugins' usersettings forms foreach ($installed_plugins as $plugin) { - if ($plugin->isActive()) { - echo elgg_view("core/settings/tools/plugin", array('plugin' => $plugin)); + $plugin_id = $plugin->getID(); + if ($plugin->isActive() && elgg_view_exists("usersettings/$plugin_id/edit")) { + $title = $plugin->manifest->getName(); + $body = elgg_view_form('plugins/usersettings/save', array(), array('entity' => $plugin)); + echo elgg_view_module('info', $title, $body); } } \ No newline at end of file diff --git a/views/default/core/settings/tools/plugin.php b/views/default/core/settings/tools/plugin.php deleted file mode 100644 index 88d366a8a..000000000 --- a/views/default/core/settings/tools/plugin.php +++ /dev/null @@ -1,39 +0,0 @@ -getID(); -$user_guid = $vars['user_guid']; - -if (!$user_guid) { - $user_guid = elgg_get_logged_in_user_guid(); -} - -if (elgg_view("usersettings/$plugin_id/edit")) { -?> - -
-
-

manifest->getName(); ?>

-
-
-
- $plugin, - 'entity' => elgg_get_all_plugin_user_settings($plugin_id, $user_guid), - 'type' => 'user' - )); - ?> -
-
-
-