aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/layouts/default.rhtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/layouts/default.rhtml')
-rw-r--r--app/views/layouts/default.rhtml96
1 files changed, 31 insertions, 65 deletions
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index 606203f06..be302103a 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html lang="en-gb">
+<html lang="<%= I18n.locale %>">
<head>
<script type="text/javascript" src="/jslib/spell/spellChecker.js"></script>
@@ -12,9 +12,9 @@
<title>
<% if @title %>
- <%=@title%> - WhatDoTheyKnow
+ <%=@title%> - <%= site_name %>
<% else %>
- WhatDoTheyKnow - make and browse Freedom of Information (FOI) requests
+ <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %>
<% end %>
</title>
@@ -23,7 +23,12 @@
<%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %>
<!--[if LT IE 7]>
<style type="text/css">@import url("/stylesheets/ie6.css");</style>
- <![endif]-->
+ <![endif]-->
+ <!--[if LT IE 7]>
+ <style type="text/css">@import url("/stylesheets/ie6-custom.css");</style>
+ <![endif]-->
+ <%= stylesheet_link_tag 'main-custom', :title => "Main", :rel => "stylesheet" %>
+ <link href="http://127.0.0.1:3000/custom.css" media="screen" rel="stylesheet" type="text/css">
<% if @feed_autodetect %>
<% for feed in @feed_autodetect %>
@@ -68,33 +73,7 @@
=begin
<div id="everypage" class="jshide">
<p style="float:right"><a href="#top" onclick="$.cookie('seen_foi2', 1, { expires: 7, path: '/' }); $('#everypage').hide('slow'); return false;">Close</a></p>
- <h2>Blimey. It looks like the Internets won &ndash; <small>a message from WhatDoTheyKnow</small></h2>
- <p>Sorry to interrupt, but we thought you&rsquo;d like to know that <strong>you won</strong>!
- <p>On the 16th of May 2008 the High Court ruled that MPs&rsquo; expenses must be published under the Freedom of Information Act.
-
- <p>Tomorrow, MPs <strong>were</strong> going to vote on changing the law to keep their expenses secret after all,
- just before publication was due and after spending nearly a million of your pounds and seven months
- compiling the data.
-
- <p>However, after a <strong>tremendous response</strong> from you, with over 7,000 members
- on our Facebook group, 4,000 messages sent to MPs, help from
-
- <a href="http://twitter.com/stephenfry/statuses/1136046150">Stephen Fry</a>, and a helpful
- <a href="http://www.publications.parliament.uk/pa/ld200809/ldselect/ldmerit/16/1603.htm">4th Report of the House of Lords
- Merits of Statutory Instruments Committee</a>,
- it appears that the vote has been cancelled &ndash;
- <a href="http://www.guardian.co.uk/politics/2009/jan/21/mps-expenses">Guardian</a>,
- <a href="http://www.timesonline.co.uk/tol/news/politics/article5559704.ece">Times</a>,
- <a href="http://news.bbc.co.uk/1/hi/uk_politics/7842402.stm">BBC</a>.
-
- <p>As President Obama said in his inauguration speech: <em>&ldquo;And
- those of us who manage the public&rsquo;s dollars will be held to account &ndash; to
- spend wisely, reform bad habits, and do our business in the light of day &ndash;
-
- because only then can we restore the vital trust between a people and their
- government.&rdquo;</em></p>
-
- <p>Read <a href="http://www.mysociety.org/2009/01/21/blimey-it-looks-like-the-internets-won/">our victory blog post</a>. :-)
+ [ message goes here ]
<p style="text-align: right"><a href="#top" onclick="$.cookie('seen_foi2', 1, { expires: 7, path: '/' }); $('#everypage').hide('slow'); return false;">Close</a></p>
</div>
=end
@@ -104,41 +83,45 @@
</div>
<div id="header">
<h1>
- <a href="/">WhatDoTheyKnow?</a>
+ <%= link_to site_name, frontpage_url %>
</h1>
<div id="tagline">
- Make and explore Freedom of Information requests
+ <%= _('Make and explore Freedom of Information requests') %>
</div>
+ <%= render :partial => 'general/locale_switcher' %>
+
</div>
- <div id="mysoclogo">
- <a href="http://www.mysociety.org">a site by mysociety.org</a>
+ <div id="orglogo">
+ <%= render :partial => 'general/orglink' %>
</div>
+
<div id="navigation_search">
<% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "navigation_search_form"}) do %>
<p>
<%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %>
- <%= submit_tag "Search" %>
+ <%= submit_tag _("Search") %>
</p>
<% end %>
</div>
<div id="topnav">
<ul id="navigation">
- <li><%= link_to "Make request", frontpage_url %></li>
- <li><%= link_to "View requests", request_list_url(:view => 'successful') %></li>
- <li><%= link_to "View authorities", list_public_bodies_default %></li>
+ <li><%= link_to _("Make request"), frontpage_url %></li>
+ <li><%= link_to _("View requests"), request_list_successful_url %></li>
+ <li><%= link_to _("View authorities"), list_public_bodies_default %></li>
<% if @user %>
- <li><%=link_to "My requests", user_url(@user) %></li>
+ <li><%=link_to _("My requests"), user_url(@user) %></li>
<% end %>
- <li><%= link_to "Read blog", blog_url %></li>
- <li><%= link_to "Help", about_url %></li>
+ <li><%= link_to _("Read blog"), blog_url %></li>
+ <li><%= link_to _("Help"), help_about_url %></li>
</ul>
<% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
<div id="logged_in_bar">
<% if @user %>
- Hello, <%=h(@user.name)%>!
- (<%= link_to "Sign out", signout_url(:r => request.request_uri) %>)
+ <%= _('Hello, {{username}}!', :username => h(@user.name))%>
+ (<%= link_to _("Sign out"), signout_url(:r => request.request_uri) %>)
<% else %>
- Hello! (<%= link_to "Sign in or sign up", signin_url(:r => request.request_uri) %>)
+ <%= _('Hello!') %>
+ (<%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %>)
<% end %>
</div>
<% end %>
@@ -161,28 +144,11 @@
</div>
<div id="footer">
- <a href="/help/contact">Contact WhatDoTheyKnow</a>
- |
- Built by <a href="http://www.mysociety.org/">mySociety</a> ...
- <a href="/help/credits#helpus">and you</a>
- |
- Dedicated to <a href="http://mk.ucant.org/archives/000129.html">Chris Lightfoot</a>
+ <%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_url %>
+ <%= render :partial => 'general/credits' %>
</div>
-<% 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 %>
+ <%= render :partial => 'general/before_body_end' %>
</body>
</html>