From d15841e3ebfa4ecdc7f17965b3ff1ce973a32dbb Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 10 Dec 2018 09:50:34 -0700 Subject: [PATCH] * Addressbook - Add site configuration to disable Last/Next Event column --- addressbook/inc/class.addressbook_ui.inc.php | 13 +++++++++++-- addressbook/lang/egw_en.lang | 1 + addressbook/templates/default/config.xet | 10 ++++++++++ addressbook/templates/default/index.xet | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index c86fc7aaee..f6e2c6179e 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -1715,7 +1715,7 @@ class addressbook_ui extends addressbook_bo if (!$id_only && $rows) { $show_custom_fields = (in_array('customfields',$columselection)) && $this->customfields; - $show_calendar = in_array('calendar_calendar',$columselection); + $show_calendar = !$this->config['disable_event_column'] && in_array('calendar_calendar',$columselection); $show_distributionlist = in_array('distrib_lists',$columselection) || count($available_distib_lists); if ($show_calendar || $show_custom_fields || $show_distributionlist) { @@ -1866,7 +1866,16 @@ class addressbook_ui extends addressbook_bo $rows['no_distribution_list'] = (bool)$query['filter2']; // disable customfields column, if we have no customefield(s) - if (!$this->customfields) $rows['no_customfields'] = true; + if (!$this->customfields) + { + $rows['no_customfields'] = true; + } + + // Disable next/last date if so configured + if($this->config['disable_event_column']) + { + $rows['no_event_column'] = true; + } $rows['order'] = $order; $rows['call_popup'] = $this->config['call_popup']; diff --git a/addressbook/lang/egw_en.lang b/addressbook/lang/egw_en.lang index d2da19f636..093e25b8bf 100644 --- a/addressbook/lang/egw_en.lang +++ b/addressbook/lang/egw_en.lang @@ -183,6 +183,7 @@ deletes the photo addressbook en Deletes the photo department common en Department departments addressbook en Departments directory with documents to insert contacts addressbook en Directory with documents to insert contacts +disable Last/Next Event column addressbook en Disable Last/Next Event column display contact addressbook en Display contact displays a remider for birthdays on the startpage (page you get when you enter egroupware or click on the homepage icon). addressbook en Display birthdays on the Home page. distribution list deleted addressbook en Distribution list deleted diff --git a/addressbook/templates/default/config.xet b/addressbook/templates/default/config.xet index c7166d9ec2..e818620d67 100644 --- a/addressbook/templates/default/config.xet +++ b/addressbook/templates/default/config.xet @@ -27,6 +27,16 @@ + + + + + + + diff --git a/addressbook/templates/default/index.xet b/addressbook/templates/default/index.xet index 07fd513652..6a91bc81ec 100644 --- a/addressbook/templates/default/index.xet +++ b/addressbook/templates/default/index.xet @@ -21,7 +21,7 @@ - +