aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/general/search.rhtml3
-rw-r--r--app/views/layouts/default.rhtml14
-rw-r--r--app/views/request/show.rhtml4
-rw-r--r--app/views/user/confirm.rhtml4
-rw-r--r--app/views/user/show.rhtml6
-rw-r--r--app/views/user/sign.rhtml5
6 files changed, 27 insertions, 9 deletions
diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml
index 90ace809e..a1f8c8f04 100644
--- a/app/views/general/search.rhtml
+++ b/app/views/general/search.rhtml
@@ -131,8 +131,7 @@
</p>
<% end %>
</div> <!-- header left -->
-
-<% if @track_thing && (@xapian_bodies_hits > 0 || @xapian_users_hits > 0 || @total_hits == 0)%>
+<% if !@track_thing.nil? %>
<div id="header_right">
<h2><%= _('Track this search')%></h2>
<%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index f439b27d2..5f6d5c721 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -154,6 +154,20 @@
<br />
<input type="text">
</div>
+ <%
+ ga_code = MySociety::Config.get('GA_CODE', '')
+ unless ga_code.empty?
+ %>
+ <script>
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script>
+ var pageTracker = _gat._getTracker("<%=ga_code%>");
+ pageTracker._trackPageview();
+ </script>
+ <% end %>
+
</body>
</html>
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index c5d040fb7..611704ebe 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -1,4 +1,6 @@
-<% @title = "#{h(@info_request.title)} - a Freedom of Information request to #{h(@info_request.public_body.name)}" %>
+<% @title = _("{{title}} - a Freedom of Information request to {{public_body}}",
+ :title => h(@info_request.title),
+ :public_body => (@info_request.public_body.name)) %>
<% if @info_request.prominence == 'hidden' %>
<p id="hidden_request">
diff --git a/app/views/user/confirm.rhtml b/app/views/user/confirm.rhtml
index bdaf5c8e9..bc70a1f36 100644
--- a/app/views/user/confirm.rhtml
+++ b/app/views/user/confirm.rhtml
@@ -1,6 +1,6 @@
-<% @title = h("Now check your email!") %>
+<% @title = _("Now check your email!") %>
-<h1 class="confirmation_heading">Now check your email!</h1>
+<h1 class="confirmation_heading"><%= _("Now check your email!") %></h1>
<p class="confirmation_message">
<%= _('We\'ve sent you an email, and you\'ll need to click the link in it before you can
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 8f1803442..f8b820f03 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -1,7 +1,7 @@
<% if @show_requests %>
- <% @title = h(@display_user.name) + " - Freedom of Information requests" %>
+ <% @title = h(@display_user.name) + _(" - Freedom of Information requests") %>
<% else %>
- <% @title = h(@display_user.name) + " - user profile" %>
+ <% @title = h(@display_user.name) + _(" - user profile") %>
<% end %>
<% if (@same_name_users.size >= 1) %>
@@ -139,7 +139,7 @@
<% if !@xapian_requests.nil? %>
<% if @xapian_requests.results.empty? %>
<% if @page == 1 %>
- <h2 class="foi_results" id="foi_requests"><%= @is_you ? 'Freedom of Information requests made by you' : 'Freedom of Information requests made by this person' %> <%= @match_phrase %>
+ <h2 class="foi_results" id="foi_requests"><%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %> <%= @match_phrase %>
</h2>
<p><%= @is_you ? _('You have made no Freedom of Information requests using this site.') : _('This person has made no Freedom of Information requests using this site.') %>
<%= @page_desc %>
diff --git a/app/views/user/sign.rhtml b/app/views/user/sign.rhtml
index bfd0fa63e..4704ea95a 100644
--- a/app/views/user/sign.rhtml
+++ b/app/views/user/sign.rhtml
@@ -10,7 +10,10 @@
<%= @post_redirect.reason_params[:web] %>,
<%= _('please sign in as ')%><%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>.
<% end %>
- </p>
+ </p>
+ <% if @post_redirect.post_params["controller"] == "admin_general" %>
+ <p id="superuser_message">Don't have a superuser account yet? <%= link_to "Sign in as the emergency user", @post_redirect.uri + "?emergency=1" %></p>
+ <% end %>
<%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => true } %>