Commit 012caf86 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Show user's communities in view user when logged in user is admin

parent 07e647d4
......@@ -105,7 +105,7 @@ input.submit, input.submitcancel, input.cancelbackcreate, input.button, button {
height: 24px;
margin: 5px 2px 0 0;
padding: 0 5px;
color: #eef7d4;
color: #eef7d4;
font-size: 11px;
font-weight: bold;
border: 1px solid #696;
......
......@@ -30,6 +30,17 @@
{/foreach}
</ul></td></tr></tbody></table>
{/if}
{if $USERCOMMUNITIES}
<table id="userview_communities"><thead><tr><th colspan=2>
{str section=mahara tag=communities}
</td></tr></thead>
<tbody>
{foreach from=$USERCOMMUNITIES item=item}
<tr><td><a href="{$WWWROOT}contacts/communities/view.php?id={$item->id}">{$item->name}</a></td><td>{$item->type}</td></tr>
{/foreach}
</tbody></table>
{/if}
<br>
{$INVITEFORM}
{$ADDFORM}
......
......@@ -295,6 +295,9 @@ $smarty->assign('INLINEJAVASCRIPT', $inlinejs);
$smarty->assign('NAME',$name);
$smarty->assign('USERID', $userid);
$smarty->assign('USERFIELDS',$userfields);
if ($USER->get('admin')) {
$smarty->assign('USERCOMMUNITIES',$userassoccommunities);
}
$smarty->assign('VIEWS',$views);
$smarty->display('user/view.tpl');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment