mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:19:52 +01:00
Apply review suggestions
Co-authored-by: Andreas Nedbal <git@pixelde.su> Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
parent
92a5095c00
commit
2d01d9b365
4 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,7 @@ class Ajax::AnonymousBlockController < AjaxController
|
|||
|
||||
question = Question.find(params[:question])
|
||||
|
||||
raise Errors::Forbidden if params[:global] && !current_user.has_role?(:moderator)
|
||||
raise Errors::Forbidden if params[:global] && !current_user.mod?
|
||||
|
||||
AnonymousBlock.create!(
|
||||
user: params[:global] ? nil : current_user,
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
%a.dropdown-item{ href: "#", tabindex: -1, data: { action: "ab-question-report", q_id: a.question.id } }
|
||||
%i.fa.fa-exclamation-triangle
|
||||
= t("voc.report")
|
||||
- if current_user.has_role?(:moderator) && a.question.anonymous? && !a.question.generated?
|
||||
%a.dropdown-item{ name: "mod-block-anon", data: { q_id: a.question.id } }
|
||||
- if current_user.mod? && a.question.anonymous? && !a.question.generated?
|
||||
%a.dropdown-item{ href: "#", name: "mod-block-anon", data: { q_id: a.question.id } }
|
||||
%i.fa.fa-volume-off
|
||||
= t("voc.block_site_wide")
|
||||
- if current_user.has_role? :administrator
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
%a.dropdown-item{ name: "ib-report", data: { q_id: i.question.id } }
|
||||
%i.fa.fa-fw.fa-warning
|
||||
= t("voc.report")
|
||||
- if current_user.has_role?(:moderator) && i.question.anonymous? && !i.question.generated?
|
||||
- if current_user.mod? && i.question.anonymous? && !i.question.generated?
|
||||
%a.dropdown-item{ name: "mod-block-anon", data: { q_id: i.question.id } }
|
||||
%i.fa.fa-fw.fa-volume-off
|
||||
= t("voc.block_site_wide")
|
||||
|
|
|
@ -48,7 +48,7 @@ en:
|
|||
mod_mute:
|
||||
confirm:
|
||||
title: "Are you sure?"
|
||||
text: "This will block this user for everyone."
|
||||
text: "This will mute this user for everyone."
|
||||
report:
|
||||
confirm:
|
||||
title: "Are you sure you want to report this %{type}?"
|
||||
|
|
Loading…
Reference in a new issue