Merge remote-tracking branch 'upstream/pull/2226'

This commit is contained in:
Tom Hughes 2019-06-18 21:10:07 +01:00
commit 31edc7dff6
5 changed files with 33 additions and 12 deletions

View file

@ -7,7 +7,7 @@
</p>
<div class="richtext"><%= diary_comment.body.to_html %></div>
<% if current_user && current_user.administrator? %>
<% if can? :hidecomment, DiaryEntry %>
<span>
<% 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") } %>

View file

@ -37,7 +37,7 @@
</li>
<% end %>
<% if current_user && current_user.administrator? %>
<% if can? :hide, DiaryEntry %>
<li>
<% if diary_entry.visible %>
<%= 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") } %>