mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT Changed page dropdown labels from "Add a page" to "page" (doesn't work out with i18n)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@43844 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5b7301b2db
commit
bfe092ecdd
@ -256,11 +256,17 @@ JS;
|
||||
if($instance->stat('need_permission') && !$this->can( singleton($class)->stat('need_permission') ) ) continue;
|
||||
|
||||
$addAction = $instance->uninherited('add_action', true);
|
||||
if(!$addAction) $addAction = "a $class";
|
||||
if($addAction) {
|
||||
// backwards compatibility for actions like "a page" (instead of "page")
|
||||
$addAction = preg_replace('/^a /','',$addAction);
|
||||
$addAction = ucfirst($addAction);
|
||||
} else {
|
||||
$addAction = $class;
|
||||
}
|
||||
|
||||
$result->push(new ArrayData(array(
|
||||
"ClassName" => $class,
|
||||
"AddAction" => _t('CMSMain.CREATE','Create ',PR_MEDIUM,'"Create " message, followed by an action (e.g. "a contact form")') .$addAction,
|
||||
"AddAction" => $addAction,
|
||||
)));
|
||||
}
|
||||
return $result;
|
||||
|
Loading…
Reference in New Issue
Block a user