aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/user
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/user')
-rw-r--r--app/views/user/_signin.rhtml7
-rw-r--r--app/views/user/_signup.rhtml5
-rw-r--r--app/views/user/set_draft_profile_photo.rhtml4
-rw-r--r--app/views/user/show.rhtml69
-rw-r--r--app/views/user/sign.rhtml23
-rw-r--r--app/views/user/signin_successful.rhtml11
-rw-r--r--app/views/user/wrong_user.rhtml6
7 files changed, 80 insertions, 45 deletions
diff --git a/app/views/user/_signin.rhtml b/app/views/user/_signin.rhtml
index 79628b3a9..4fe98ee41 100644
--- a/app/views/user/_signin.rhtml
+++ b/app/views/user/_signin.rhtml
@@ -3,9 +3,9 @@
<% form_tag({:action => "signin"}, {:id => "signin_form"}) do %>
<%= foi_error_messages_for :user_signin %>
- <% if not sign_in_as_existing_user %>
+ <!--<% if not sign_in_as_existing_user %>
<h2><%= _('If you\'ve used {{site_name}} before', :site_name=>site_name)%></h2>
- <% end %>
+ <% end %>-->
<p>
<label class="form_label" for="user_signin_email"><%= _('Your e-mail:')%></label>
@@ -27,7 +27,8 @@
do not use on a public computer) ')%></p>
<div class="form_button">
- <%= hidden_field_tag 'token', params[:token], { :id => 'signin_token' } %>
+ <%= hidden_field_tag 'token', params[:token], {:id => 'signin_token' } %>
+ <%= hidden_field_tag :modal, params[:modal], {:id => 'signin_modal' } %>
<%= submit_tag _('Sign in') %>
</div>
<% end %>
diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml
index 210643a40..9c0132f26 100644
--- a/app/views/user/_signup.rhtml
+++ b/app/views/user/_signup.rhtml
@@ -3,7 +3,7 @@
<% form_tag({:action => "signup"}, {:id => "signup_form"}) do %>
<%= foi_error_messages_for :user_signup %>
- <h2><%= _('If you\'re new to {{site_name}}', :site_name=>site_name)%></h2>
+ <!--<h2><%= _('If you\'re new to {{site_name}}', :site_name=>site_name)%></h2>-->
<p>
<label class="form_label" for="user_signup_email"><%= _('Your e-mail:')%></label>
@@ -41,7 +41,8 @@
<% end %>
<div class="form_button">
- <%= hidden_field_tag 'token', params[:token], { :id => 'signup_token' } %>
+ <%= hidden_field_tag 'token', params[:token], {:id => 'signup_token' } %>
+ <%= hidden_field_tag :modal, params[:modal], {:id => 'signup_modal' } %>
<%= submit_tag _('Sign up') %>
</div>
diff --git a/app/views/user/set_draft_profile_photo.rhtml b/app/views/user/set_draft_profile_photo.rhtml
index 70d27074b..90be49600 100644
--- a/app/views/user/set_draft_profile_photo.rhtml
+++ b/app/views/user/set_draft_profile_photo.rhtml
@@ -2,7 +2,7 @@
<% raise "internal error" if not @user %>
-<h2>Choose your profile photo</h2>
+<h2><%= _("Choose your profile photo") %></h2>
<%= foi_error_messages_for :draft_profile_photo %>
@@ -52,7 +52,7 @@
<% end %>
<p>
- <%= link_to h("Cancel, return to your profile page"), user_url(@user) %>
+ <%= link_to _("Cancel, return to your profile page"), user_url(@user) %>
</p>
</div>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 8fd6c52ad..2ae6e5ed5 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -24,20 +24,20 @@
</div>
<% end %>
-
-<div id="request_sidebar">
- <h2><%= _('Track this person')%></h2>
- <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %>
-
- <h2><%= _('On this page')%></h2>
- <a href="#foi_requests"><%= _('FOI requests')%></a>
- <br><a href="#annotations"><%= _('Annotations')%></a>
- <% if @is_you %>
- <br><a href="#email_subscriptions"><%= _('Email subscriptions')%></a>
- <% end %>
-</div>
-
-<div class="single_user">
+<div>
+ <div id="header_right">
+ <h2><%= _('Track this person')%></h2>
+ <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %>
+
+ <h2><%= _('On this page')%></h2>
+ <a href="#foi_requests"><%= _('FOI requests')%></a>
+ <br><a href="#annotations"><%= _('Annotations')%></a>
+ <% if @is_you %>
+ <br><a href="#email_subscriptions"><%= _('Email subscriptions')%></a>
+ <% end %>
+ </div>
+
+ <div class="header_left">
<p id="user_photo_on_profile">
<% if @display_user.profile_photo %>
<% if @is_you %>
@@ -113,19 +113,37 @@
<%= _('<a href="%s">Sign in</a> to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.request_uri)]%>
</p>
<% end %>
+ </div>
+</div>
+<div style="clear:both"></div>
+ <% form_tag(show_user_url, :method => "get", :id=>"search_form") do %>
+ <div>
+ <%= text_field_tag(:user_query, params[:user_query]) %>
+ <% if @is_you %>
+ <%= submit_tag(_("Search your contributions")) %>
+ <% else %>
+ <%= submit_tag(_("Search contributions by this person")) %>
+ <% end %>
+ </div>
+ <% end %>
+
<% if !@xapian_requests.nil? %>
<% if @xapian_requests.results.empty? %>
<% if @page == 1 %>
- <h2 id="foi_requests"><%= @is_you ? 'Freedom of Information requests made by you' : 'Freedom of Information requests made by this person' %> </h2>
+ <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 %>
<% end %>
<% else %>
- <h2 id="foi_requests">
- <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @display_user.info_requests.size) % @display_user.info_requests.size : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @display_user.info_requests.size) % @display_user.info_requests.size %>
+ <h2 class="foi_results" id="foi_requests">
+ <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.results.size) % @xapian_requests.results.size : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @xapian_requests.results.size) % @xapian_requests.results.size %>
<!-- matches_estimated <%=@xapian_requests.matches_estimated%> -->
- <%= @page_desc %>
+ <%= @match_phrase %>
+ <%= @page_desc %>
</h2>
+
<% for result in @xapian_requests.results %>
<%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
@@ -134,14 +152,16 @@
<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.info_requests.size) %>
<% end %>
<% else %>
- <h2 id="foi_requests"><%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %> </h2>
+ <h2 class="foi_results" id="foi_requests"><%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %> </h2>
<p><%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests this person has made.')%></p>
<% end %>
<% if !@xapian_comments.nil? %>
<% if @xapian_comments.results.empty? %>
<% if @page == 1 %>
- <h2><%= @is_you ? _('Your annotations') : _('This person\'s annotations') %></h2>
+ <h2><%= @is_you ? _('Your annotations') : _('This person\'s annotations') %>
+ <%= @match_phrase %>
+ </h2>
<p><%= _('None made.')%></p>
<% end %>
<% else %>
@@ -166,7 +186,7 @@
<% 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' do %>
+ <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>
<h3>
<%=TrackThing.track_type_description(@track_things[0].track_type)%>
<%= hidden_field_tag 'track_type', @track_things[0].track_type %>
@@ -180,7 +200,7 @@
<% end %>
<% for track_type, track_things in @track_things_grouped %>
<% if @track_things_grouped.size > 1 %>
- <% form_tag :controller => 'track', :action => 'delete_all_type' do %>
+ <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>
<h3>
<%=TrackThing.track_type_description(track_type)%>
<%= hidden_field_tag 'track_type', track_type %>
@@ -196,7 +216,7 @@
<ul>
<% for track_thing in track_things %>
<li>
- <% form_tag :controller => 'track', :action => 'update', :track_id => track_thing.id do %>
+ <% form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %>
<div>
<%= track_thing.params[:list_description] %>
<%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
@@ -210,6 +230,3 @@
<% end %>
<% end %>
<% end %>
-
-</div>
-
diff --git a/app/views/user/sign.rhtml b/app/views/user/sign.rhtml
index b76edbc64..afdb90162 100644
--- a/app/views/user/sign.rhtml
+++ b/app/views/user/sign.rhtml
@@ -1,5 +1,5 @@
<% if @post_redirect.reason_params[:user_name] %>
- <% @title = "Sign in" %>
+ <% @title = _("Sign in") %>
<div id="sign_alone">
@@ -21,17 +21,26 @@
<div id="sign_together">
- <p id="sign_in_reason">
+ <!--<p id="sign_in_reason">
<% if @post_redirect.reason_params[:web].empty? %>
<%= _(' Please sign in or make a new account.') %>
<% else %>
<%= @post_redirect.reason_params[:web] %>, <%= _('please sign in or make a new account.') %>
<% end %>
- </p>
-
- <%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => false } %>
- <%= render :partial => 'signup' %>
-
+ </p>-->
+
+ <div id="left_half">
+ <h1><%= _('Sign in') %></h1>
+ <%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => false } %>
+ </div>
+ <div id="middle_strip">
+ <%= _('- or -') %>
+ </div>
+ <div id="right_half">
+ <h1><%= _('Sign up') %></h1>
+ <%= render :partial => 'signup' %>
+ </div>
+ <div style="clear:both"></div>
</div>
<% end %>
diff --git a/app/views/user/signin_successful.rhtml b/app/views/user/signin_successful.rhtml
new file mode 100644
index 000000000..675701d74
--- /dev/null
+++ b/app/views/user/signin_successful.rhtml
@@ -0,0 +1,11 @@
+<div id="signin-successful">
+ <%= _("You're in. <a href=\"#\" id=\"send-request\">Continue sending your request</a>") %>
+</div>
+
+<script type="text/javascript">
+ parent.modal_signin_successful = true;
+
+ $("#send-request").click(function() {
+ parent.$.fancybox.close(); return false;
+ });
+</script>
diff --git a/app/views/user/wrong_user.rhtml b/app/views/user/wrong_user.rhtml
index 9878d08ae..30256a639 100644
--- a/app/views/user/wrong_user.rhtml
+++ b/app/views/user/wrong_user.rhtml
@@ -1,8 +1,4 @@
-
<p id="sign_in_reason">
-<%= @reason_params[:web] %>, please
-<%= link_to _('sign out'), signout_url(:r => request.request_uri) %>,
-<%= _('and sign in as ')%><%= h(@reason_params[:user_name]) %>.
+<%= _('Sorry, but only {{user_name}} is allowed to do that.', :user_name => h(@reason_params[:user_name])) %>
</p>
-