diff --git a/code/StatisticsAdmin.php b/code/StatisticsAdmin.php index 5c615e07..159e339d 100644 --- a/code/StatisticsAdmin.php +++ b/code/StatisticsAdmin.php @@ -1,6 +1,9 @@ markPartialTree(); + if($p = $this->currentPage()) $obj->markToExpose($p); + + // getChildrenAsUL is a flexible and complex way of traversing the tree + $siteTree = $obj->getChildrenAsUL("", ' + "
  • ID\" class=\"" . $child->CMSTreeClasses($extraArg) . "\">" . + "Link(),0,-1), "show", $child->ID) . "\" " . (($child->canEdit() || $child->canAddChildren()) ? "" : "class=\"disabled\"") . " title=\"Page type: ".$child->class."\" >" . + ($child->TreeTitle()) . + "" +' + ,$this, true); + + // Wrap the root if needs be. + + $rootLink = $this->Link() . '0'; + $siteTree = ""; + + + return $siteTree; + } + + public function SiteTreeAsUL() { + return $this->getSiteTreeFor("SiteTree"); + } + public function versions() { /*$pageID = $this->urlParams['ID']; //$pageID = "1"; diff --git a/templates/Includes/StatisticsAdmin_left.ss b/templates/Includes/StatisticsAdmin_left.ss index d0cbc734..21f28c67 100644 --- a/templates/Includes/StatisticsAdmin_left.ss +++ b/templates/Includes/StatisticsAdmin_left.ss @@ -1,59 +1,10 @@
    Report Types
    -
    - <% if Items %> -
      -
    • Items -
        - <% control Items %> -
      • - $Title -
      • - <% end_control %> -
      -
    • +
      + - <% end_if %> -
      - -

      Page Version History

      -
      -

      -

      - -
      - - - - - - - - - - - <% control versions %> - - - - - - - <% end_control %> - -
      #WhenAuthorPublisher
      $Version$LastEdited.Nice$Author.FirstName $Author.Surname.Initial - <% if Published %> - <% if Publisher %> - $Publisher.FirstName $Publisher.Surname.Initial - <% else %> - Unknown - <% end_if %> - <% else %> - Not published - <% end_if %> -
      -
      -
      - +