Commit b4f2a6e4 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Show admin institutions on admin notifications page

parent 158f9132
......@@ -71,6 +71,15 @@ foreach ($admins as $u) {
}
}
$userinstitutions = get_records_sql_array('
SELECT u.usr, i.name, i.displayname
FROM {institution} i INNER JOIN {usr_institution} u ON i.name = u.institution
WHERE u.usr IN (' . join(',', array_keys($users)) . ')', null);
if ($userinstitutions) {
foreach ($userinstitutions as $ui) {
$users[$ui->usr]['user']->institutions[] = $ui->displayname;
}
}
$smarty = smarty();
$smarty->assign('users', $users);
......
......@@ -5,15 +5,21 @@
<table>
<tr>
<th>&nbsp;</th>
<th>{str tag='profileicon'}</th>
<th></th>
<th>{str tag='institution'}</th>
{foreach from=$types item='type'}
<th>{$type}</th>
{/foreach}
</tr>
{foreach from=$users item='user' key='userid'}
<tr>
<td>{display_name user=$user.user}</td>
<td><img src="{$WWWROOT}thumb.php?type=profileicon&size=40x40&id={$userid}" alt="profile icon"/></td>
<td>{display_name user=$user.user}</td>
<td>
{foreach from=$user.user->institutions item=i}
<div>{$i}</div>
{/foreach}
</td>
{foreach from=$types key='type' item='name'}
<td>{if $user.methods.$type}{$user.methods.$type}{else}{str tag='none'}{/if}</td>
{/foreach}
......
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