Shows flag actions div only if user can hide
This commit is contained in:
@@ -1,14 +1,16 @@
|
|||||||
<div class="reply">
|
<% if can? :hide, (notification || notification.author) %>
|
||||||
<span class='js-moderation-actions'>
|
<div class="reply">
|
||||||
<% if can? :hide, notification %>
|
<span class='js-moderation-actions'>
|
||||||
<%= link_to t("admin.actions.hide").capitalize, hide_moderation_proposal_notification_path(notification),
|
<% if can? :hide, notification %>
|
||||||
method: :put, remote: true, data: { confirm: t('admin.actions.confirm') } %>
|
<%= link_to t("admin.actions.hide").capitalize, hide_moderation_proposal_notification_path(notification),
|
||||||
<% end %>
|
method: :put, remote: true, data: { confirm: t('admin.actions.confirm') } %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if can? :hide, notification.author %>
|
<% if can? :hide, notification.author %>
|
||||||
<span class="divider"> • </span>
|
<span class="divider"> • </span>
|
||||||
<%= link_to t("admin.actions.hide_author").capitalize, hide_moderation_user_path(notification.author_id),
|
<%= link_to t("admin.actions.hide_author").capitalize, hide_moderation_user_path(notification.author_id),
|
||||||
method: :put, data: { confirm: t('admin.actions.confirm') } %>
|
method: :put, data: { confirm: t('admin.actions.confirm') } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user