mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUG: fixed "regression" inserted with 9281ebc647
adding a new class to SiteTree elem (edit-disabled)
This commit is contained in:
parent
5175352ed1
commit
238f2908e5
@ -2651,17 +2651,25 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
*/
|
||||
public function CMSTreeClasses() {
|
||||
$classes = sprintf('class-%s', $this->class);
|
||||
if($this->HasBrokenFile || $this->HasBrokenLink)
|
||||
if($this->HasBrokenFile || $this->HasBrokenLink) {
|
||||
$classes .= " BrokenLink";
|
||||
}
|
||||
|
||||
if(!$this->canAddChildren())
|
||||
if(!$this->canAddChildren()) {
|
||||
$classes .= " nochildren";
|
||||
}
|
||||
|
||||
if(!$this->canView() && !$this->canEdit() && !$this->canAddChildren())
|
||||
if(!$this->canEdit() && !$this->canAddChildren()) {
|
||||
if (!$this->canView()) {
|
||||
$classes .= " disabled";
|
||||
} else {
|
||||
$classes .= " edit-disabled";
|
||||
}
|
||||
}
|
||||
|
||||
if(!$this->ShowInMenus)
|
||||
if(!$this->ShowInMenus) {
|
||||
$classes .= " notinmenu";
|
||||
}
|
||||
|
||||
//TODO: Add integration
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user