aboutsummaryrefslogtreecommitdiff
path: root/mod/profile
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-01 18:24:42 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-01 18:24:42 +0000
commit14817d46e6626501027e8ccb85bab28814c295db (patch)
tree2744f3f9d580312e4bf8284892d6afb4e91081e3 /mod/profile
parent5cc9adf44b072fc27da0ae0abe3f227d973d28b7 (diff)
downloadelgg-14817d46e6626501027e8ccb85bab28814c295db.tar.gz
elgg-14817d46e6626501027e8ccb85bab28814c295db.tar.bz2
Admin menus to the contextual menu
git-svn-id: https://code.elgg.org/elgg/trunk@1258 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile')
-rw-r--r--mod/profile/views/default/profile/menu/actions.php19
-rw-r--r--mod/profile/views/default/profile/userdetails.php15
2 files changed, 18 insertions, 16 deletions
diff --git a/mod/profile/views/default/profile/menu/actions.php b/mod/profile/views/default/profile/menu/actions.php
index f69ad1316..c2b4112d4 100644
--- a/mod/profile/views/default/profile/menu/actions.php
+++ b/mod/profile/views/default/profile/menu/actions.php
@@ -21,5 +21,22 @@
}
}
}
-
+
+ if (isadminloggedin()){
+ if ($_SESSION['user']->getGUID() != $vars['entity']->guid){
+?>
+
+ <p class="user_menu_banuser"><a href="<?php echo $vars['url']; ?>actions/admin/user/ban?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("ban"); ?></a></p>
+
+ <p class="user_menu_delete"><a href="<?php echo $vars['url']; ?>actions/admin/user/delete?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("delete"); ?></a></p>
+
+ <p class="user_menu_resetpassword"><a href="<?php echo $vars['url']; ?>actions/admin/user/resetpassword?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("resetpassword"); ?></a></p>
+
+ <?php if (!$vars['entity']->admin) { ?>
+ <p class="user_menu_makeadmin"><a href="<?php echo $vars['url']; ?>actions/admin/user/makeadmin?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("makeadmin"); ?></a></p>
+ <?php } ?>
+
+<?php
+ }
+ }
?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/userdetails.php b/mod/profile/views/default/profile/userdetails.php
index 160ff4abe..e0b6d676e 100644
--- a/mod/profile/views/default/profile/userdetails.php
+++ b/mod/profile/views/default/profile/userdetails.php
@@ -116,21 +116,6 @@
}
// TODO: Add admin console options here
- if (isadminloggedin()){
- if ($_SESSION['id']!=$vars['entity']->guid){
-?>
-
- &nbsp; <a href="<?php echo $vars['url']; ?>actions/admin/user/ban?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("ban"); ?></a>
-
- &nbsp; <a href="<?php echo $vars['url']; ?>actions/admin/user/delete?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("delete"); ?></a>
-
- &nbsp; <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) { ?>&nbsp; <a href="<?php echo $vars['url']; ?>actions/admin/user/makeadmin?guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("makeadmin"); ?></a> <?php } ?>
-
-<?php
- }
- }
?>
</p>
</div><!-- /#profile_info_wide -->