mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00: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;
|
if($instance->stat('need_permission') && !$this->can( singleton($class)->stat('need_permission') ) ) continue;
|
||||||
|
|
||||||
$addAction = $instance->uninherited('add_action', true);
|
$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(
|
$result->push(new ArrayData(array(
|
||||||
"ClassName" => $class,
|
"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;
|
return $result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user