X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3d7eb387a7c3573f1a1d17df00adcaa1fb9b9fa5..7dbf8d83369cb73929080c4ba23fdd7dcd0184df:/app/views/user_blocks/show.html.erb
diff --git a/app/views/user_blocks/show.html.erb b/app/views/user_blocks/show.html.erb
index 73b26b930..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,11 +26,13 @@
<% 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 %>
+<%= t'user_block.show.created' %>: <%= raw t'user_block.show.ago', :time => friendly_date(@user_block.created_at) %>
+
<%= t'user_block.show.status' %>: <%= block_status(@user_block) %>
<%= t'user_block.show.reason' %>
-<%= @user_block.reason.to_html %>
\ No newline at end of file
+<%= @user_block.reason.to_html %>