X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dd1ec4eb9bd23c2e7d93451b41f3eda99ffb9f08..e01df312b8fee6f67bf84b4c8293b57789b6fe2c:/app/views/user/account.html.erb
diff --git a/app/views/user/account.html.erb b/app/views/user/account.html.erb
index 64e5ed4bd..2782fc808 100644
--- a/app/views/user/account.html.erb
+++ b/app/views/user/account.html.erb
@@ -1,7 +1,10 @@
-
<%= t 'user.account.my settings' %>
-
-<%= link_to t('user.account.return to profile'), :controller => 'user', :action => 'view', :display_name => @user.display_name %> |
-<%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %>
+<% content_for :heading do %>
+ <%= t 'user.account.my settings' %>
+
+ - <%= link_to t('user.account.return to profile'), :controller => 'user', :action => 'view', :display_name => @user.display_name %>
+ - <%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %>
+
+<% end %>
<%= error_messages_for 'user' %>
<%= form_for :user, :html => { :multipart => true } do |f| %>
@@ -84,27 +87,37 @@
<%= t 'user.account.image' %>
|
-
- <% if @user.image.file? %>
-
-
- <%= user_image @user %> |
- <%= radio_button_tag "image_action", "keep", true %> |
- <%= t 'user.account.keep image' %> |
-
-
- <%= radio_button_tag "image_action", "delete" %> |
- <%= t 'user.account.delete image' %> |
-
-
- <%= radio_button_tag "image_action", "new" %> |
- <%= t 'user.account.replace image' %> <%= f.file_field :image, :onchange => "$('image_action_new').prop('checked', true)" %> <%= t 'user.account.image size hint' %> |
-
-
- <% else %>
- <%= hidden_field_tag "image_action", "new" %>
- <%= t 'user.account.new image' %> <%= f.file_field :image %> <%= t 'user.account.image size hint' %>
- <% end %>
+ |
+ <%= user_image @user %>
+
+ <% if @user.image.file? %>
+
+ <%= radio_button_tag "image_action", "keep", !@user.image_use_gravatar %> |
+ <%= t 'user.account.keep image' %> |
+
+ <% end %>
+ <% if @user.image.file? || @user.image_use_gravatar? %>
+
+ <%= radio_button_tag "image_action", "delete" %> |
+ <%= t 'user.account.delete image' %> |
+
+ <% end %>
+ <% if @user.image.file? %>
+
+ <%= radio_button_tag "image_action", "new" %> |
+ <%= t 'user.account.replace image' %> <%= f.file_field :image, :onchange => "$('#image_action_new').prop('checked', true)" %> <%= t 'user.account.image size hint' %> |
+
+ <% else %>
+
+ <%= radio_button_tag "image_action", "new" %> |
+ <%= t 'user.account.new image' %> <%= f.file_field :image, :onchange => "$('#image_action_new').prop('checked', true)" %> <%= t 'user.account.image size hint' %> |
+
+ <% end %>
+
+ <%= radio_button_tag "image_action", "gravatar", @user.image_use_gravatar %> |
+ <%= t 'user.account.gravatar.gravatar' %> (<%= t 'user.account.gravatar.link text' %>) |
+
+
|
@@ -120,23 +133,10 @@
<% content_for :head do %>
<%= javascript_include_tag "user" %>
<% end %>
- <%
- home = @user.home_lat && @user.home_lon
- data = {
- :lon => @user.home_lon || params['lon'] || 0,
- :lat => @user.home_lat || params['lat'] || 20,
- :zoom => home ? 12 : params['zoom'] || 1,
- :marker => !!home
- }
-
- if params[:scale].to_f > 0 then
- data[:zoom] = scale_to_zoom params[:scale]
- end
- %>
- <%= content_tag "div", "", :id => "map", :class => "user_map set_location", :data => data %>
+ <%= content_tag "div", "", :id => "map", :class => "content_map settings_map set_location" %>
-
+
|
<%= submit_tag t('user.account.save changes button') %> |
@@ -149,4 +149,4 @@
<%= t 'user.account.public editing note.heading' %>
<%= raw t 'user.account.public editing note.text' %>
<%= button_to t('user.account.make edits public button'), :action => :go_public %>
-<% end %>
+<% end %>
\ No newline at end of file