Permalink
Browse files

BUG: fixed "regression" inserted with 9281ebc adding a new class to S…

…iteTree elem (edit-disabled)
  • Loading branch information...
1 parent 5175352 commit 238f2908e5f945fd28cfeb35631f386336d42327 g4b0 committed with chillu May 30, 2013
Showing with 13 additions and 5 deletions.
  1. +13 −5 code/model/SiteTree.php
View
@@ -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
/*

0 comments on commit 238f290

Please sign in to comment.