Skip to content

Commit

Permalink
BUG: fixed "regression" inserted with 9281ebc adding a new class to S…
Browse files Browse the repository at this point in the history
…iteTree elem (edit-disabled)
  • Loading branch information
g4b0 authored and chillu committed Jun 3, 2013
1 parent 5175352 commit 238f290
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions code/model/SiteTree.php
Expand Up @@ -2651,17 +2651,25 @@ public function Level($level) {
*/
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())
$classes .= " disabled";
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
/*
Expand Down

0 comments on commit 238f290

Please sign in to comment.