aboutsummaryrefslogtreecommitdiff
path: root/views/default/usersettings/plugins_opt/plugin.php
blob: 51948b41f48e94a1f04ed264a7479b74961348a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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 Curverider Ltd
	 * @copyright Curverider Ltd 2008
	 * @link http://elgg.org/
	 */


	$plugin = $vars['plugin'];
	$details = $vars['details'];
	
	$active = $details['active'];
	$manifest = $details['manifest'];
	
	$user_guid = $details['user_guid'];
	if ($user_guid) $user_guid = $_SESSION['user']->guid;
?>
<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: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>