aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/front/stats.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base/front/stats.html')
-rw-r--r--templates/web/base/front/stats.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/templates/web/base/front/stats.html b/templates/web/base/front/stats.html
new file mode 100644
index 000000000..5367f1118
--- /dev/null
+++ b/templates/web/base/front/stats.html
@@ -0,0 +1,43 @@
+[%
+ USE Comma;
+ # Note - if we want to i18n the commas we should try
+ # 'Template::Plugin::Number::Format'
+%]
+
+[%
+ stats = c.cobrand.front_stats_data();
+
+ new_text =
+ stats.recency == '1 week'
+ ? nget(
+ "<big>%s</big> report in past week",
+ "<big>%s</big> reports in past week",
+ stats.new
+ )
+ : nget(
+ "<big>%s</big> report recently",
+ "<big>%s</big> reports recently",
+ stats.new
+ );
+
+ fixed_text = nget(
+ "<big>%s</big> fixed in past month",
+ "<big>%s</big> fixed in past month",
+ stats.fixed
+ );
+
+ updates_text = nget(
+ "<big>%s</big> update on reports",
+ "<big>%s</big> updates on reports",
+ stats.updates
+ );
+
+%]
+
+<div id="front_stats">
+ <div>[% tprintf( new_text, stats.new ) | comma %]</div>
+ <div>[% tprintf( fixed_text, stats.fixed ) | comma %]</div>
+ [% IF c.cobrand.moniker != 'zurich' %]
+ <div>[% tprintf( updates_text, stats.updates ) | comma %]</div>
+ [% END %]
+</div>