aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views/default
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-16 14:45:44 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-16 14:45:44 +0000
commit4d4626b6ea9af4256c37c2e7047eef4f995dfdf3 (patch)
tree46f1a652deb5f9729322f6d602ed2f9a6532c26c /mod/profile/views/default
parentc7369d0f0bbe1a0e899c02ea96255da704cdf445 (diff)
downloadelgg-4d4626b6ea9af4256c37c2e7047eef4f995dfdf3.tar.gz
elgg-4d4626b6ea9af4256c37c2e7047eef4f995dfdf3.tar.bz2
Admin links are now consolidated
git-svn-id: https://code.elgg.org/elgg/trunk@1973 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/views/default')
-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