diff options
Diffstat (limited to 'app/views/user')
-rw-r--r-- | app/views/user/_show_user_info.rhtml | 20 | ||||
-rw-r--r-- | app/views/user/contact.rhtml | 12 | ||||
-rw-r--r-- | app/views/user/set_crop_profile_photo.rhtml | 6 | ||||
-rw-r--r-- | app/views/user/set_draft_profile_photo.rhtml | 8 | ||||
-rw-r--r-- | app/views/user/show.rhtml | 44 |
5 files changed, 45 insertions, 45 deletions
diff --git a/app/views/user/_show_user_info.rhtml b/app/views/user/_show_user_info.rhtml new file mode 100644 index 000000000..5dfecee1e --- /dev/null +++ b/app/views/user/_show_user_info.rhtml @@ -0,0 +1,20 @@ + + <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %> + <div class="user_about_me"> + <img class="comment_quote" src="/images/quote.png" alt=""> + <%= @display_user.get_about_me_for_html_display %> + <% if @is_you %> + (<%= link_to _("edit text about you"), set_profile_about_me_url() %>) + <% end %> + </div> + <% end %> + + <% if @is_you %> + <p id="user_change_password_email"> + <% if @display_user.profile_photo %> + <%= link_to _('Change profile photo'), set_profile_photo_url() %> | + <% end %> + <%= link_to _('Change your password'), signchangepassword_url() %> | + <%= link_to _('Change your email'), signchangeemail_url() %> + </p> + <% end %> diff --git a/app/views/user/contact.rhtml b/app/views/user/contact.rhtml index 4bbb15789..333b72334 100644 --- a/app/views/user/contact.rhtml +++ b/app/views/user/contact.rhtml @@ -9,21 +9,21 @@ <% form_for :contact do |f| %> <div class="form_note"> - <h1>Contact <%=h @recipient_user.name%></h1> + <h1><%= _("Contact {{recipient}}", :recipient => h(@recipient_user.name)) %></h1> </div> <p> - <label class="form_label">From:</label> + <label class="form_label"><%= _("From") %>:</label> <%= h(@user.name_and_email) %> </p> <p> - <label class="form_label" for="contact_subject">Subject:</label> + <label class="form_label" for="contact_subject"><%= _("Subject") %>:</label> <%= f.text_field :subject, :size => 50 %> </p> <p> - <label class="form_label" for="contact_message">Message:</label> + <label class="form_label" for="contact_message"><%= _("Message") %>:</label> <%= f.text_area :message, :rows => 10, :cols => 50 %> </p> @@ -39,9 +39,7 @@ <div class="form_button"> <%= hidden_field_tag(:submitted_contact_form, { :value => 1 } ) %> - <%= submit_tag "Send message" %> + <%= submit_tag _("Send message") %> </div> <% end %> - - diff --git a/app/views/user/set_crop_profile_photo.rhtml b/app/views/user/set_crop_profile_photo.rhtml index db18d10a1..eed0304d2 100644 --- a/app/views/user/set_crop_profile_photo.rhtml +++ b/app/views/user/set_crop_profile_photo.rhtml @@ -20,7 +20,7 @@ <div style="width:96px;height:96px;overflow:hidden;"> <img src="<%= get_draft_profile_photo_url(:id => @draft_profile_photo.id) %>" id="profile_photo_preview" /> </div> - + </td> </tr> </table> @@ -32,12 +32,12 @@ <%= hidden_field_tag 'draft_profile_photo_id', @draft_profile_photo.id %> - <p><%= _('<strong>Privacy note:</strong> Your photo will be shown in public on the Internet, + <p><%= _('<strong>Privacy note:</strong> Your photo will be shown in public on the Internet, wherever you do something on {{site_name}}.', :site_name=>site_name)%> <p> <%= hidden_field_tag 'submitted_crop_profile_photo', 1 %> - <%= submit_tag "Done >>" %> + <%= submit_tag _("Done") + " >>" %> </p> <% end %> diff --git a/app/views/user/set_draft_profile_photo.rhtml b/app/views/user/set_draft_profile_photo.rhtml index 90be49600..b3faba7fc 100644 --- a/app/views/user/set_draft_profile_photo.rhtml +++ b/app/views/user/set_draft_profile_photo.rhtml @@ -10,12 +10,12 @@ <% form_tag 'set_photo', :id => 'set_draft_profile_photo_form', :multipart => true do %> <p> - <label class="form_label" for="file_1"><%= _('Photo of you:')%></label> + <label class="form_label" for="file_1"><%= _('Photo of you:')%></label> <%= file_field_tag :file, :size => 35, :id => 'file_1' %> </p> <ul> - <li><%= _('Your photo will be shown in public <strong>on the Internet</strong>, + <li><%= _('Your photo will be shown in public <strong>on the Internet</strong>, wherever you do something on {{site_name}}.', :site_name=>site_name)%> </li> @@ -36,7 +36,7 @@ <noscript> <div> <%= hidden_field_tag 'automatically_crop', 1 %> - <%= submit_tag "Done >>" %> + <%= submit_tag _("Done >>") %> </div> </noscript> <% end %> @@ -46,7 +46,7 @@ <h2><%= _('OR remove the existing photo')%></h2> <% form_tag 'clear_photo', :id => 'clear_profile_photo_form', :multipart => true do %> - <%= submit_tag "Clear photo" %> + <%= submit_tag _("Clear photo") %> <% end %> <% end %> diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml index d723196d3..12a9d3f74 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.rhtml @@ -1,14 +1,14 @@ <% if @show_requests %> - <% @title = h(@display_user.name) + _(" - Freedom of Information requests") %> + <% @title = _("{{user_name}} - Freedom of Information requests", :user_name => h(@display_user.name)) %> <% else %> - <% @title = h(@display_user.name) + _(" - user profile") %> + <% @title = _("{{user_name}} - user profile", :user_name => h(@display_user.name)) %> <% end %> <% if (@same_name_users.size >= 1) %> - <p><%= _('There is <strong>more than one person</strong> who uses this site and has this name. + <p><%= _('There is <strong>more than one person</strong> who uses this site and has this name. One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %> <%= user_link(@same_name_user) %> - <% end %> + <% end %> <% end%> <% if @show_profile && @is_you && @undescribed_requests.size > 0 %> @@ -40,11 +40,11 @@ <a href="#foi_requests"><%= _('FOI requests')%></a> <br><a href="#annotations"><%= _('Annotations')%></a> <% end %> - </div> + </div> <div class="header_left"> <p id="user_photo_on_profile"> - <% if @display_user.profile_photo %> + <% if @display_user.profile_photo %> <% if @is_you %> <a href="<%= set_profile_photo_url() %>"> <% end %> @@ -93,25 +93,7 @@ </div> <% end %> - <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %> - <div class="user_about_me"> - <img class="comment_quote" src="/images/quote.png" alt=""> - <%= @display_user.get_about_me_for_html_display %> - <% if @is_you %> - (<%= link_to _("edit text about you"), set_profile_about_me_url() %>) - <% end %> - </div> - <% end %> - - <% if @is_you %> - <p id="user_change_password_email"> - <% if @display_user.profile_photo %> - <%= link_to _('Change profile photo'), set_profile_photo_url() %> | - <% end %> - <%= link_to _('Change your password'), signchangepassword_url() %> | - <%= link_to _('Change your email'), signchangeemail_url() %> - </p> - <% end %> + <%= render :partial => 'user/show_user_info' %> <% if not @is_you %> <p id="user_not_logged_in"> @@ -127,7 +109,7 @@ <div id="user_profile_search"> <% form_tag(show_user_url, :method => "get", :id=>"search_form") do %> <div> - <%= text_field_tag(:user_query, params[:user_query]) %> + <%= text_field_tag(:user_query, params[:user_query]) %> <% if @is_you %> <%= submit_tag(_("Search your contributions")) %> <% else %> @@ -146,7 +128,7 @@ <% end %> <% else %> <h2 class="foi_results" id="foi_requests"> - <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.matches_estimated.to_s) % @xapian_requests.matches_estimated.to_s : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @xapian_requests.matches_estimated.to_s) % @xapian_requests.matches_estimated %> + <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.matches_estimated) % @xapian_requests.matches_estimated.to_s : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @xapian_requests.matches_estimated) % @xapian_requests.matches_estimated %> <!-- matches_estimated <%=@xapian_requests.matches_estimated%> --> <%= @match_phrase %> <%= @page_desc %> @@ -159,12 +141,12 @@ <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.info_requests.size) %> <% end %> - <% else %> + <% else %> <% if @show_requests %> <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 %> - <% end %> + <% end %> <% if !@xapian_comments.nil? %> <% if @xapian_comments.results.empty? %> @@ -221,7 +203,7 @@ <%= hidden_field_tag 'r', request.request_uri %> <% if track_things.size > 1 %> <%= submit_tag _('unsubscribe all')%> - <% end %> + <% end %> </h3> <% end %> <% end %> @@ -231,7 +213,7 @@ <li> <% form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %> <div> - <%= track_thing.params[:list_description] %> + <%= track_thing.params[:list_description] %> <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %> <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %> <%= submit_tag _('unsubscribe') %> |