mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 05:29:13 +01:00
Fixed display of birthdays from addressbook on home page:
- dont display year, if calendar config forbidds to display of birthyear - dont display them at all, if they are forbidden in calendar
This commit is contained in:
parent
ea13efc0af
commit
bacf86c1a8
@ -118,6 +118,8 @@ class addressbook_hooks
|
|||||||
'xmlrpc' => True,
|
'xmlrpc' => True,
|
||||||
'admin' => False,
|
'admin' => False,
|
||||||
);
|
);
|
||||||
|
if ($GLOBALS['egw_info']['server']['hide_birthdays'] != 'yes')
|
||||||
|
{
|
||||||
$settings['mainscreen_showbirthdays'] = array(
|
$settings['mainscreen_showbirthdays'] = array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'label' => 'Show birthday reminders on main screen',
|
'label' => 'Show birthday reminders on main screen',
|
||||||
@ -133,6 +135,7 @@ class addressbook_hooks
|
|||||||
'xmlrpc' => True,
|
'xmlrpc' => True,
|
||||||
'admin' => False,
|
'admin' => False,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
$settings['no_auto_hide'] = array(
|
$settings['no_auto_hide'] = array(
|
||||||
'type' => 'check',
|
'type' => 'check',
|
||||||
'label' => 'Don\'t hide empty columns',
|
'label' => 'Don\'t hide empty columns',
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['addressbook'] &&
|
if ($GLOBALS['egw_info']['user']['apps']['addressbook'] &&
|
||||||
($days = $GLOBALS['egw_info']['user']['preferences']['addressbook']['mainscreen_showbirthdays']))
|
($days = $GLOBALS['egw_info']['user']['preferences']['addressbook']['mainscreen_showbirthdays']) &&
|
||||||
|
$GLOBALS['egw_info']['server']['hide_birthdays'] != 'yes')
|
||||||
{
|
{
|
||||||
echo "\n<!-- Birthday info -->\n";
|
echo "\n<!-- Birthday info -->\n";
|
||||||
|
|
||||||
@ -74,6 +75,7 @@ if ($GLOBALS['egw_info']['user']['apps']['addressbook'] &&
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
list($y,$m,$d) = explode('-',$contact['bday']);
|
list($y,$m,$d) = explode('-',$contact['bday']);
|
||||||
|
if ($GLOBALS['egw_info']['server']['hide_birthdays'] == 'dateonly') $y = '';
|
||||||
$text = lang("In %1 days (%2) is %3's birthday.",$n,
|
$text = lang("In %1 days (%2) is %3's birthday.",$n,
|
||||||
$GLOBALS['egw']->common->dateformatorder($y,$m,$d,true),
|
$GLOBALS['egw']->common->dateformatorder($y,$m,$d,true),
|
||||||
$contact['n_given'].' '.$contact['n_family']);
|
$contact['n_given'].' '.$contact['n_family']);
|
||||||
|
Loading…
Reference in New Issue
Block a user