mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-10-06 18:12:22 +02:00
new account-selection for matrix-view, as patch from Matthew Galgoci
This commit is contained in:
parent
91966dd0f7
commit
d3086fe8cd
@ -2161,7 +2161,13 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Participants
|
// Participants
|
||||||
|
if (!is_object($GLOBALS['phpgw']->uiaccountsel))
|
||||||
|
{
|
||||||
|
$GLOBALS['phpgw']->uiaccountsel = CreateObject('phpgwapi.uiaccountsel');
|
||||||
|
}
|
||||||
|
|
||||||
$accounts = $GLOBALS['phpgw']->acl->get_ids_for_location('run',1,'calendar');
|
$accounts = $GLOBALS['phpgw']->acl->get_ids_for_location('run',1,'calendar');
|
||||||
|
|
||||||
$users = Array();
|
$users = Array();
|
||||||
for($i=0;$i<count($accounts);$i++)
|
for($i=0;$i<count($accounts);$i++)
|
||||||
{
|
{
|
||||||
@ -2200,19 +2206,18 @@
|
|||||||
{
|
{
|
||||||
$size = $num_users;
|
$size = $num_users;
|
||||||
}
|
}
|
||||||
$str = '';
|
$select=array();
|
||||||
@asort($users);
|
@uasort($users,'strcasecmp');
|
||||||
@reset($users);
|
foreach($users as $id => $name)
|
||||||
while ($user = each($users))
|
|
||||||
{
|
{
|
||||||
if(($GLOBALS['phpgw']->accounts->exists($user[0]) && $this->bo->check_perms(PHPGW_ACL_READ,0,$user[0])) || $GLOBALS['phpgw']->accounts->get_type($user[0]) == 'g')
|
if(!($GLOBALS['phpgw']->accounts->exists($id) && $this->bo->check_perms(PHPGW_ACL_READ,0,$id) || $GLOBALS['phpgw']->accounts->get_type($id) == 'g'))
|
||||||
{
|
{
|
||||||
$str .= ' <option value="'.$user[0].'">('.$GLOBALS['phpgw']->accounts->get_type($user[0]).') '.$user[1].'</option>'."\n";
|
unset($users[$id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$var[] = Array(
|
$var[] = Array(
|
||||||
'field' => lang('Participants'),
|
'field' => lang('Participants'),
|
||||||
'data' => "\n".' <select name="participants[]" multiple size="'.$size.'">'."\n".$str.' </select>'."\n"
|
'data' => "\n ".$GLOBALS['phpgw']->uiaccountsel->selection('participants[]','uicalendar_matrix_users',array(),'calendar+',$size,False,'','',$users)
|
||||||
);
|
);
|
||||||
|
|
||||||
for($i=0;$i<count($var);$i++)
|
for($i=0;$i<count($var);$i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user