BUG: fixed "regression" inserted with 9281ebc647 adding a new class to SiteTree elem (edit-disabled)

This commit is contained in:
g4b0 2013-05-30 15:50:23 +02:00 committed by Ingo Schommer
parent 5175352ed1
commit 238f2908e5

View File

@ -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
/*