--- a/ckanext/ga_report/templates/ga_report/publisher/read.html +++ b/ckanext/ga_report/templates/ga_report/publisher/read.html @@ -9,35 +9,28 @@ <py:def function="optional_head"> <link rel="stylesheet" type="text/css" href="/scripts/vendor/rickshaw.min.css"/> - <link rel="stylesheet" type="text/css" href="/css/ga_report.css"/> - <script type="text/javascript" src="/scripts/ckanext_ga_reports.js"></script> + <link rel="stylesheet" type="text/css" href="/css/ga_report.css?1"/> + <script type="text/javascript" src="/scripts/ckanext_ga_reports.js?1"></script> <script type="text/javascript" src="/scripts/vendor/jquery.sparkline.modified.js"></script> + <script type="text/javascript" src="/scripts/rickshaw_ie7_shim.js"></script> <script type="text/javascript" src="/scripts/vendor/d3.v2.js"></script> <script type="text/javascript" src="/scripts/vendor/d3.layout.min.js"></script> <script type="text/javascript" src="/scripts/vendor/rickshaw.min.js"></script> </py:def> <py:match path="primarysidebar"> - <li class="widget-container boxed widget_text"> - <h4>Download</h4> - <p><center> - <a class="btn button btn-primary" href="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='dataset_csv',id=c.publisher_name or 'all',month=c.month or 'all')}">Download as CSV</a></center> - </p> - </li> - <li class="widget-container boxed widget_text"> - <h4>Graph Legend</h4> - <div id="graph-legend-container"> - </div> - </li> - <xi:include href="../notes.html" /> + ${ga_sidebar(download_link=h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='dataset_csv',id=c.publisher_name or 'all',month=c.month or 'all'))} </py:match> - + <py:def function="page_heading">Site Usage ${usage_nav('Datasets')}</py:def> <div py:match="content"> - <h1>Site Usage</h1> - ${usage_nav('Datasets')} + <div class="boxed"> + <h3 py:if="c.publisher"><a href="${h.url_for(controller='ckanext.dgu.controllers.publisher:PublisherController',action='read',id=c.publisher.name)}">${c.publisher.title}</a></h3> + <py:if test="c.graph_data"> + ${rickshaw_graph(c.graph_data,'dataset-downloads',debug=True)} + </py:if> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='read')}" method="get"> <div class="controls"> @@ -52,14 +45,15 @@ <input class="btn button btn-primary" type='submit' value="Update"/> </div> </form> - - <h3 py:if="c.publisher"><a href="${h.url_for(controller='ckanext.dgu.controllers.publisher:PublisherController',action='read',id=c.publisher.name)}">${c.publisher.title}</a></h3> - - <p py:if="not c.top_packages">No page views in this period</p> - + <py:if test="c.month"> + <h4>Statistics for ${h.month_option_title(c.month,c.months,c.day)}:</h4> + </py:if> + <py:if test="not c.month"> + <h4>Statistics for all months:</h4> + </py:if> + <div class="alert alert-info" py:if="not c.top_packages">No page views in this period.</div> <py:if test="c.top_packages"> - ${rickshaw_graph(c.graph_data,'dataset-downloads',debug=True)} - <table class="table table-condensed table-bordered table-striped"> + <table class="ga-reports-table table table-condensed table-bordered table-striped"> <tr> <th>Dataset</th> <th>Views</th> @@ -70,13 +64,14 @@ <td> ${h.link_to(package.title or package.name, h.url_for(controller='package', action='read', id=package.name))} </td> - <td>${views}</td> - <td>${downloads}</td> + <td class="td-numeric">${views}</td> + <td class="td-numeric">${downloads}</td> </tr> </py:for> </table> </py:if> + </div> </div>