Add config option to show age for birthdays

This commit is contained in:
nathangray 2017-01-25 10:52:47 -07:00
parent 3100e3407c
commit 94f678548b
2 changed files with 4 additions and 1 deletions

View File

@ -1923,7 +1923,9 @@ class calendar_bo
'month' => $m,
'occurence' => 0,
'name' => lang('Birthday').' '.($pers['n_given'] ? $pers['n_given'] : $pers['n_prefix']).' '.$pers['n_middle'].' '.
$pers['n_family'].($y && !$GLOBALS['egw_info']['server']['hide_birthdays'] ? ' ('.$y.')' : ''),
$pers['n_family'].
($GLOBALS['egw_info']['server']['hide_birthdays'] == 'age' ? ' '.($year - $y): '').
($y && in_array($GLOBALS['egw_info']['server']['hide_birthdays'], array('','age')) ? ' ('.$y.')' : ''),
'birthyear' => $y, // this can be used to identify birthdays from holidays
);
}

View File

@ -91,6 +91,7 @@
<select id="newsettings[hide_birthdays]">
<option value="">Yes</option>
<option value="dateonly">Show only the date, not the year</option>
<option value="age">Show year and age</option>
<option value="yes">No</option>
</select>
</row>