aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile/views')
-rw-r--r--mod/profile/views/default/profile/menu/adminlinks.php3
-rw-r--r--mod/profile/views/default/profile/menu/adminwrapper.php11
2 files changed, 12 insertions, 2 deletions
diff --git a/mod/profile/views/default/profile/menu/adminlinks.php b/mod/profile/views/default/profile/menu/adminlinks.php
index f59059db8..c8f825949 100644
--- a/mod/profile/views/default/profile/menu/adminlinks.php
+++ b/mod/profile/views/default/profile/menu/adminlinks.php
@@ -15,7 +15,7 @@
if (isadminloggedin()){
if ($_SESSION['id']!=$vars['entity']->guid){
?>
- <p class="user_menu_admin"><?php
+ <?php
if ($vars['entity']->isEnabled()) {
?><a href="<?php echo $vars['url']; ?>actions/admin/user/ban?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("ban"); ?></a><?php
} else {
@@ -24,7 +24,6 @@
?><a href="<?php echo $vars['url']; ?>actions/admin/user/delete?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("delete"); ?></a>
<a href="<?php echo $vars['url']; ?>actions/admin/user/resetpassword?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("resetpassword"); ?></a>
<?php if (!$vars['entity']->admin) { ?><a href="<?php echo $vars['url']; ?>actions/admin/user/makeadmin?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("makeadmin"); ?></a> <?php } ?>
- </p>
<?php
}
diff --git a/mod/profile/views/default/profile/menu/adminwrapper.php b/mod/profile/views/default/profile/menu/adminwrapper.php
new file mode 100644
index 000000000..dbbf4b038
--- /dev/null
+++ b/mod/profile/views/default/profile/menu/adminwrapper.php
@@ -0,0 +1,11 @@
+<?php
+
+ $adminlinks = elgg_view('profile/menu/adminlinks',$vars);
+
+ if (!empty($adminlinks)) {
+
+ echo "<p class=\"user_menu_admin\">{$adminlinks}</p>";
+
+ }
+
+?> \ No newline at end of file