MINOR: Show 'Inherit from site access settings' if there is no parent

This commit is contained in:
Luke Edwards 2018-07-02 15:42:24 +12:00 committed by Maxime Rainville
parent e1e92db672
commit 6ebd8aba3f
2 changed files with 5 additions and 2 deletions

View File

@ -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(

View File

@ -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'