aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-08-05 15:27:11 +0100
committerDave Arter <davea@mysociety.org>2019-08-16 14:25:12 +0100
commitef3706c69bbc0a9063570d29bdd615e531fa5a46 (patch)
treead5df00dd5823b2dbf5b4b76510dc884a0087577
parent7f15307a12d7e460fc55d23aedce82e2bdce4177 (diff)
[Westminster] Remove stat from front page.
-rw-r--r--templates/web/westminster/front/stats.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/templates/web/westminster/front/stats.html b/templates/web/westminster/front/stats.html
new file mode 100644
index 000000000..d4e60f634
--- /dev/null
+++ b/templates/web/westminster/front/stats.html
@@ -0,0 +1,32 @@
+[% USE 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
+ );
+
+ updates_text = nget(
+ "<big>%s</big> update on reports",
+ "<big>%s</big> updates on reports",
+ stats.updates
+ );
+
+ new_n = stats.new | format_number;
+ updates_n = stats.updates | format_number;
+%]
+
+<div id="front_stats">
+ <div>[% tprintf( new_text, decode(new_n) ) %]</div>
+ <div>[% tprintf( updates_text, decode(updates_n) ) %]</div>
+</div>