X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/bc39159a68284e995f88805ed6af2ab3408a4ed0..d66b4b3d2f379ed61ef2b33bb2b0507267827f98:/app/views/diary_entry/_diary_entry.html.erb
diff --git a/app/views/diary_entry/_diary_entry.html.erb b/app/views/diary_entry/_diary_entry.html.erb
index 802dd31f3..930f20e5e 100644
--- a/app/views/diary_entry/_diary_entry.html.erb
+++ b/app/views/diary_entry/_diary_entry.html.erb
@@ -27,12 +27,20 @@
<%= link_to t('.comment_count', :count => diary_entry.visible_comments.count), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %>
<% end %>
- <%= if_user(diary_entry.user, :li) do %>
- <%= link_to t('.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %>
+ <% if current_user && current_user == diary_entry.user %>
+ <%= link_to t('.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %>
<% end %>
- <%= if_administrator(:li) do %>
- <%= link_to t('.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('.confirm') } %>
+ <% if current_user and diary_entry.user != current_user %>
+
+ <%= report_link(t(".report"), diary_entry) %>
+
+ <% end %>
+
+ <% if current_user && current_user.administrator? %>
+
+ <%= link_to t('.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('.confirm') } %>
+
<% end %>