silverstripe-reports/code/StatisticsAdmin.php
Ingo Schommer bdb4e5ae65 qhoxie: revamped tablesorting, copious js fixes, cms stats reword progress
(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42126 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-16 16:24:02 +00:00

62 lines
1.2 KiB
PHP

<?php
class StatisticsAdmin extends LeftAndMain {
static $tree_class = "SiteTree";
static $subitem_class = "Member";
var $charts = array();
/**
* Initialisation method called before accessing any functionality that BulkLoaderAdmin has to offer
*/
public function init() {
parent::init();
Requirements::javascript("jsparty/plotr.js");
Requirements::javascript("jsparty/tablesort.js");
Requirements::javascript("cms/javascript/StatisticsAdmin.js");
Requirements::css("cms/css/StatisticsAdmin.css");
}
public function Link($action=null) {
return "admin/statistics/$action";
}
/**
* Form that will be shown when we open one of the items
*/
public function EditForm() {
return $this->Trend();
}
function Trend() {
return Statistics::TrendChart(array('Member', 'SiteTree', 'Group'), 'day', 'mchart', 'Line', 'red');
}
function BrowserPie() {
return Statistics::BrowserChart();
}
function UserTable() {
//Statistics::getBrowserChart();
return Statistics::UserRecordTable();
}
function ViewTable() {
return Statistics::getViews('all');
}
public function users($params) {
return Statistics::UserRecordTable();
}
public function overview($params) {
return $this->BrowserPie();
}
}
?>