<%= content_tag "div", "", :id => "map", :class => "content_map settings_map set_location" %>
@@ -172,7 +172,7 @@
<%= submit_tag t('user.account.save changes button') %>
<% end %>
-<% unless @user.data_public? %>
+<% unless current_user.data_public? %>
<%= raw t 'user.account.public editing note.text' %>
diff --git a/app/views/user/api_read.builder b/app/views/user/api_read.builder
index 7136b9f58..0e8bfa5ef 100644
--- a/app/views/user/api_read.builder
+++ b/app/views/user/api_read.builder
@@ -4,7 +4,7 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
:display_name => @this_user.display_name,
:account_created => @this_user.creation_time.xmlschema do
xml.tag! "description", @this_user.description if @this_user.description
- if @user && @user == @this_user
+ if current_user && current_user == @this_user
xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?,
:pd => @this_user.consider_pd
else
@@ -28,7 +28,7 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
:active => @this_user.blocks_created.active.size
end
end
- if @user && @user == @this_user
+ if current_user && current_user == @this_user
if @this_user.home_lat && @this_user.home_lon
xml.tag! "home", :lat => @this_user.home_lat,
:lon => @this_user.home_lon,
diff --git a/app/views/user/reset_password.html.erb b/app/views/user/reset_password.html.erb
index d1718a5e4..4cb94374a 100644
--- a/app/views/user/reset_password.html.erb
+++ b/app/views/user/reset_password.html.erb
@@ -1,5 +1,5 @@
<% content_for :heading do %>
-
<% end %>
<%= error_messages_for :user %>
diff --git a/app/views/user/save.html.erb b/app/views/user/save.html.erb
index f8a80b26c..7134a167f 100644
--- a/app/views/user/save.html.erb
+++ b/app/views/user/save.html.erb
@@ -1 +1 @@
-<%= @user.email %>
+<%= current_user.email %>
diff --git a/app/views/user/view.html.erb b/app/views/user/view.html.erb
index 91f85f305..137a390ba 100644
--- a/app/views/user/view.html.erb
+++ b/app/views/user/view.html.erb
@@ -3,42 +3,42 @@
<%= user_image @this_user %>
- <% if @user and @user.administrator? -%>
+ <% if current_user and current_user.administrator? -%>
<%= t 'user.view.email address' %> <%= @this_user.email %>
<% unless @this_user.creation_ip.nil? -%>
@@ -171,10 +171,10 @@
<% end %>
- <% if @user and @this_user.id == @user.id %>
+ <% if current_user and @this_user.id == current_user.id %>
<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>
-
<%= raw(t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name)) %>
+
<%= raw(t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => current_user.display_name)) %>
<% else %>
<% content_for :head do %>
@@ -182,10 +182,10 @@
<% end %>
<%
user_data = {
- :lon => @user.home_lon,
- :lat => @user.home_lat,
+ :lon => current_user.home_lon,
+ :lat => current_user.home_lat,
:icon => image_path("marker-red.png"),
- :description => render(:partial => "popup", :object => @user, :locals => {:type => "your location"})
+ :description => render(:partial => "popup", :object => current_user, :locals => {:type => "your location"})
}
%>
<%= content_tag "div", "", :id => "map", :class => "content_map", :data => {:user => user_data} %>
diff --git a/app/views/user_blocks/_block.html.erb b/app/views/user_blocks/_block.html.erb
index 362cfd107..501ae92d0 100644
--- a/app/views/user_blocks/_block.html.erb
+++ b/app/views/user_blocks/_block.html.erb
@@ -17,7 +17,7 @@
<% end %>
<%= link_to t('user_block.partial.show'), block %> |
-
<% if @user and @user.id == block.creator_id and block.active? %><%= link_to t('user_block.partial.edit'), edit_user_block_path(block) %><% end %> |
+
<% if current_user and current_user.id == block.creator_id and block.active? %><%= link_to t('user_block.partial.edit'), edit_user_block_path(block) %><% end %> |
<% if show_revoke_link %>
<% if block.active? %><%= link_to t('user_block.partial.revoke'), :controller => 'user_blocks', :action => 'revoke', :id => block.id %><% end %> |
<% end %>
diff --git a/app/views/user_blocks/blocks_by.html.erb b/app/views/user_blocks/blocks_by.html.erb
index a8d761288..d2f888e7d 100644
--- a/app/views/user_blocks/blocks_by.html.erb
+++ b/app/views/user_blocks/blocks_by.html.erb
@@ -4,7 +4,7 @@
<% end %>
<% unless @user_blocks.empty? %>
-<%= render :partial => 'blocks', :locals => { :show_revoke_link => (@user and @user.moderator?), :show_user_name => true, :show_creator_name => false } %>
+<%= render :partial => 'blocks', :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => true, :show_creator_name => false } %>
<% else %>
<%= t "user_block.blocks_by.empty", :name => h(@this_user.display_name) %>
<% end %>
diff --git a/app/views/user_blocks/blocks_on.html.erb b/app/views/user_blocks/blocks_on.html.erb
index 8e91935ed..397335531 100644
--- a/app/views/user_blocks/blocks_on.html.erb
+++ b/app/views/user_blocks/blocks_on.html.erb
@@ -3,7 +3,7 @@
<%= raw(t('user_block.blocks_on.heading', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name}))) %>
<% end %>
<% unless @user_blocks.empty? %>
-<%= render :partial => 'blocks', :locals => { :show_revoke_link => (@user and @user.moderator?), :show_user_name => false, :show_creator_name => true } %>
+<%= render :partial => 'blocks', :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => false, :show_creator_name => true } %>
<% else %>
<%= t "user_block.blocks_on.empty", :name => h(@this_user.display_name) %>
<% end %>
diff --git a/app/views/user_blocks/index.html.erb b/app/views/user_blocks/index.html.erb
index 8cf7e81b7..ce7f12b91 100644
--- a/app/views/user_blocks/index.html.erb
+++ b/app/views/user_blocks/index.html.erb
@@ -4,7 +4,7 @@
<% end %>
<% unless @user_blocks.empty? %>
-<%= render :partial => 'blocks', :locals => { :show_revoke_link => (@user and @user.moderator?), :show_user_name => true, :show_creator_name => true } %>
+<%= render :partial => 'blocks', :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => true, :show_creator_name => true } %>
<% else %>
<%= t "user_block.index.empty" %>
<% end %>
diff --git a/app/views/user_blocks/show.html.erb b/app/views/user_blocks/show.html.erb
index ccd6df06f..cc0caa6f3 100644
--- a/app/views/user_blocks/show.html.erb
+++ b/app/views/user_blocks/show.html.erb
@@ -12,10 +12,10 @@
{:controller => 'user', :action => 'view', :display_name => @user_block.creator.display_name})) %>
<% if @user_block.ends_at > Time.now.getutc %>
- <% if @user and @user.id == @user_block.creator_id %>
+ <% if current_user and current_user.id == @user_block.creator_id %>
- <%= link_to t('user_block.show.edit'), edit_user_block_path(@user_block) %>
<% end %>
- <% if @user and @user.moderator? %>
+ <% if current_user and current_user.moderator? %>
- <%= link_to(t('user_block.show.revoke'),{:controller => 'user_blocks', :action => 'revoke', :id => @user_block.id}) %>
<% end %>
<% end %>
--
2.39.5