Add favorites to resources

This commit is contained in:
Hadi Nategh 2014-01-18 17:54:08 +00:00
parent e0bd105dd2
commit a71da98483
2 changed files with 10 additions and 0 deletions

View File

@ -26,6 +26,15 @@ class resources_hooks
if ($location == 'sidebox_menu')
{
// Magic etemplate2 favorites menu (from nextmatch widget)
display_sidebox($appname,lang('Favorites'),array(
array(
'no_lang' => true,
'text'=> egw_framework::favorite_list($appname,'resources.resources_ui.get_rows'),
'link'=>false,
'icon' => false
)
));
$title = $GLOBALS['egw_info']['apps']['resources']['title'].' '.lang('Menu');
$file = array(
'Resources list' => egw::link('/index.php',array('menuaction' => 'resources.resources_ui.index' )),

View File

@ -117,6 +117,7 @@ class resources_ui
$content['nm']['sort'] = 'ASC';
$content['nm']['store_state'] = 'get_rows';
$content['nm']['row_id'] = 'res_id';
$content['nm']['favorites'] = true;
$nm_session_data = $GLOBALS['egw']->session->appsession('session_data','resources_index_nm');
if($nm_session_data)