Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…iteTree elem (edit-disabled)
  • Loading branch information...
commit 238f2908e5f945fd28cfeb35631f386336d42327 1 parent 5175352
g4b0 authored chillu committed
Showing with 13 additions and 5 deletions.
  1. +13 −5 code/model/SiteTree.php
View
18 code/model/SiteTree.php
@@ -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
/*
Please sign in to comment.
Something went wrong with that request. Please try again.