Add favorite onto side-box menu for timesheet app

This commit is contained in:
Hadi Nategh 2013-08-29 08:25:46 +00:00
parent eb989ed98b
commit 40ba4bad22
2 changed files with 10 additions and 0 deletions

View File

@ -103,6 +103,15 @@ class timesheet_hooks
if ($location == 'sidebox_menu') 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( $file = array(
); );
display_sidebox($appname,$GLOBALS['egw_info']['apps'][$appname]['title'].' '.lang('Menu'),$file); display_sidebox($appname,$GLOBALS['egw_info']['apps'][$appname]['title'].' '.lang('Menu'),$file);

View File

@ -894,6 +894,7 @@ class timesheet_ui extends timesheet_bo
$sel_options['ts_status'][self::DELETED_STATUS] = 'Deleted'; $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']['no_status'] = count($sel_options['ts_status']) <= 1; // 1 because of 'No status'
$content['nm']['favorites'] = true; //Enable favorite
if ($this->pm_integration != 'full') if ($this->pm_integration != 'full')
{ {