aboutsummaryrefslogtreecommitdiff
path: root/views/default/core
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 00:12:17 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 00:12:17 +0000
commit00ea6e1ddd446c61c6ccd956989b4b9a1cd60119 (patch)
tree4d3d546d88326fd976a8f75c0b4d4dac9b54ef1b /views/default/core
parent8439fcf13d794780c89925896b8aaca521c14e30 (diff)
downloadelgg-00ea6e1ddd446c61c6ccd956989b4b9a1cd60119.tar.gz
elgg-00ea6e1ddd446c61c6ccd956989b4b9a1cd60119.tar.bz2
Refs #2950: Cleanup of plugin-related view structure
git-svn-id: http://code.elgg.org/elgg/trunk@8394 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/core')
-rw-r--r--views/default/core/settings/tools.php18
-rw-r--r--views/default/core/settings/tools/plugin.php39
2 files changed, 11 insertions, 46 deletions
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 "<div class='user-settings margin-top'>"
- . elgg_view('output/longtext', array('value' => elgg_echo("usersettings:plugins:description")))
- . "</div>";
+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 @@
-<?php
-/**
- * This displays a plugin's user settings.
- *
- * @uses ElggPlugin $vars['plugin'] The plugin to show settings for.
- *
- * @package Elgg.Core
- * @subpackage Plugins.Settings
- */
-
-
-$plugin = $vars['plugin'];
-$plugin_id = $plugin->getID();
-$user_guid = $vars['user_guid'];
-
-if (!$user_guid) {
- $user_guid = elgg_get_logged_in_user_guid();
-}
-
-if (elgg_view("usersettings/$plugin_id/edit")) {
-?>
-
-<div class="elgg-module elgg-module-info">
- <div class="elgg-head">
- <h3><?php echo $plugin->manifest->getName(); ?></h3>
- </div>
- <div class="elgg-body">
- <div id="<?php echo $plugin_id; ?>_settings">
- <?php echo elgg_view("object/plugin", array(
- 'plugin' => $plugin,
- 'entity' => elgg_get_all_plugin_user_settings($plugin_id, $user_guid),
- 'type' => 'user'
- ));
- ?>
- </div>
- </div>
-</div>
-<?php
-} \ No newline at end of file