diff --git a/piwik/indico_piwik/controllers.py b/piwik/indico_piwik/controllers.py index abc5620..54edd83 100644 --- a/piwik/indico_piwik/controllers.py +++ b/piwik/indico_piwik/controllers.py @@ -29,7 +29,7 @@ class RHStatistics(RHManageEventBase): contrib_id=request.args.get('contrib_id'), start_date=request.args.get('start_date'), end_date=request.args.get('end_date')) - return WPStatistics.render_template('statistics.html', self._conf, report=report) + return WPStatistics.render_template('statistics.html', self.event, report=report) class RHApiBase(RHManageEventBase): diff --git a/piwik/indico_piwik/templates/statistics.html b/piwik/indico_piwik/templates/statistics.html index 1bdcde5..cc73f11 100644 --- a/piwik/indico_piwik/templates/statistics.html +++ b/piwik/indico_piwik/templates/statistics.html @@ -1,240 +1,244 @@ -{{ include_js_assets('jqplot_js') }} -{{ include_css_assets('jqplot_css') }} -{{ include_plugin_js_assets('jqtree_js') }} -{{ include_plugin_css_assets('jqtree_css') }} -{{ include_plugin_js_assets('statistics_js') }} -{{ include_plugin_css_assets('statistics_css') }} +{% extends 'events/management/base.html' %} + +{% block content %} + {{ include_js_assets('jqplot_js') }} + {{ include_css_assets('jqplot_css') }} + {{ include_plugin_js_assets('jqtree_js') }} + {{ include_plugin_css_assets('jqtree_css') }} + {{ include_plugin_js_assets('statistics_js') }} + {{ include_plugin_css_assets('statistics_css') }} -
- -
-
- {% trans %}Selection Information{% endtrans %} - {% trans start=report.start_date, end=report.end_date %}({{ start }} to {{ end }}){% endtrans %} - - - {%- trans -%}Modify Query{%- endtrans -%} - - -
-
-
- -
-
- {% trans %}View statistics between these dates{% endtrans %}: - - {% trans %}to{% endtrans %} - - - -
-
- {% if report.contributions %} - {% trans %}Choose Event / Contribution{% endtrans %} - - {% else %} - - {% endif %} -
-
- -
-
-
-
-
- -
- +
+
- {% trans %}Visitor Hit Rates{% endtrans %} - - {% trans %}Info{% endtrans %} + {% trans %}Selection Information{% endtrans %} + {% trans start=report.start_date, end=report.end_date %}({{ start }} to {{ end }}){% endtrans %} + + + {%- trans -%}Modify Query{%- endtrans -%} + + +
+
+
+ +
+
+ {% trans %}View statistics between these dates{% endtrans %}: + + {% trans %}to{% endtrans %} + + + +
+
+ {% if report.contributions %} + {% trans %}Choose Event / Contribution{% endtrans %} + + {% else %} + + {% endif %} +
+
+ +
+
-
-
-
-
-
- -
-
- {% trans %}Overall Statistics{% endtrans %} -
-
-
- {% trans %}Visitor Metrics{% endtrans %}: +
+ +
+
+ {% trans %}Visitor Hit Rates{% endtrans %} + + {% trans %}Info{% endtrans %} +
- - - - - - - - - - - - - - - - - -
{% trans %}Visitors{% endtrans %}:{{ report.metrics.visits }}
{% trans %}Unique Visitors{% endtrans %}{{ report.metrics.unique_visits }}
{% trans %}Returning Visitors{% endtrans %}{{ report.metrics.visits - report.metrics.unique_visits }}
{% trans %}Avg. Duration{% endtrans %}{{ report.metrics.visit_duration }}
-
- {% trans %}Peak Statistics{% endtrans %} +
+
- - - - - - - - - -
{% trans %}Peak Date{% endtrans %}:{{ report.metrics.peak.date }}
{% trans %}Peak Users{% endtrans %}:{{ report.metrics.peak.users }}
- -
-
- {% trans %}Visitors Geography{% endtrans %} -
-
- {% trans %}Visitor Origins{% endtrans %} -
-
- -
- -
- - -
-
- {% trans %}Top Referrers{% endtrans %} -
-
-
- {% trans %}Traffic Inbound Top 10{% endtrans %}: +
+ +
+
+ {% trans %}Overall Statistics{% endtrans %}
- - - - - - - - {% for referrer in report.metrics.referrers %} - - - - - - - {% endfor %} -
{% trans %}Referrer{% endtrans %}{% trans %}Visits{% endtrans %}{% trans %}Actions{% endtrans %}{% trans %}Visit Length{% endtrans %}
{{ referrer.label }}{{ referrer.nb_visits }}{{ referrer.nb_actions }}{{ referrer.sum_visit_length }}
-
-
- - -
-
- {% trans %}User Systems{% endtrans %} -
-
- {% trans %}Visitor Systems{% endtrans %} -
-
- -
- -
- - -
-
- {% trans %}Material Downloads{% endtrans %} -
-
-
-
-
- {% trans %}Downloads for{% endtrans %}: - - — - - ({% trans %}Total{% endtrans %}: 0) +
+
+ {% trans %}Visitor Metrics{% endtrans %}:
-
-
- {% trans %}No material selected{% endtrans %} + + + + + + + + + + + + + + + + + +
{% trans %}Visitors{% endtrans %}:{{ report.metrics.visits }}
{% trans %}Unique Visitors{% endtrans %}{{ report.metrics.unique_visits }}
{% trans %}Returning Visitors{% endtrans %}{{ report.metrics.visits - report.metrics.unique_visits }}
{% trans %}Avg. Duration{% endtrans %}{{ report.metrics.visit_duration }}
+
+ {% trans %}Peak Statistics{% endtrans %} +
+ + + + + + + + + +
{% trans %}Peak Date{% endtrans %}:{{ report.metrics.peak.date }}
{% trans %}Peak Users{% endtrans %}:{{ report.metrics.peak.users }}
+
+
+ + +
+
+ {% trans %}Visitors Geography{% endtrans %} +
+
+ {% trans %}Visitor Origins{% endtrans %} +
+
+ +
+ +
+ + +
+
+ {% trans %}Top Referrers{% endtrans %} +
+
+
+ {% trans %}Traffic Inbound Top 10{% endtrans %}: +
+ + + + + + + + {% for referrer in report.metrics.referrers %} + + + + + + + {% endfor %} +
{% trans %}Referrer{% endtrans %}{% trans %}Visits{% endtrans %}{% trans %}Actions{% endtrans %}{% trans %}Visit Length{% endtrans %}
{{ referrer.label }}{{ referrer.nb_visits }}{{ referrer.nb_actions }}{{ referrer.sum_visit_length }}
+
+
+ + +
+
+ {% trans %}User Systems{% endtrans %} +
+
+ {% trans %}Visitor Systems{% endtrans %} +
+
+ +
+ +
+ + +
+
+ {% trans %}Material Downloads{% endtrans %} +
+
+
+
+
+ {% trans %}Downloads for{% endtrans %}: + + — + + ({% trans %}Total{% endtrans %}: 0) +
+
+
+ {% trans %}No material selected{% endtrans %} +
+
-
- -
- {% trans dt=report.timestamp | format_datetime('long') -%} - This report was generated at: {{ dt }} - {%- endtrans %} -
-
- - -
-
-

- {% trans -%} - The server did not respond in a timely manner. - It may be the case that the date-range is too large. +

+ {% trans dt=report.timestamp | format_datetime('long') -%} + This report was generated at: {{ dt }} {%- endtrans %} -

+
-
- + +
+
+

+ {% trans -%} + The server did not respond in a timely manner. + It may be the case that the date-range is too large. + {%- endtrans %} +

+
+
+ + +{% endblock %} diff --git a/piwik/indico_piwik/views.py b/piwik/indico_piwik/views.py index 711a1fd..816de4d 100644 --- a/piwik/indico_piwik/views.py +++ b/piwik/indico_piwik/views.py @@ -15,8 +15,8 @@ # along with Indico; if not, see . from indico.core.plugins import WPJinjaMixinPlugin -from indico.modules.events.management.views import WPEventManagementLegacy +from indico.modules.events.management.views import WPEventManagement -class WPStatistics(WPJinjaMixinPlugin, WPEventManagementLegacy): +class WPStatistics(WPJinjaMixinPlugin, WPEventManagement): sidemenu_option = 'statistics'