aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/general
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/general')
-rw-r--r--app/views/general/_before_body_end.rhtml17
-rw-r--r--app/views/general/_locale_switcher.rhtml6
-rw-r--r--app/views/general/blog.rhtml4
-rw-r--r--app/views/general/exception_caught.rhtml17
-rw-r--r--app/views/general/frontpage.rhtml10
5 files changed, 18 insertions, 36 deletions
diff --git a/app/views/general/_before_body_end.rhtml b/app/views/general/_before_body_end.rhtml
index 8d7ebeeb5..4374a3f28 100644
--- a/app/views/general/_before_body_end.rhtml
+++ b/app/views/general/_before_body_end.rhtml
@@ -1,16 +1 @@
-<% if MySociety::Config.get("DOMAIN", '127.0.0.1:3000') == 'www.whatdotheyknow.com' %>
-<!-- Piwik -->
-<script type="text/javascript">
-var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.mysociety.org/" : "http://piwik.mysociety.org/");
-document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
-</script><script type="text/javascript">
-try {
-var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 4);
-piwikTracker.trackPageView();
-piwikTracker.enableLinkTracking();
-} catch( err ) {}
-</script><noscript><p><img src="http://piwik.mysociety.org/piwik.php?idsite=4" style="border:0" alt=""/></p></noscript>
-<!-- End Piwik Tag -->
-<% end %>
-
-
+<!-- TO DO: add here Analytics Scripts (Google or something else) -->
diff --git a/app/views/general/_locale_switcher.rhtml b/app/views/general/_locale_switcher.rhtml
index 4f01a4d13..812256ccf 100644
--- a/app/views/general/_locale_switcher.rhtml
+++ b/app/views/general/_locale_switcher.rhtml
@@ -1,12 +1,12 @@
<% if FastGettext.default_available_locales.length > 1 %>
<div id="user_locale_switcher">
- Language:
<% for possible_locale in FastGettext.default_available_locales %>
<% if possible_locale == I18n.locale.to_s %>
- <%= possible_locale %>
+ <span class="active"><%= locale_name(possible_locale) %></span>
<% else %>
- <a href="<%= locale_switcher(possible_locale, params) %>"><%= possible_locale %></a>
+ <a href="<%= locale_switcher(possible_locale, params) %>"><%= locale_name(possible_locale) %></a>
<% end %>
<% end %>
</div>
<% end %>
+<br/>
diff --git a/app/views/general/blog.rhtml b/app/views/general/blog.rhtml
index cda1c5769..3f3abf42a 100644
--- a/app/views/general/blog.rhtml
+++ b/app/views/general/blog.rhtml
@@ -1,4 +1,4 @@
-<% @title = "WhatDoTheyKnow blog and tweets" %>
+<% @title = "WhatDoTheyKnow blog and tweets" %>
<div id="blog_sidebar">
<h1><img src="/images/twitter.png" alt=""> <a href="http://www.twitter.com/whatdotheyknow">Follow us on twitter</a></h1>
@@ -24,7 +24,7 @@
<div class="twitter_post">
<h2><a href="<%=item['link']%>">@whatdotheyknow on <%= simple_date(Time.parse(item['pubDate'][0])) %></a></h2>
<p><%=MySociety::Format.make_clickable(h(item['title'][0].sub("WhatDoTheyKnow: ", ""))) %></a></p>
- <div>
+ </div>
<% end %>
<% end %>
diff --git a/app/views/general/exception_caught.rhtml b/app/views/general/exception_caught.rhtml
index 44d5803de..ca36b592b 100644
--- a/app/views/general/exception_caught.rhtml
+++ b/app/views/general/exception_caught.rhtml
@@ -1,18 +1,17 @@
-<h1>Sorry, we couldn't find that page</h1>
+<h1><%= _("Sorry, we couldn't find that page") %></h1>
-<p>The page either doesn't exist, or is broken. Things you can try now:</p>
+<p><%= _("The page either doesn't exist, or is broken. Things you can try now:")%></p>
<ul>
-<li>Check for mistakes if you typed or copied the address.</li>
-<li>Search the site to find what you were looking for.
+<li><%= _("Check for mistakes if you typed or copied the address.")%></li>
+<li><%= _("Search the site to find what you were looking for.")%>
<% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "search_form"}) do %>
<%= text_field_tag 'query', params[:query], { :size => 30 } %>
- <%= submit_tag "Search" %>
+ <%= submit_tag _("Search") %>
<% end %>
</li>
-<li><a href="/help/contact">Contact us</a> to tell us about
- the problem</li>
-<li>Go to our <a href="/">front page</a></li>
+<li><%= _('<a href="%s">Contact us</a> to tell us about the problem</li>') % [help_contact_path] %>
+<li><%= _('Go to our <a href="%s">front page</a></li>') % ["/"] %>
</ul>
-<p id="error_technical_details"><strong>Technical details:</strong> <%=@exception_class ? @exception_class : "Unknown"%></p>
+<p id="error_technical_details"><%= _("<strong>Technical details:</strong>")%> <%=@exception_class ? @exception_class : _("Unknown")%></p>
diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml
index f412a6964..f1bee3ba1 100644
--- a/app/views/general/frontpage.rhtml
+++ b/app/views/general/frontpage.rhtml
@@ -1,4 +1,4 @@
-<% view_cache :ttl => 5.minutes do %>
+
<div id="frontpage_search">
<h1><%= _('Make or explore Freedom of Information requests') %></h1>
@@ -30,13 +30,11 @@
<div id="frontpage_examples">
<% if @popular_bodies.size > 0 %>
<div id="examples_0">
- <ul>
<% for popular_body in @popular_bodies %>
- <li><%=public_body_link(popular_body)%>
- <%= n_('%d request', '%d requests', popular_body.info_requests.count) % popular_body.info_requests.count %>
+ <li><%=public_body_link(popular_body)%>
+ <%= n_('%d request', '%d requests', popular_body.info_requests.count) % popular_body.info_requests.count %>
</li>
<% end%>
- </ul>
<p><strong>
<%= link_to _('More authorities...'), list_public_bodies_default %>
</strong></p>
@@ -57,4 +55,4 @@
<% end %>
</div>
-<% end %>
+