]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user_blocks/show.html.erb
Use a current_user helper for accessing the logged in user in all views.
[rails.git] / app / views / user_blocks / show.html.erb
index ccd6df06faf5b3bccee26756f5175f69cf6d7c48..cc0caa6f3f2d44590c0e39d5e83e4a517d00b60c 100644 (file)
                                      {:controller => 'user', :action => 'view', :display_name => @user_block.creator.display_name})) %></h1>
 <ul class='secondary-actions clearfix'>
   <% 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 %>
       <li><%= link_to t('user_block.show.edit'), edit_user_block_path(@user_block) %></li>
     <% end %>
-    <% if @user and @user.moderator? %>
+    <% if current_user and current_user.moderator? %>
       <li><%= link_to(t('user_block.show.revoke'),{:controller => 'user_blocks', :action => 'revoke', :id => @user_block.id}) %></li>
     <% end %>
   <% end %>