aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/user
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/user')
-rw-r--r--app/views/user/_change_receive_email.rhtml16
-rw-r--r--app/views/user/confirm.rhtml4
-rw-r--r--app/views/user/rate_limited.rhtml2
-rw-r--r--app/views/user/show.rhtml13
-rw-r--r--app/views/user/sign.rhtml5
-rw-r--r--app/views/user/wall.rhtml16
6 files changed, 46 insertions, 10 deletions
diff --git a/app/views/user/_change_receive_email.rhtml b/app/views/user/_change_receive_email.rhtml
new file mode 100644
index 000000000..83e5d8601
--- /dev/null
+++ b/app/views/user/_change_receive_email.rhtml
@@ -0,0 +1,16 @@
+<% form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %>
+ <div>
+ <% if @user.receive_email_alerts %>
+ <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %><br><br>
+ <%= hidden_field_tag 'receive_email_alerts', 'false' %>
+ <%= hidden_field_tag 'came_from', request.url %>
+ <%= submit_tag _("Turn off email alerts") %>
+ <% else %>
+ <%= _('Items matching the following conditions are currently displayed on your wall.') %><br><br>
+ <%= hidden_field_tag 'receive_email_alerts', 'true' %>
+ <%= hidden_field_tag 'came_from', request.url %>
+ <%= submit_tag _("Also send me alerts by email") %>
+ <% end %>
+ </div>
+<% end %>
+
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/rate_limited.rhtml b/app/views/user/rate_limited.rhtml
index 2a770d62e..d5accf114 100644
--- a/app/views/user/rate_limited.rhtml
+++ b/app/views/user/rate_limited.rhtml
@@ -1,4 +1,4 @@
-<% @title = "Too many requests" %>
+<% @title = _("Too many requests") %>
<h1><%=@title%></h1>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 8f1803442..d723196d3 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 %>
@@ -192,11 +192,12 @@
</div>
<% end %>
<% if @show_profile && @is_you %>
+ <h2 id="email_subscriptions"> <%= _("Things you're following")%></h2>
+ <%= render :partial => 'change_receive_email' %>
+ <br>
<% if @track_things.empty? %>
- <h2 id="email_subscriptions"> <%= _('Your email subscriptions')%></h2>
- <p><%= _('None made.')%></p>
+ <p><%= _("You're not following anything.")%></p>
<% else %>
- <h2 id="email_subscriptions"> Your <%=pluralize(@track_things.size, _('email subscription')) %> </h2>
<% if @track_things_grouped.size == 1 %>
<% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>
<h3>
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 } %>
diff --git a/app/views/user/wall.rhtml b/app/views/user/wall.rhtml
new file mode 100644
index 000000000..190cc0a6d
--- /dev/null
+++ b/app/views/user/wall.rhtml
@@ -0,0 +1,16 @@
+<% @title = h(@display_user.name) + _(" - wall") %>
+<% if @is_you %>
+<div class="medium_column">
+ <p><%= _('You can change the requests and users you are following on <a href="{{profile_url}}">your profile page</a>.', :profile_url => show_user_profile_path) %>
+ <%= render :partial => 'change_receive_email' %>
+</div>
+<% end %>
+<div id="user_profile_search">
+ <% if !@feed_results.nil? %>
+ <% for result in @feed_results %>
+ <%= render :partial => 'request/wall_listing', :locals => { :event => result, :info_request => result.info_request } %>
+ <% end %>
+ <% end %>
+
+
+</div>