Index: statistics/src/main/resources/Stats/Activity
===================================================================
--- statistics/src/main/resources/Stats/Activity (revision 6099)
+++ statistics/src/main/resources/Stats/Activity (working copy)
@@ -49,6 +49,11 @@
1 Activity Statistics
+#if($xwiki.statsService.enabled)
#set($chartWidth = 380)
-#displayPanelLayout(2 ["Stats.CurrentWeekActivity", "Stats.CurrentMonthActivity", "Stats.CurrentYearActivity", "Stats.AllTimeActivity"])
+#displayPanelLayout(2 ["Stats.CurrentWeekActivity", "Stats.CurrentMonthActivity", "Stats.CurrentYearActivity", "Stats.AllTimeActivity"])
+#else
+#printStatisticsDisabled()
+#end
+#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/ActivityData
===================================================================
--- statistics/src/main/resources/Stats/ActivityData (revision 6099)
+++ statistics/src/main/resources/Stats/ActivityData (working copy)
@@ -47,7 +47,8 @@
-1 Current week activity
+#if($xwiki.statsService.enabled)
+1 Current week activity
#set($scope = $xwiki.statsService.scopeFactory.ALL)
#set($period = $xwiki.statsService.periodFactory.currentWeek)
@@ -57,9 +58,13 @@
#set($dtf = $xwiki.jodatime.getDateTimeFormatterForPattern('yyyy.MM.dd'))
{table}
| Views | Edits
+#if($myviews.size() > 0)
#foreach($item in $myviews.entrySet())
$dtf.print($item.key) | $item.value | $myedits.get($item.key)
#end
+#else
+1900.01.01 | 0 | 0
+#end
{table}
1 Current month activity
@@ -71,9 +76,13 @@
#set($dtf = $xwiki.jodatime.getDateTimeFormatterForPattern('yyyy.MM.dd'))
{table}
| Views | Edits
+#if($myviews.size() > 0)
#foreach($item in $myviews.entrySet())
$dtf.print($item.key) | $item.value | $myedits.get($item.key)
#end
+#else
+1900.01.01 | 0 | 0
+#end
{table}
1 Current year activity
@@ -85,9 +94,13 @@
#set($dtf = $xwiki.jodatime.getDateTimeFormatterForPattern('yyyy.MM'))
{table}
| Views | Edits
+#if($myviews.size() > 0)
#foreach($item in $myviews.entrySet())
$dtf.print($item.key) | $item.value | $myedits.get($item.key)
#end
+#else
+1900.01 | 0 | 0
+#end
{table}
1 All time activity
@@ -99,8 +112,16 @@
#set($dtf = $xwiki.jodatime.getDateTimeFormatterForPattern('yyyy'))
{table}
| Views | Edits
+#if($myviews.size() > 0)
#foreach($item in $myviews.entrySet())
$dtf.print($item.key) | $item.value | $myedits.get($item.key)
#end
-{table}
+#else
+1900 | 0 | 0
+#end
+{table}
+#else
+#printStatisticsDisabled()
+#end
+#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/AllTimeActivity
===================================================================
--- statistics/src/main/resources/Stats/AllTimeActivity (revision 6099)
+++ statistics/src/main/resources/Stats/AllTimeActivity (working copy)
@@ -91,6 +91,7 @@
#panelheader('All Time Activity')
+#if($xwiki.statsService.enabled)
#if(not $chartWidth)
#set($chartWidth=250)
#end
@@ -103,7 +104,11 @@
#set($periodEnd=$xwiki.jodatime.getDateTime($currentYear.end).plusYears(2))
#set($dtf=$xwiki.jodatime.getDateTimeFormatterForPattern($pattern))
<div style="text-align:center;">{chart:type=time|source=type:table;doc:Stats.ActivityData;table_number:3;ignore_alpha:true|date_format=type:custom;pattern:$pattern|height=$chartHeight|width=$chartWidth|domain_axis_date_format_override=type:custom;pattern:yyyy|domain_axis_lower_date=value:$dtf.print($periodStart);type:custom;pattern:$pattern|domain_axis_upper_date=value:$dtf.print($periodEnd);type:custom;pattern:$pattern|domain_axis_date_tick_unit=unit:year;count:1|domain_axis_tick_mark_position:ende}</div>
-#panelfooter()
+#else
+#printStatisticsDisabled()
+#end
+#panelfooter()
+#includeMacros("Stats.Macros")
Displays all time activity
Index: statistics/src/main/resources/Stats/BestReferrers
===================================================================
--- statistics/src/main/resources/Stats/BestReferrers (revision 6099)
+++ statistics/src/main/resources/Stats/BestReferrers (working copy)
@@ -91,6 +91,7 @@
#panelheader('Best Referrers')
+#if($xwiki.statsService.enabled)
#set($scope=$xwiki.statsService.scopeFactory.ALL_PAGES)
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
@@ -95,7 +96,14 @@
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
#set($stats=$xwiki.statsService.getRefererStatistics('',$scope,$period,$interval))
+#if($stats.size() > 0)
#printRefererStats($stats)
+#else
+#printNoStatisticsData()
+#end
+#else
+#printStatisticsDisabled()
+#end
#panelfooter()
#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/CurrentMonthActivity
===================================================================
--- statistics/src/main/resources/Stats/CurrentMonthActivity (revision 6099)
+++ statistics/src/main/resources/Stats/CurrentMonthActivity (working copy)
@@ -91,6 +91,7 @@
#panelheader('Current Month Activity')
+#if($xwiki.statsService.enabled)
#if(not $chartWidth)
#set($chartWidth=250)
#end
@@ -103,7 +104,11 @@
#set($monthEnd=$xwiki.jodatime.getDateTime($currentMonth.end))
#set($dtf=$xwiki.jodatime.getDateTimeFormatterForPattern($pattern))
<div style="text-align:center;">{chart:type=time|source=type:table;doc:Stats.ActivityData;table_number:1;ignore_alpha:true|date_format=type:custom;pattern:$pattern|height=$chartHeight|width=$chartWidth|domain_axis_date_format_override=type:custom;pattern:dd|domain_axis_lower_date=value:$dtf.print($monthStart);type:custom;pattern:$pattern|domain_axis_upper_date=value:$dtf.print($monthEnd);type:custom;pattern:$pattern|domain_axis_date_tick_unit=unit:day;count:3|domain_axis_tick_mark_position:ende}</div>
-#panelfooter()
+#else
+#printStatisticsDisabled()
+#end
+#panelfooter()
+#includeMacros("Stats.Macros")
Displays the activity during the current month
Index: statistics/src/main/resources/Stats/CurrentWeekActivity
===================================================================
--- statistics/src/main/resources/Stats/CurrentWeekActivity (revision 6099)
+++ statistics/src/main/resources/Stats/CurrentWeekActivity (working copy)
@@ -91,6 +91,7 @@
#panelheader('Current Week Activity')
+#if($xwiki.statsService.enabled)
#if(not $chartWidth)
#set($chartWidth=250)
#end
@@ -103,7 +104,11 @@
#set($weekEnd=$xwiki.jodatime.getDateTime($currentWeek.end))
#set($dtf=$xwiki.jodatime.getDateTimeFormatterForPattern($pattern))
<div style="text-align:center;">{chart:type=time|source=type:table;doc:Stats.ActivityData;table_number:0;ignore_alpha:true|date_format=type:custom;pattern:$pattern|height=$chartHeight|width=$chartWidth|domain_axis_date_format_override=type:custom;pattern:MMM dd|domain_axis_lower_date=value:$dtf.print($weekStart);type:custom;pattern:$pattern|domain_axis_upper_date=value:$dtf.print($weekEnd);type:custom;pattern:$pattern|domain_axis_date_tick_unit=unit:day;count:1|domain_axis_tick_mark_position:ende}</div>
-#panelfooter()
+#else
+#printStatisticsDisabled()
+#end
+#panelfooter()
+#includeMacros("Stats.Macros")
Displays the activity during the current week
Index: statistics/src/main/resources/Stats/CurrentYearActivity
===================================================================
--- statistics/src/main/resources/Stats/CurrentYearActivity (revision 6099)
+++ statistics/src/main/resources/Stats/CurrentYearActivity (working copy)
@@ -91,6 +91,7 @@
#panelheader('Current Year Activity')
+#if($xwiki.statsService.enabled)
#if(not $chartWidth)
#set($chartWidth=250)
#end
@@ -103,7 +104,11 @@
#set($yearEnd=$xwiki.jodatime.getDateTime($currentYear.end))
#set($dtf=$xwiki.jodatime.getDateTimeFormatterForPattern($pattern))
<div style="text-align:center;">{chart:type=time|source=type:table;doc:Stats.ActivityData;table_number:2;ignore_alpha:true|date_format=type:custom;pattern:$pattern|height=$chartHeight|width=$chartWidth|domain_axis_date_format_override=type:custom;pattern:MM|domain_axis_lower_date=value:$dtf.print($yearStart);type:custom;pattern:$pattern|domain_axis_upper_date=value:$dtf.print($yearEnd);type:custom;pattern:$pattern|domain_axis_date_tick_unit=unit:month;count:1|domain_axis_tick_mark_position:ende}</div>
-#panelfooter()
+#else
+#printStatisticsDisabled()
+#end
+#panelfooter()
+#includeMacros("Stats.Macros")
Displays the activity during the current year
Index: statistics/src/main/resources/Stats/Document
===================================================================
--- statistics/src/main/resources/Stats/Document (revision 6099)
+++ statistics/src/main/resources/Stats/Document (working copy)
@@ -49,5 +49,10 @@
1 Document Statistics
-#displayPanelLayout(2 ["Stats.MostViewedPages", "Stats.MostEditedPages", "Stats.MostViewedSpaces", "Stats.MostEditedSpaces"])
+#if($xwiki.statsService.enabled)
+#displayPanelLayout(2 ["Stats.MostViewedPages", "Stats.MostEditedPages", "Stats.MostViewedSpaces", "Stats.MostEditedSpaces"])
+#else
+#printStatisticsDisabled()
+#end
+#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/LeastActiveContributors
===================================================================
--- statistics/src/main/resources/Stats/LeastActiveContributors (revision 6099)
+++ statistics/src/main/resources/Stats/LeastActiveContributors (working copy)
@@ -91,10 +91,18 @@
#panelheader('Least Active Contributors')
+#if($xwiki.statsService.enabled)
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createTailInterval(5))
#set($stats=$xwiki.statsService.getVisitStatistics('save',$period,$interval))
+#if($stats.size() > 0)
#printContributorStats($stats)
+#else
+#printNoStatisticsData()
+#end
+#else
+#printStatisticsDisabled()
+#end
#panelfooter()
#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/Macros
===================================================================
--- statistics/src/main/resources/Stats/Macros (revision 6099)
+++ statistics/src/main/resources/Stats/Macros (working copy)
@@ -47,27 +47,7 @@
-<style type="text/css">
-table.stats{
-width:100%;
-}
-table.stats th{
-font-weight:normal;
-color:#333333;
-border-bottom:1px solid #DDDDDD;
-border-top:1px solid #DDDDDD;
-padding-bottom:2px;
-}
-table.stats td{
-color:#888888;
-}
-table.stats th.numeric, table.stats td.numeric{
-text-align:right;
-padding-right:6px;
-width:70px;
-}
-</style>
-#macro(printPageStats $stats)
+#macro(printPageStats $stats)
<table class="stats" cellspacing="0" cellpadding="0">
<thead>
<tr>
@@ -146,5 +126,11 @@
#end
</tbody>
</table>
+#end
+#macro(printNoStatisticsData)
+#info('No statistics recorded')
+#end
+#macro(printStatisticsDisabled)
+#warning('The statistics module is disabled by default for improved performances. For more details, see [statistics home page>Stats.WebHome].')
#end
Index: statistics/src/main/resources/Stats/MostActiveContributors
===================================================================
--- statistics/src/main/resources/Stats/MostActiveContributors (revision 6099)
+++ statistics/src/main/resources/Stats/MostActiveContributors (working copy)
@@ -91,10 +91,18 @@
#panelheader('Most Active Contributors')
+#if($xwiki.statsService.enabled)
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
#set($stats=$xwiki.statsService.getVisitStatistics('save',$period,$interval))
+#if($stats.size() > 0)
#printContributorStats($stats)
+#else
+#printNoStatisticsData()
+#end
+#else
+#printStatisticsDisabled()
+#end
#panelfooter()
#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/MostEditedPages
===================================================================
--- statistics/src/main/resources/Stats/MostEditedPages (revision 6099)
+++ statistics/src/main/resources/Stats/MostEditedPages (working copy)
@@ -91,6 +91,7 @@
#panelheader("Most Edited Pages")
+#if($xwiki.statsService.enabled)
#set($scope=$xwiki.statsService.scopeFactory.ALL_PAGES)
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
@@ -95,7 +96,14 @@
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
#set($stats=$xwiki.statsService.getDocumentStatistics("save",$scope,$period,$interval))
+#if($stats.size() > 0)
#printPageStats($stats)
+#else
+#printNoStatisticsData()
+#end
+#else
+#printStatisticsDisabled()
+#end
#panelfooter()
#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/MostEditedSpaces
===================================================================
--- statistics/src/main/resources/Stats/MostEditedSpaces (revision 6099)
+++ statistics/src/main/resources/Stats/MostEditedSpaces (working copy)
@@ -91,6 +91,7 @@
#panelheader('Most Edited Spaces')
+#if($xwiki.statsService.enabled)
#set($scope=$xwiki.statsService.scopeFactory.ALL_SPACES)
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
@@ -95,7 +96,14 @@
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
#set($stats=$xwiki.statsService.getDocumentStatistics("save",$scope,$period,$interval))
+#if($stats.size() > 0)
#printSpaceStats($stats)
+#else
+#printNoStatisticsData()
+#end
+#else
+#printStatisticsDisabled()
+#end
#panelfooter()
#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/MostReferredPages
===================================================================
--- statistics/src/main/resources/Stats/MostReferredPages (revision 6099)
+++ statistics/src/main/resources/Stats/MostReferredPages (working copy)
@@ -91,6 +91,7 @@
#panelheader('Most Referred Pages')
+#if($xwiki.statsService.enabled)
#set($scope=$xwiki.statsService.scopeFactory.ALL_PAGES)
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
@@ -95,7 +96,14 @@
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
#set($stats=$xwiki.statsService.getBackLinkStatistics('',$scope,$period,$interval))
+#if($stats.size() > 0)
#printPageStats($stats)
+#else
+#printNoStatisticsData()
+#end
+#else
+#printStatisticsDisabled()
+#end
#panelfooter()
#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/MostViewedPages
===================================================================
--- statistics/src/main/resources/Stats/MostViewedPages (revision 6099)
+++ statistics/src/main/resources/Stats/MostViewedPages (working copy)
@@ -91,6 +91,7 @@
#panelheader("Most Viewed Pages")
+#if($xwiki.statsService.enabled)
#set($scope=$xwiki.statsService.scopeFactory.ALL_PAGES)
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
@@ -95,7 +96,14 @@
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
#set($stats=$xwiki.statsService.getDocumentStatistics("view",$scope,$period,$interval))
+#if($stats.size() > 0)
#printPageStats($stats)
+#else
+#printNoStatisticsData()
+#end
+#else
+#printStatisticsDisabled()
+#end
#panelfooter()
#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/MostViewedSpaces
===================================================================
--- statistics/src/main/resources/Stats/MostViewedSpaces (revision 6099)
+++ statistics/src/main/resources/Stats/MostViewedSpaces (working copy)
@@ -91,6 +91,7 @@
#panelheader('Most Viewed Spaces')
+#if($xwiki.statsService.enabled)
#set($scope=$xwiki.statsService.scopeFactory.ALL_SPACES)
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
@@ -95,7 +96,14 @@
#set($period=$xwiki.statsService.periodFactory.ALL_TIME)
#set($interval=$xwiki.statsService.intervalFactory.createHeadInterval(5))
#set($stats=$xwiki.statsService.getDocumentStatistics("view",$scope,$period,$interval))
+#if($stats.size() > 0)
#printSpaceStats($stats)
+#else
+#printNoStatisticsData()
+#end
+#else
+#printStatisticsDisabled()
+#end
#panelfooter()
#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/Referrer
===================================================================
--- statistics/src/main/resources/Stats/Referrer (revision 6099)
+++ statistics/src/main/resources/Stats/Referrer (working copy)
@@ -49,5 +49,10 @@
1 Referrer Statistics
-#displayPanelLayout(2 ["Stats.BestReferrers", "Stats.MostReferredPages"])
+#if($xwiki.statsService.enabled)
+#displayPanelLayout(2 ["Stats.BestReferrers", "Stats.MostReferredPages"])
+#else
+#printStatisticsDisabled()
+#end
+#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/Skin
===================================================================
--- statistics/src/main/resources/Stats/Skin (revision 0)
+++ statistics/src/main/resources/Stats/Skin (revision 0)
@@ -0,0 +1,429 @@
+
+
+
+Stats
+Skin
+
+
+0
+Stats.WebHome
+XWiki.marius
+XWiki.marius
+
+XWiki.marius
+1196172313000
+1196172847000
+1196172847000
+2.2
+Statistics Skin
+
+
+
+
+true
+
+
+
+
\ No newline at end of file
Index: statistics/src/main/resources/Stats/Visit
===================================================================
--- statistics/src/main/resources/Stats/Visit (revision 6099)
+++ statistics/src/main/resources/Stats/Visit (working copy)
@@ -49,5 +49,10 @@
1 Visit Statistics
-#displayPanelLayout(2 ["Stats.MostActiveContributors", "Stats.LeastActiveContributors"])
+#if($xwiki.statsService.enabled)
+#displayPanelLayout(2 ["Stats.MostActiveContributors", "Stats.LeastActiveContributors"])
+#else
+#printStatisticsDisabled()
+#end
+#includeMacros("Stats.Macros")
Index: statistics/src/main/resources/Stats/WebPreferences
===================================================================
--- statistics/src/main/resources/Stats/WebPreferences (revision 0)
+++ statistics/src/main/resources/Stats/WebPreferences (revision 0)
@@ -0,0 +1,951 @@
+
+
+
+Stats
+WebPreferences
+
+
+0
+Stats.WebHome
+XWiki.marius
+XWiki.marius
+
+XWiki.marius
+1196164456000
+1196177713000
+1196177713000
+3.3
+Statistics Web Preferences
+
+
+
+
+true
+
+
+
+
\ No newline at end of file