From b0713a994598938f7c2af309d7d0fa1e560d5108 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 9 Sep 2015 22:20:25 +0000 Subject: [PATCH] Make sure every app has a sidemenu link to the list and add an entry --- addressbook/inc/class.addressbook_hooks.inc.php | 11 ++++++++--- infolog/inc/class.infolog_hooks.inc.php | 6 +++++- timesheet/inc/class.timesheet_hooks.inc.php | 8 ++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index 29c47ca6ae..3e09eb29ef 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -44,9 +44,14 @@ class addressbook_hooks display_sidebox($appname, lang('Favorites'), egw_framework::favorite_list('addressbook')); $file = array( - 'Add' => "javascript:egw_openWindowCentered2('". - egw::link('/index.php',array('menuaction' => 'addressbook.addressbook_ui.edit'),false). - "','_blank',870,480,'yes')", + 'Addressbook list' => egw::link('/index.php',array( + 'menuaction' => 'addressbook.addressbook_ui.index', + 'ajax' => 'true')), + array( + 'text' => lang('Add %1',lang(egw_link::get_registry($appname, 'entry'))), + 'no_lang' => true, + 'link' => "javascript:egw.open('','$appname','add')" + ), 'Advanced search' => "javascript:egw_openWindowCentered2('". egw::link('/index.php',array('menuaction' => 'addressbook.addressbook_ui.search'),false). "','_blank',870,480,'yes')", diff --git a/infolog/inc/class.infolog_hooks.inc.php b/infolog/inc/class.infolog_hooks.inc.php index e8819dd1de..476b73f18b 100644 --- a/infolog/inc/class.infolog_hooks.inc.php +++ b/infolog/inc/class.infolog_hooks.inc.php @@ -99,7 +99,11 @@ class infolog_hooks 'infolog list' => egw::link('/index.php',array( 'menuaction' => 'infolog.infolog_ui.index', 'ajax' => 'true')), - 'Add' => "javascript:app.infolog.add_link_sidemenu();", + array( + 'text' => lang('Add %1',lang(egw_link::get_registry($appname, 'entry'))), + 'no_lang' => true, + 'link' => "javascript:app.infolog.add_link_sidemenu();" + ), 'Placeholders' => egw::link('/index.php','menuaction=infolog.infolog_merge.show_replacements') ); display_sidebox($appname,$GLOBALS['egw_info']['apps']['infolog']['title'].' '.lang('Menu'),$file); diff --git a/timesheet/inc/class.timesheet_hooks.inc.php b/timesheet/inc/class.timesheet_hooks.inc.php index b7c095a744..995511d13e 100644 --- a/timesheet/inc/class.timesheet_hooks.inc.php +++ b/timesheet/inc/class.timesheet_hooks.inc.php @@ -107,6 +107,14 @@ class timesheet_hooks display_sidebox($appname, lang('Favorites'), egw_framework::favorite_list($appname)); $file = array( + 'Timesheet list' => egw::link('/index.php',array( + 'menuaction' => 'timesheet.timesheet_ui.index', + 'ajax' => 'true')), + array( + 'text' => lang('Add %1',lang(egw_link::get_registry($appname, 'entry'))), + 'no_lang' => true, + 'link' => "javascript:egw.open('','$appname','add')" + ), ); $file['Placeholders'] = egw::link('/index.php','menuaction=timesheet.timesheet_merge.show_replacements'); display_sidebox($appname,$GLOBALS['egw_info']['apps'][$appname]['title'].' '.lang('Menu'),$file);