--- a/ckanext/ga_report/templates/ga_report/site/index.html +++ b/ckanext/ga_report/templates/ga_report/site/index.html @@ -10,6 +10,7 @@ <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?1"/> + <script type="text/javascript" src="/scripts/modernizr-2.6.2.custom.js"></script> <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> @@ -18,27 +19,21 @@ <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:GaReport',action='csv',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 id="legend_none">(No graph loaded)</div> - </div> - </li> - <xi:include href="../notes.html" /> + <py:def function="sidebar"> + ${ga_sidebar(download_link=h.url_for(controller='ckanext.ga_report.controller:GaReport',action='csv',month=c.month or 'all'))} + </py:def> + + <py:match path="breadcrumbs"> + <li><a href="/data/search">Datasets</a></li> + <li><a href="/data/site-usage">Site-usage</a></li> + <li><a href="/data/site-usage">Site-wide</a></li> </py:match> + <div py:match="content"> - <h1>Site Usage</h1> - ${usage_nav('Site-wide')} + <div class="boxed"> <div class="tabbable"> <ul class="nav nav-tabs"> <li class="active"><a href="#totals" data-toggle="hashtab">Totals</a></li> @@ -72,7 +67,7 @@ <div class="tab-content"> <div class="tab-pane active" id="totals"> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> - <label>Show stats table for:</label> + <h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)} </form> <table class="ga-reports-table table table-condensed table-bordered table-striped"> @@ -96,33 +91,37 @@ </div> <div class="tab-pane" id="browsers_versions"> ${rickshaw_graph(c.browser_versions_graph,'browser-versions',mode='stack')} + <hr/> <p>Note: Where a browser has a large number of versions, these have been grouped together.</p> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> - <label>Show stats table for:</label> + <h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)} </form> ${stat_table(c.browser_versions)} </div> <div class="tab-pane" id="browsers_names"> ${rickshaw_graph(c.browsers_graph,'browsers',mode='stack')} + <hr/> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> - <label>Show stats table for:</label> + <h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)} </form> ${stat_table(c.browsers)} </div> <div class="tab-pane" id="os"> ${rickshaw_graph(c.os_graph,'os',mode='stack')} + <hr/> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> - <label>Show stats table for:</label> + <h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)} </form> ${stat_table(c.os)} </div> <div class="tab-pane" id="os_versions"> ${rickshaw_graph(c.os_versions_graph,'os_versions',mode='stack')} + <hr/> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> - <label>Show stats table for:</label> + <h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)} </form> ${stat_table(c.os_versions)} @@ -130,38 +129,42 @@ <div class="tab-pane" id="social_referrals_totals"> <p>Number of visits that were referred from social networks</p> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> - <label>Show stats table for:</label> + <h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)} </form> ${social_table(c.social_referrer_totals)} </div> <div class="tab-pane" id="social_networks"> ${rickshaw_graph(c.social_networks_graph, 'social_networks',mode='stack')} + <hr/> <p>Percentage of visits that were referred from these social networks</p> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> - <label>Show stats table for:</label> + <h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)} </form> ${stat_table(c.social_networks, 'Visits')} </div> <div class="tab-pane" id="languages"> ${rickshaw_graph(c.languages_graph,'languages',mode='stack')} + <hr/> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> - <label>Show stats table for:</label> + <h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)} </form> ${stat_table(c.languages)} </div> <div class="tab-pane" id="country"> ${rickshaw_graph(c.country_graph,'country',mode='stack')} + <hr/> <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}" method="get"> - <label>Show stats table for:</label> + <h4 class="ga-reports-heading">Show stats table for:</h4> ${month_selector(c.month, c.months, c.day)} </form> ${stat_table(c.country)} </div> </div> </div> + </div> </div> @@ -171,7 +174,7 @@ CKAN.GA_Reports.bind_sparklines(); CKAN.GA_Reports.bind_sidebar(); CKAN.GA_Reports.bind_month_selector(); - }); + }); </script> </py:def>