added fields created/modified to the display of the single account info as part of the account status.

added accountstatus/created/modified to the display of the account list
This commit is contained in:
Klaus Leithoff 2008-04-10 09:08:51 +00:00
parent 3b874ad66f
commit 735fe90547
2 changed files with 20 additions and 1 deletions

View File

@ -358,7 +358,7 @@
}
$account_info = $GLOBALS['egw']->accounts->search($search_param);
$total = $GLOBALS['egw']->accounts->total;
$link_data = array(
'menuaction' => 'admin.uiaccounts.list_users',
'group_id' => $_REQUEST['group_id'],
@ -377,6 +377,7 @@
'lang_lastname' => $this->nextmatchs->show_sort_order($sort,'account_lastname',$order,'/index.php',lang('last name'),$link_data),
'lang_firstname' => $this->nextmatchs->show_sort_order($sort,'account_firstname',$order,'/index.php',lang('first name'),$link_data),
'lang_email' => $this->nextmatchs->show_sort_order($sort,'account_email',$order,'/index.php',lang('email'),$link_data),
'lang_account_active' => lang('Account active')."<br>".lang('Created')."<br>".lang('Modified'),
'lang_edit' => lang('edit'),
'lang_delete' => lang('delete'),
'lang_view' => lang('view'),
@ -446,6 +447,19 @@
foreach($account_info as $account)
{
$p->set_var('class',$this->nextmatchs->alternate_row_color('',True));
if ($account['account_status']=='A')
{
$account['account_status'] = lang('Enabled');
}
else
{
$account['account_status'] = '<font color="red">' . lang('Disabled') . '</font>';
}
if (isset($account['account_created']))
$account['account_status'].= '<br>'.$GLOBALS['egw']->common->show_date($account['accoount_created'],$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']);
if (isset($account['account_modified']))
$account['account_status'].= '<br>'.$GLOBALS['egw']->common->show_date($account['account_modified'],$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']);
$p->set_var($account);
@ -981,6 +995,9 @@
{
$var['account_status'] = '<b>' . lang('Disabled') . '</b>';
}
if (isset($userData['account_created'])) $var['account_status'].= '<br>'.lang('Created').': '.$GLOBALS['egw']->common->show_date($userData['account_created']);
if (isset($userData['account_modified'])) $var['account_status'].= '<br>'.lang('Modified').': '.$GLOBALS['egw']->common->show_date($userData['account_modified']);
// Last login time
if ($userData['lastlogin'])

View File

@ -57,6 +57,7 @@
<td width="20%">{lang_lastname}</td>
<td width="20%">{lang_firstname}</td>
<td>{lang_email}</td>
<td>{lang_account_active}</td>
<td class="narrow_column">{lang_edit}</td>
<td class="narrow_column">{lang_delete}</td>
<td class="narrow_column">{lang_view}</td>
@ -68,6 +69,7 @@
<td>{account_lastname}</td>
<td>{account_firstname}</td>
<td>{account_email}</td>
<td>{account_status}</td>
<td>{row_edit}</td>
<td>{row_delete}</td>
<td>{row_view}</td>