mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR: Show 'Inherit from site access settings' if there is no parent
This commit is contained in:
parent
e1e92db672
commit
6ebd8aba3f
@ -2100,8 +2100,10 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$inheritMessage = $this->ParentID !== 0 ? _t(__CLASS__.'.INHERITPARENT', "Inherit from parent page") : _t(__CLASS__.'.INHERITSITECONFIG', "Inherit from site access settings");
|
||||||
|
|
||||||
$viewersOptionsSource = [
|
$viewersOptionsSource = [
|
||||||
InheritedPermissions::INHERIT => _t(__CLASS__.'.INHERIT', "Inherit from parent page"),
|
InheritedPermissions::INHERIT => $inheritMessage,
|
||||||
InheritedPermissions::ANYONE => _t(__CLASS__.'.ACCESSANYONE', "Anyone"),
|
InheritedPermissions::ANYONE => _t(__CLASS__.'.ACCESSANYONE', "Anyone"),
|
||||||
InheritedPermissions::LOGGED_IN_USERS => _t(__CLASS__.'.ACCESSLOGGEDIN', "Logged-in users"),
|
InheritedPermissions::LOGGED_IN_USERS => _t(__CLASS__.'.ACCESSLOGGEDIN', "Logged-in users"),
|
||||||
InheritedPermissions::ONLY_THESE_USERS => _t(
|
InheritedPermissions::ONLY_THESE_USERS => _t(
|
||||||
|
@ -204,7 +204,8 @@ en:
|
|||||||
Editors: 'Editors Groups'
|
Editors: 'Editors Groups'
|
||||||
HASBROKENLINKS: 'This page has broken links.'
|
HASBROKENLINKS: 'This page has broken links.'
|
||||||
HTMLEDITORTITLE: Content
|
HTMLEDITORTITLE: Content
|
||||||
INHERIT: 'Inherit from parent page'
|
INHERITPARENT: 'Inherit from parent page'
|
||||||
|
INHERITSITECONFIG: 'Inherit from site access settings'
|
||||||
LASTPUBLISHED: 'Last published'
|
LASTPUBLISHED: 'Last published'
|
||||||
LASTSAVED: 'Last saved'
|
LASTSAVED: 'Last saved'
|
||||||
LASTUPDATED: 'Last Updated'
|
LASTUPDATED: 'Last Updated'
|
||||||
|
Loading…
Reference in New Issue
Block a user