From ef1f3b71d827d330d50751a15b063c3c01fb8740 Mon Sep 17 00:00:00 2001
From: Chris Van {{ _('Add-on Statistics') }}
- {{ _('Export as CSV') }}
-{% endblock %}
+{% set title = _('Add-on Statistics') %}
diff --git a/apps/stats/templates/stats/report.html b/apps/stats/templates/stats/report.html
new file mode 100644
index 0000000000..cdf578c4fe
--- /dev/null
+++ b/apps/stats/templates/stats/report.html
@@ -0,0 +1,9 @@
+{% extends 'stats/stats.html' %}
+
+{% block csvtitle %}
+
+ {{ title }}
+ {{ _('Export as CSV') }}
+ {{ _('Export as JSON') }}
+
+{% endblock %}
diff --git a/apps/stats/templates/stats/reports/addons_created.html b/apps/stats/templates/stats/reports/addons_created.html
index 3a079c77e5..57885f66b2 100644
--- a/apps/stats/templates/stats/reports/addons_created.html
+++ b/apps/stats/templates/stats/reports/addons_created.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Add-ons Created by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Add-ons Created by Date') %}
diff --git a/apps/stats/templates/stats/reports/addons_downloaded.html b/apps/stats/templates/stats/reports/addons_downloaded.html
index 8e11c15bfc..daec2d5d5c 100644
--- a/apps/stats/templates/stats/reports/addons_downloaded.html
+++ b/apps/stats/templates/stats/reports/addons_downloaded.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Add-ons Downloaded by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Add-ons Downloaded by Date') %}
diff --git a/apps/stats/templates/stats/reports/addons_downloads.html b/apps/stats/templates/stats/reports/addons_downloads.html
deleted file mode 100644
index 9ae7b15956..0000000000
--- a/apps/stats/templates/stats/reports/addons_downloads.html
+++ /dev/null
@@ -1,5 +0,0 @@
-{% extends "stats/stats.html" %}
-
-{% block csvtitle %}
-{{_('Add-ons in Use by Date')}}{{_('Export as CSV')}}
-{% endblock %}
diff --git a/apps/stats/templates/stats/reports/addons_in_use.html b/apps/stats/templates/stats/reports/addons_in_use.html
index 9ae7b15956..6485c6e22e 100644
--- a/apps/stats/templates/stats/reports/addons_in_use.html
+++ b/apps/stats/templates/stats/reports/addons_in_use.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Add-ons in Use by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Add-ons in Use by Date') %}
diff --git a/apps/stats/templates/stats/reports/addons_updated.html b/apps/stats/templates/stats/reports/addons_updated.html
index 8c3003697b..6928120f19 100644
--- a/apps/stats/templates/stats/reports/addons_updated.html
+++ b/apps/stats/templates/stats/reports/addons_updated.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Add-ons Updated by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Add-ons Updated by Date') %}
diff --git a/apps/stats/templates/stats/reports/apps.html b/apps/stats/templates/stats/reports/apps.html
index b074162999..269e6547d6 100644
--- a/apps/stats/templates/stats/reports/apps.html
+++ b/apps/stats/templates/stats/reports/apps.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Application usage by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Application usage by Date') %}
diff --git a/apps/stats/templates/stats/reports/collections_created.html b/apps/stats/templates/stats/reports/collections_created.html
index 77f7a0d5f0..2d97423465 100644
--- a/apps/stats/templates/stats/reports/collections_created.html
+++ b/apps/stats/templates/stats/reports/collections_created.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Collections Created by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Collections Created by Date') %}
diff --git a/apps/stats/templates/stats/reports/contributions.html b/apps/stats/templates/stats/reports/contributions.html
index 95dd2a2529..b29231fbb9 100644
--- a/apps/stats/templates/stats/reports/contributions.html
+++ b/apps/stats/templates/stats/reports/contributions.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Contributions by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Contributions by Date') %}
diff --git a/apps/stats/templates/stats/reports/downloads.html b/apps/stats/templates/stats/reports/downloads.html
index db287e8b16..12ab137e5d 100644
--- a/apps/stats/templates/stats/reports/downloads.html
+++ b/apps/stats/templates/stats/reports/downloads.html
@@ -1,8 +1,6 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Downloads by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Downloaded by Date') %}
{% block stats_note_link %}
{{ _('How are downloads counted?') }}
diff --git a/apps/stats/templates/stats/reports/locales.html b/apps/stats/templates/stats/reports/locales.html
index 6425405626..868ae3b873 100644
--- a/apps/stats/templates/stats/reports/locales.html
+++ b/apps/stats/templates/stats/reports/locales.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('User languages by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('User languages by Date') %}
diff --git a/apps/stats/templates/stats/reports/os.html b/apps/stats/templates/stats/reports/os.html
index 664f58e759..f5078371c2 100644
--- a/apps/stats/templates/stats/reports/os.html
+++ b/apps/stats/templates/stats/reports/os.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Platform usage by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Platform usage by Date') %}
diff --git a/apps/stats/templates/stats/reports/ratings.html b/apps/stats/templates/stats/reports/ratings.html
index ce5042f032..1238b554d6 100644
--- a/apps/stats/templates/stats/reports/ratings.html
+++ b/apps/stats/templates/stats/reports/ratings.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Ratings by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Ratings by Date') %}
diff --git a/apps/stats/templates/stats/reports/reviews_created.html b/apps/stats/templates/stats/reports/reviews_created.html
index a32ad01f86..0f9abdb6e6 100644
--- a/apps/stats/templates/stats/reports/reviews_created.html
+++ b/apps/stats/templates/stats/reports/reviews_created.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Reviews Created by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Reviews Created by Date') %}
diff --git a/apps/stats/templates/stats/reports/sources.html b/apps/stats/templates/stats/reports/sources.html
index 9ab225f4d5..214810cb35 100644
--- a/apps/stats/templates/stats/reports/sources.html
+++ b/apps/stats/templates/stats/reports/sources.html
@@ -1,8 +1,6 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Download sources by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Download sources by Date') %}
{% block stats_note_link %}
{{ _('About tracking external sources...') }}
diff --git a/apps/stats/templates/stats/reports/statuses.html b/apps/stats/templates/stats/reports/statuses.html
index b07e056833..64e508f79f 100644
--- a/apps/stats/templates/stats/reports/statuses.html
+++ b/apps/stats/templates/stats/reports/statuses.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Add-on Status by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Add-on Status by Date') %}
diff --git a/apps/stats/templates/stats/reports/subscribers.html b/apps/stats/templates/stats/reports/subscribers.html
index 7efced8399..00b3e004f4 100644
--- a/apps/stats/templates/stats/reports/subscribers.html
+++ b/apps/stats/templates/stats/reports/subscribers.html
@@ -1,5 +1,3 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
-{{_('Subscribers by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Subscribers by Date') %}
diff --git a/apps/stats/templates/stats/reports/usage.html b/apps/stats/templates/stats/reports/usage.html
index d2710c6bcd..2e0d85fb26 100644
--- a/apps/stats/templates/stats/reports/usage.html
+++ b/apps/stats/templates/stats/reports/usage.html
@@ -1,8 +1,6 @@
-{% extends "stats/stats.html" %}
+{% extends 'stats/report.html' %}
-{% block csvtitle %}
- {{_('Daily Users by Date')}}{{_('Export as CSV')}}
-{% endblock %}
+{% set title = _('Daily Users by Date') %}
{% block stats_note_link %}
{{ _('What are daily users?') }}
@@ -18,4 +16,4 @@
and locale.