Addressbook - add additional config option to only show Last/Next date for contacts

This commit is contained in:
nathangray 2018-12-17 10:04:06 -07:00
parent 3746fdca88
commit 26cdffaee4
4 changed files with 8 additions and 2 deletions

View File

@ -1764,7 +1764,7 @@ window.egw_LAB.wait(function() {
if (!$id_only && $rows)
{
$show_custom_fields = (in_array('customfields',$columselection)) && $this->customfields;
$show_calendar = !$this->config['disable_event_column'] && in_array('calendar_calendar',$columselection);
$show_calendar = $this->config['disable_event_column'] != 'True' && in_array('calendar_calendar',$columselection);
$show_distributionlist = in_array('distrib_lists',$columselection) || count($available_distib_lists);
if ($show_calendar || $show_custom_fields || $show_distributionlist)
{
@ -1923,7 +1923,7 @@ window.egw_LAB.wait(function() {
}
// Disable next/last date if so configured
if($this->config['disable_event_column'])
if($this->config['disable_event_column'] == 'True')
{
$rows['no_event_column'] = true;
}

View File

@ -66,6 +66,7 @@ all contacts addressbook en All contacts
all in one field addressbook en All in one field
all types addressbook en All types
allow addressbook en Allow
allow for contacts only addressbook en Allow for contacts only
allow members of following groups to edit contact-data of accounts addressbook en Allow members of following groups to edit contact-data of accounts
allow users to maintain their own account-data admin en Allow users to maintain their own account data
alt. csv import addressbook en Alt. CSV Import

View File

@ -34,6 +34,7 @@
<description value="Disable Last/Next Event column"/>
<select id="newsettings[disable_event_column]">
<option value="">Allow</option>
<option value="contacts">Allow for contacts only</option>
<option value="True">Disabled</option>
</select>
</row>

View File

@ -1675,6 +1675,10 @@ class Contacts extends Contacts\Storage
foreach($uids as $id => $uid)
{
$type = is_numeric($uid[0]) ? 'u' : $uid[0];
if($GLOBALS['egw_info']['server']['disable_event_column'] == 'contacts' && $type == 'u')
{
continue;
}
$split_uids[$type][$id] = str_replace($type, '', $uid);
}