From 27a20b7864775c6324f75fe71418d4fb457c3d2e Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 6 Mar 2013 00:04:08 +0000 Subject: [PATCH] Automagic favorites in sidebox (et2) --- addressbook/inc/class.addressbook_hooks.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index fbb475e722..4de6be406d 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -28,6 +28,20 @@ class addressbook_hooks if ($location == 'sidebox_menu') { + // Magic etemplate2 favorites menu (from nextmatch widget) + $et = new ReflectionClass('etemplate'); + $is_et2 = ($et->isSubclassOf(new ReflectionClass('etemplate_widget'))); + if($is_et2) + { + display_sidebox($appname,lang('Favorites'),array( + array( + 'no_lang' => true, + 'text'=>'', + 'link'=>false, + 'icon' => false + ) + )); + } $file = array( 'Add' => "javascript:egw_openWindowCentered2('". egw::link('/index.php',array('menuaction' => 'addressbook.addressbook_ui.edit'),false).