X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/49fc17c6b6f60eba8737fcde85bd679d1b6de8c1..fdffd22ccadda9c4ed2a4332de4c3b7c77bae012:/app/views/diary_entries/_diary_comment.html.erb diff --git a/app/views/diary_entries/_diary_comment.html.erb b/app/views/diary_entries/_diary_comment.html.erb index 9ee675343..25bdcd968 100644 --- a/app/views/diary_entries/_diary_comment.html.erb +++ b/app/views/diary_entries/_diary_comment.html.erb @@ -9,7 +9,11 @@
<%= diary_comment.body.to_html %>
<% if current_user && current_user.administrator? %> - <%= link_to t(".hide_link"), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %> + <% if diary_comment.visible? %> + <%= link_to t(".hide_link"), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %> + <% else %> + <%= link_to t(".unhide_link"), unhide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %> + <% end %> <% end %>