enable roles in main addressbook list view

This commit is contained in:
Klaus Leithoff 2008-05-07 14:13:34 +00:00
parent eef92b5785
commit 641817662b
2 changed files with 7 additions and 3 deletions

View File

@ -986,7 +986,7 @@ class uicontacts extends bocontacts
$order = $query['order']; $order = $query['order'];
$readonlys = array(); $readonlys = array();
$photos = $homeaddress = false; $photos = $homeaddress = $roles = false;
foreach($rows as $n => $val) foreach($rows as $n => $val)
{ {
$row =& $rows[$n]; $row =& $rows[$n];
@ -1056,7 +1056,7 @@ class uicontacts extends bocontacts
$readonlys["edit[$row[id]]"] = !$this->check_perms(EGW_ACL_EDIT,$row); $readonlys["edit[$row[id]]"] = !$this->check_perms(EGW_ACL_EDIT,$row);
if ($row['photo']) $photos = true; if ($row['photo']) $photos = true;
if ($row['role']) $roles = true;
if (isset($customfields[$row['id']])) if (isset($customfields[$row['id']]))
{ {
foreach($this->customfields as $name => $data) foreach($this->customfields as $name => $data)
@ -1101,6 +1101,8 @@ class uicontacts extends bocontacts
if (!$photos) $rows['no_photo'] = true; if (!$photos) $rows['no_photo'] = true;
// disable homeaddress column, if we have no homeaddress(es) // disable homeaddress column, if we have no homeaddress(es)
if (!$homeaddress) $rows['no_home'] = true; if (!$homeaddress) $rows['no_home'] = true;
// disable roles column
if (!$roles) $rows['no_role'] = true;
} }
// disable customfields column, if we have no customefield(s) // disable customfields column, if we have no customefield(s)
if (!$this->customfields/* || !$this->prefs['no_auto_hide'] && !$customfields*/) $rows['no_customfields'] = true; if (!$this->customfields/* || !$this->prefs['no_auto_hide'] && !$customfields*/) $rows['no_customfields'] = true;

File diff suppressed because one or more lines are too long