X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9a9b045372a6f48420a9a6dacfde52c34ab7abce..7dbf8d83369cb73929080c4ba23fdd7dcd0184df:/app/views/user_blocks/show.html.erb?ds=sidebyside
diff --git a/app/views/user_blocks/show.html.erb b/app/views/user_blocks/show.html.erb
index ccd6df06f..51fbcaf49 100644
--- a/app/views/user_blocks/show.html.erb
+++ b/app/views/user_blocks/show.html.erb
@@ -6,16 +6,16 @@
<%= raw t('user_block.show.heading',
:block_on => link_to(
h(@user_block.user.display_name),
- {:controller => 'user', :action => 'view', :display_name => @user_block.user.display_name}),
+ user_path(@user_block.user)),
:block_by => link_to(
h(@user_block.creator.display_name),
- {:controller => 'user', :action => 'view', :display_name => @user_block.creator.display_name})) %>
+ user_path(@user_block.creator))) %>
<% 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 %>
@@ -26,7 +26,7 @@
<% if @user_block.revoker %>
<%= t'user_block.show.revoker' %>
- <%= link_to h(@user_block.revoker.display_name), :controller => 'user', :action => 'view', :display_name => @user_block.revoker.display_name %>
+ <%= link_to h(@user_block.revoker.display_name), user_path(@user_block.revoker) %>
<% end %>