From 40ba4bad22f5ab4c3d80c72db891de75d06e85aa Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 29 Aug 2013 08:25:46 +0000 Subject: [PATCH] Add favorite onto side-box menu for timesheet app --- timesheet/inc/class.timesheet_hooks.inc.php | 9 +++++++++ timesheet/inc/class.timesheet_ui.inc.php | 1 + 2 files changed, 10 insertions(+) diff --git a/timesheet/inc/class.timesheet_hooks.inc.php b/timesheet/inc/class.timesheet_hooks.inc.php index 9e6717881e..948534b50d 100644 --- a/timesheet/inc/class.timesheet_hooks.inc.php +++ b/timesheet/inc/class.timesheet_hooks.inc.php @@ -103,6 +103,15 @@ class timesheet_hooks if ($location == 'sidebox_menu') { + // Magic etemplate2 favorites menu (from nextmatch widget) + display_sidebox($appname,lang('Favorites'),array( + array( + 'no_lang' => true, + 'text'=> etemplate_widget_nextmatch::favorite_list($appname,'timesheet.timesheet_ui.get_rows'), + 'link'=>false, + 'icon' => false + ) + )); $file = array( ); display_sidebox($appname,$GLOBALS['egw_info']['apps'][$appname]['title'].' '.lang('Menu'),$file); diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 134da4034d..752d2f338b 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -894,6 +894,7 @@ class timesheet_ui extends timesheet_bo $sel_options['ts_status'][self::DELETED_STATUS] = 'Deleted'; } $content['nm']['no_status'] = count($sel_options['ts_status']) <= 1; // 1 because of 'No status' + $content['nm']['favorites'] = true; //Enable favorite if ($this->pm_integration != 'full') {