ckanext-googleanalytics_v2..../ckanext/googleanalytics/templates/summary.html

54 lines
1.5 KiB
HTML
Raw Normal View History

2011-04-05 11:38:25 +02:00
<html xmlns:py="http://genshi.edgewall.org/"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
<py:def function="page_title">Google analytics for CKAN</py:def>
<div py:match="content">
<h2>Most viewed packages</h2>
<p><em>Note: this data does not include API calls</em></p>
<table>
<tr>
<th>Package</th>
<th>Unique views (last 14 days)</th>
<th>Unique views (since recording started)</th>
</tr>
<py:for each="package, recent, ever in c.top_packages">
<tr>
<td>${h.link_to(package.title or package.name, h.url_for(controller='package', action='read', id=package.name))}
</td>
<td>${recent}</td>
<td>${ever}</td>
</tr>
</py:for>
</table>
<h2>Most downloaded resources</h2>
<table>
<tr>
<th>Resource</th>
<th>Unique views (last 14 days)</th>
<th>Unique views (since recording started)</th>
</tr>
<py:for each="resource, recent, ever in c.top_resources">
<tr>
<td>${h.link_to(resource.description or resource.format, resource.url)}<br />
<em>in ${h.link_to(resource.resource_group.package.title or resource.resource_group.package.name, h.url_for(controller='package', action='read', id=resource.resource_group.package.name))}</em>
</td>
<td>${recent}</td>
<td>${ever}</td>
</tr>
</py:for>
</table>
</div>
<xi:include href="layout.html" />
</html>