ENHANCEMENT Pulled out Report::has_reports() which was hardcoded into LeftAndMain, and put into cms/_config.php which makes more sense

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63955 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-10-09 02:45:01 +00:00
parent 114d6f00bf
commit 47ca384912
2 changed files with 10 additions and 8 deletions

View File

@ -26,4 +26,14 @@ Director::addRules(50, array(
// Built-in modules
LeftAndMain::populate_default_menu();
// If there are reports, add the ReportAdmin tab in CMS
if(ReportAdmin::has_reports()) {
LeftAndMain::add_menu_item(
'reports',
_t('LeftAndMain.REPORTS', 'Reports', PR_HIGH, 'Menu title'),
'admin/reports/',
'ReportAdmin'
);
}
?>

View File

@ -977,14 +977,6 @@ JS;
"admin/assets/",
"AssetAdmin"
);
if(ReportAdmin::has_reports()) {
self::add_menu_item(
"report",
_t('LeftAndMain.REPORTS',"Reports",PR_HIGH,'Menu title'),
"admin/reports/",
"ReportAdmin"
);
}
self::add_menu_item(
"security",
_t('LeftAndMain.SECURITY',"Security",PR_HIGH,'Menu title'),