aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/front
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-17 22:09:22 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-17 22:09:22 +0100
commit4324fbc7a336b281e491c46bc665a965e852040e (patch)
tree667a9901fb0adfa791ddb21770d66924c9bc4afc /templates/web/default/front
parent76b34e2176dc9b02259c62209c6c23a8a7e69c23 (diff)
Implement Fiksgatami's norwegian_frontpage branch in Catalyst templates.
Diffstat (limited to 'templates/web/default/front')
-rw-r--r--templates/web/default/front/news.html11
-rw-r--r--templates/web/default/front/stats.html46
2 files changed, 57 insertions, 0 deletions
diff --git a/templates/web/default/front/news.html b/templates/web/default/front/news.html
new file mode 100644
index 000000000..080034a28
--- /dev/null
+++ b/templates/web/default/front/news.html
@@ -0,0 +1,11 @@
+[%#
+ news = [
+ { date = '2008-12-11', text = '<a href="' _ c.config.IPHONE_URL _ '">' _ loc('Get FixMyStreet on your iPhone') _ '</a>' },
+ ]
+%]
+[% FOREACH item IN news %]
+ <p align="center" style="margin-bottom:0">
+ <img width="23" height="12" alt="[% loc('New!') %]" src="/i/new.png" border="0">[% item.date %] [% item.text %]</p>
+ </p>
+[% END %]
+
diff --git a/templates/web/default/front/stats.html b/templates/web/default/front/stats.html
new file mode 100644
index 000000000..4b98ef31e
--- /dev/null
+++ b/templates/web/default/front/stats.html
@@ -0,0 +1,46 @@
+[%
+ USE Comma;
+ # Note - if we want to i18n the commas we should try
+ # 'Template::Plugin::Number::Format'
+%]
+
+<h2>[% loc('FixMyStreet updates') %]</h2>
+
+[%
+ 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>
+ [% IF c.cobrand.moniker != 'emptyhomes' %]
+ <div>[% tprintf( fixed_text, stats.fixed ) | comma %]</div>
+ [% END %]
+ <div>[% tprintf( updates_text, stats.updates ) | comma %]</div>
+</div>
+