aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-17 15:46:16 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-17 15:46:16 +0000
commit7184453089f95216643ab697930b020890c65006 (patch)
tree27a64f6181a3a505e7822e0671617125a104ba02 /views
parentab1a4a3daa441fcd2e4d9b37267de3b48fae9d6f (diff)
downloadelgg-7184453089f95216643ab697930b020890c65006.tar.gz
elgg-7184453089f95216643ab697930b020890c65006.tar.bz2
Closes #335: Marcus Povey :
* Per user tools settings now present again (only displays if there are settings present AND the plugin is enabled - needs skinning accordingly) * Re-jigged the settings code to behave like a proper page handler. * Minor tweak to language git-svn-id: https://code.elgg.org/elgg/trunk@2279 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/object/plugin.php2
-rw-r--r--views/default/usersettings/plugins.php14
-rw-r--r--views/default/usersettings/plugins_opt/plugin.php18
3 files changed, 11 insertions, 23 deletions
diff --git a/views/default/object/plugin.php b/views/default/object/plugin.php
index aaa5d6681..2c70476df 100644
--- a/views/default/object/plugin.php
+++ b/views/default/object/plugin.php
@@ -14,7 +14,7 @@
$plugin = $vars['plugin'];
$prefix = $vars['prefix']; // Do we want to show admin settings (default) or user settings
- $form_body = elgg_view("{$prefix}settings/{$plugin}/edit",$vars);
+ $form_body = elgg_view("{$prefix}settings/{$plugin}/edit", $vars);
$form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin)) . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "</p>";
diff --git a/views/default/usersettings/plugins.php b/views/default/usersettings/plugins.php
index 3daf16733..321f377ce 100644
--- a/views/default/usersettings/plugins.php
+++ b/views/default/usersettings/plugins.php
@@ -16,7 +16,6 @@
$limit = get_input('limit', 10);
$offset = get_input('offset', 0);
-
// Get the installed plugins
$installed_plugins = $vars['installed_plugins'];
$count = count($installed_plugins);
@@ -25,19 +24,10 @@
$n = 0;
foreach ($installed_plugins as $plugin => $data)
{
- if (($n>=$offset) && ($n < $offset+$limit))
+ if (is_plugin_enabled($plugin))
echo elgg_view("usersettings/plugins_opt/plugin", array('plugin' => $plugin, 'details' => $data));
- $n++;
}
- // Diplay nav
- if ($count)
- {
- echo elgg_view('navigation/pagination',array(
- 'baseurl' => $_SERVER['REQUEST_URI'],
- 'offset' => $offset,
- 'count' => $count,
- ));
- }
+
?> \ No newline at end of file
diff --git a/views/default/usersettings/plugins_opt/plugin.php b/views/default/usersettings/plugins_opt/plugin.php
index 51948b41f..1c02ff97a 100644
--- a/views/default/usersettings/plugins_opt/plugin.php
+++ b/views/default/usersettings/plugins_opt/plugin.php
@@ -22,21 +22,19 @@
$user_guid = $details['user_guid'];
if ($user_guid) $user_guid = $_SESSION['user']->guid;
+
+ if (elgg_view("usersettings/{$plugin}/edit")) {
?>
-<div id="plugin_details" class="<?php if ($active) echo "active"; else "not-active" ?>">
+<div id="user_plugin_details">
<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:licence') . ": ". $manifest['licence'] ?></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 (elgg_view("usersettings/{$plugin}/edit")) { ?>
- <div id="<?php echo $plugin; ?>_settings">
- <?php echo elgg_view("object/plugin", array('plugin' => $plugin, 'entity' => find_plugin_usersettings($plugin, $user_guid), 'prefix' => 'user')) ?>
- </div>
- <?php } ?>
-</div> \ No newline at end of file
+ <div id="<?php echo $plugin; ?>_settings">
+ <?php echo elgg_view("object/plugin", array('plugin' => $plugin, 'entity' => find_plugin_usersettings($plugin, $user_guid), 'prefix' => 'user')) ?>
+ </div>
+</div>
+<?php } ?> \ No newline at end of file