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

54 lines
1.7 KiB
HTML

<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">Analytics for ${g.site_title}</py:def>
<div py:match="content">
<h2>Most viewed datasets</h2>
<p><em>Note: this data does not include API calls</em></p>
<table class="table table-condensed table-bordered table-striped">
<tr>
<th>Dataset</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 class="table table-condensed table-bordered table-striped">
<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(h.truncate(resource.description, length=50,whole_word=True) if resource.description else resource.format, h.url_for(controller='package',action='resource_read',id=resource.resource_group.package.id,resource_id=resource.id))}<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>