Shows flag actions div only if user can hide

This commit is contained in:
decabeza
2018-06-11 18:36:52 +02:00
parent abf0fe992e
commit 8900b1ffce

View File

@@ -1,4 +1,5 @@
<div class="reply"> <% if can? :hide, (notification || notification.author) %>
<div class="reply">
<span class='js-moderation-actions'> <span class='js-moderation-actions'>
<% if can? :hide, notification %> <% if can? :hide, notification %>
<%= link_to t("admin.actions.hide").capitalize, hide_moderation_proposal_notification_path(notification), <%= link_to t("admin.actions.hide").capitalize, hide_moderation_proposal_notification_path(notification),
@@ -11,4 +12,5 @@
method: :put, data: { confirm: t('admin.actions.confirm') } %> method: :put, data: { confirm: t('admin.actions.confirm') } %>
<% end %> <% end %>
</span> </span>
</div> </div>
<% end %>