diff --git a/code/StatisticsAdmin.php b/code/StatisticsAdmin.php
index 8539778c..d1f620ab 100644
--- a/code/StatisticsAdmin.php
+++ b/code/StatisticsAdmin.php
@@ -73,9 +73,16 @@ class StatisticsAdmin extends LeftAndMain {
* Form that will be shown when we open one of the items
*/
public function EditForm() {
- return $this->showAll();
+ return "
\n
+
Select a report type from the left for a detailed look at site statistics
\n\n" .
+ $this->RecentViews() .
+ "\n\n\n\n" .
+ $this->showAll();
}
+ function RecentViews() {
+ return Statistics::getRecentViews();
+ }
function Trend() {
return Statistics::TrendChart(array('PageView', 'Member', 'SiteTree'), 'day', 'mchart', 'Line', 'red');
@@ -112,6 +119,22 @@ class StatisticsAdmin extends LeftAndMain {
$this->ViewTable();
}
+ public function viewcsv() {
+ header("Content-type: application/x-msdownload");
+ header("Content-Disposition: attachment; filename=viewreport.csv");
+ header("Pragma: no-cache");
+ header("Expires: 0");
+ echo Statistics::getViewCSV();
+ }
+
+ public function usercsv() {
+ header("Content-type: application/x-msdownload");
+ header("Content-Disposition: attachment; filename=userreport.csv");
+ header("Pragma: no-cache");
+ header("Expires: 0");
+ echo Statistics::getUserCSV();
+ }
+
}
?>
diff --git a/javascript/StatisticsAdmin.js b/javascript/StatisticsAdmin.js
index 6e1f55d0..10a08b1d 100644
--- a/javascript/StatisticsAdmin.js
+++ b/javascript/StatisticsAdmin.js
@@ -39,12 +39,13 @@ showCT = function() {
overview = function() {
- $('browserchart') ? $('browserchart').show() : null;
- $('trendchart') ? $('trendchart').show() : null;
- $('usertable') ? $('usertable').show() : null;
- $('viewtable') ? $('viewtable').show() : null;
+ $('browserchart') ? $('browserchart').hide() : null;
+ $('trendchart') ? $('trendchart').hide() : null;
+ $('usertable') ? $('usertable').hide() : null;
+ $('viewtable') ? $('viewtable').hide() : null;
$('oschart') ? $('oschart').hide() : null;
$('uacchart') ? $('uacchart').hide() : null;
+ $('bovs') ? $('bovs').show() : null;
}
users = function() {
@@ -54,6 +55,7 @@ users = function() {
$('viewtable') ? $('viewtable').hide() : null;
$('oschart') ? $('oschart').hide() : null;
$('uacchart') ? $('uacchart').show() : null;
+ $('bovs') ? $('bovs').hide() : null;
}
views = function() {
@@ -63,6 +65,7 @@ views = function() {
$('viewtable') ? $('viewtable').show() : null;
$('oschart') ? $('oschart').hide() : null;
$('uacchart') ? $('uacchart').hide() : null;
+ $('bovs') ? $('bovs').hide() : null;
}
trends = function() {
@@ -72,6 +75,7 @@ trends = function() {
$('viewtable') ? $('viewtable').hide() : null;
$('oschart') ? $('oschart').hide() : null;
$('uacchart') ? $('uacchart').hide() : null;
+ $('bovs') ? $('bovs').hide() : null;
}
browsers = function() {
@@ -81,6 +85,7 @@ browsers = function() {
$('viewtable') ? $('viewtable').hide() : null;
$('oschart') ? $('oschart').hide() : null;
$('uacchart') ? $('uacchart').hide() : null;
+ $('bovs') ? $('bovs').hide() : null;
}
os = function() {
@@ -90,6 +95,7 @@ os = function() {
$('viewtable') ? $('viewtable').hide() : null;
$('oschart') ? $('oschart').show() : null;
$('uacchart') ? $('uacchart').hide() : null;
+ $('bovs') ? $('bovs').hide() : null;
}