<tal:block define="chart here/getVisitsGraph;
					site_usage here/getSiteUsage;
					top_pages here/getTopPages;
					top_referers here/getTopReferers;
					top_searches here/getTopSearches">

<h2 tal:define="interval here/get_date_interval;
				start_date python:interval[0];
				end_date python:interval[1];" i18n:translate="">
					Visits on the range of time: 
					<span tal:replace="python:here.utShowDateTime1(start_date)" /> -
					<span tal:replace="python:here.utShowDateTime1(end_date)" /></h2>
<div style="float:right;" tal:condition="chart">
	<img tal:define="chart_values python:chart[0]; ymax python:chart[1]; ystep python:chart[2]; xlbl python:chart[3]"
		tal:attributes="src string:http://chart.apis.google.com/chart?cht=lc&chs=400x120&chd=t:${chart_values}&chco=224499&chm=B,76A4FB,0,0,0&chds=0,${ymax}&chxt=x,y&chxl=0:${xlbl}1:${ystep}" />
</div>
<div tal:condition="site_usage">
	<table>
		<tbody>
			<tr>
				<th i18n:translate="">Visits:</th>
				<td tal:content="site_usage/visits" />
			</tr>
			<tr>
				<th i18n:translate="">Pageviews:</th>
				<td tal:content="site_usage/pageviews" />
			</tr>
			<tr>
				<th i18n:translate="">Pages/Visit:</th>
				<td tal:content="site_usage/pages_visit" />
			</tr>
			<tr>
				<th i18n:translate="">Bounce Rate:</th>
				<td tal:content="site_usage/bounces" />
			</tr>
			<tr>
				<th i18n:translate="">Avg. Time on Site:</th>
				<td tal:content="site_usage/sessionDuration" />
			</tr>
			<tr>
				<th i18n:translate="">% New Visits:</th>
				<td tal:content="site_usage/newVisits" />
			</tr>
		</tbody>
	</table>
</div>
<p tal:condition="not:chart">No data available for this website</p>

<h2 i18n:translate="">Top Pages</h2>
<ol tal:condition="top_pages">
	<tal:block define="pages python:top_pages[0]; website python:top_pages[1];">
	<tal:block repeat="page pages">
		<li><a tal:attributes="href string:${website}${page/pagePath}" tal:content="string:${website}${page/pagePath}" /> - <span tal:replace="page/pageviews" /> <span i18n:translate="">Views</span>
	</tal:block>
	</tal:block>
</ol>
<p tal:condition="not:top_pages">No data available for this website</p>

<h2 i18n:translate="">Top Searches</h2>
<ol tal:condition="top_searches">
	<tal:block repeat="search top_searches">
		<li><strong tal:content="search/keyword" /> - <span tal:replace="search/visits" /> <span i18n:translate="">Visits</span>
	</tal:block>
</ol>
<p tal:condition="not:top_searches">No data available for this website</p>

<h2 i18n:translate="">Top Referers</h2>
<ol tal:condition="top_referers">
	<tal:block repeat="referer top_referers">
		<li><strong tal:content="referer/source" /> - <span tal:replace="referer/visits" /> <span i18n:translate="">Visits</span>
	</tal:block>
</ol>
<p tal:condition="not:top_referers">No data available for this website</p>

</tal:block>
