1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-01 00:08:21 +09:00

Add "disable" button to report screen (#9024)

* Add "disable" button to report screen

* i18n-tasks remove-unused
This commit is contained in:
Eugen Rochko 2018-10-20 02:39:39 +02:00 committed by GitHub
parent 369cc5f555
commit 9486f0ca77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 17 additions and 88 deletions

View File

@ -44,6 +44,14 @@ module Admin
when 'resolve'
@report.resolve!(current_account)
log_action :resolve, @report
when 'disable'
@report.resolve!(current_account)
@report.target_account.user.disable!
log_action :resolve, @report
log_action :disable, @report.target_account.user
resolve_all_target_account_reports
when 'silence'
@report.resolve!(current_account)
@report.target_account.update!(silenced: true)
@ -55,6 +63,7 @@ module Admin
else
raise ActiveRecord::RecordNotFound
end
@report.reload
end

View File

@ -106,7 +106,7 @@
- if @account.user&.otp_required_for_login?
= link_to t('admin.accounts.disable_two_factor_authentication'), admin_user_two_factor_authentication_path(@account.user.id), method: :delete, class: 'button' if can?(:disable_2fa, @account.user)
- unless @account.memorial?
= link_to t('admin.accounts.memorialize'), memorialize_admin_account_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button' if can?(:memorialize, @account)
= link_to t('admin.accounts.memorialize'), memorialize_admin_account_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button button--destructive' if can?(:memorialize, @account)
- else
= link_to t('admin.accounts.redownload'), redownload_admin_account_path(@account.id), method: :post, class: 'button' if can?(:redownload, @account)
@ -114,7 +114,7 @@
- if @account.silenced?
= link_to t('admin.accounts.undo_silenced'), admin_account_silence_path(@account.id), method: :delete, class: 'button' if can?(:unsilence, @account)
- else
= link_to t('admin.accounts.silence'), admin_account_silence_path(@account.id), method: :post, class: 'button' if can?(:silence, @account)
= link_to t('admin.accounts.silence'), admin_account_silence_path(@account.id), method: :post, class: 'button button--destructive' if can?(:silence, @account)
- if @account.local?
- unless @account.user_confirmed?
@ -123,7 +123,7 @@
- if @account.suspended?
= link_to t('admin.accounts.undo_suspension'), admin_account_suspension_path(@account.id), method: :delete, class: 'button' if can?(:unsuspend, @account)
- else
= link_to t('admin.accounts.perform_full_suspension'), new_admin_account_suspension_path(@account.id), class: 'button' if can?(:suspend, @account)
= link_to t('admin.accounts.perform_full_suspension'), new_admin_account_suspension_path(@account.id), class: 'button button--destructive' if can?(:suspend, @account)
- if !@account.local? && @account.hub_url.present?
%hr.spacer/

View File

@ -7,8 +7,10 @@
%div{ style: 'overflow: hidden; margin-bottom: 20px' }
- if @report.unresolved?
%div{ style: 'float: right' }
= link_to t('admin.reports.silence_account'), admin_report_path(@report, outcome: 'silence'), method: :put, class: 'button'
= link_to t('admin.reports.suspend_account'), new_admin_account_suspension_path(@report.target_account_id, report_id: @report.id), class: 'button'
- if @report.target_account.local?
= link_to t('admin.accounts.disable'), admin_report_path(@report, outcome: 'disable'), method: :put, class: 'button button--destructive'
= link_to t('admin.accounts.silence'), admin_report_path(@report, outcome: 'silence'), method: :put, class: 'button button--destructive'
= link_to t('admin.accounts.perform_full_suspension'), new_admin_account_suspension_path(@report.target_account_id, report_id: @report.id), class: 'button button--destructive'
%div{ style: 'float: left' }
= link_to t('admin.reports.mark_as_resolved'), admin_report_path(@report, outcome: 'resolve'), method: :put, class: 'button'
- else

View File

@ -346,9 +346,7 @@ ar:
reported_by: أبلغ عنه من طرف
resolved: معالجة
resolved_msg: تم حل تقرير بنجاح!
silence_account: كتم و إخفاء الحساب
status: الحالة
suspend_account: فرض تعليق على الحساب
title: التقارير
unassign: إلغاء تعيين
unresolved: غير معالجة

View File

@ -336,9 +336,7 @@ ca:
reported_by: Reportat per
resolved: Resolt
resolved_msg: Informe resolt amb èxit!
silence_account: Silencia el compte
status: Estat
suspend_account: Suspèn el compte
title: Informes
unassign: Treure assignació
unresolved: No resolt

View File

@ -345,9 +345,7 @@ co:
reported_by: Palisatu da
resolved: Scioltu è chjosu
resolved_msg: Signalamentu scioltu!
silence_account: Silenzà u contu
status: Statutu
suspend_account: Suspende u contu
title: Signalamenti
unassign: Disassignà
unresolved: Micca sciolti

View File

@ -345,9 +345,7 @@ cs:
reported_by: Nahlášeno uživatelem
resolved: Vyřešeno
resolved_msg: Nahlášení úspěšně vyřešeno!
silence_account: Utišit účet
status: Stav
suspend_account: Suspendovat účet
title: Nahlášení
unassign: Odebrat
unresolved: Nevyřešeno

View File

@ -329,7 +329,6 @@ cy:
reported_by: Adroddwyd gan
resolved: Wedi ei ddatrys
resolved_msg: Llwyddwyd i ddatrys yr adroddiad!
silence_account: Tawelwch y cyfrif
status: Statws
title: Adroddiadau
unassign: Dadneilltuo

View File

@ -336,9 +336,7 @@ da:
reported_by: Anmeldt af
resolved: Løst
resolved_msg: Anmeldelse er sat til at være løst!
silence_account: Dæmp konto
status: Status
suspend_account: Udeluk konto
title: Anmeldelser
unassign: Utildel
unresolved: Uløst

View File

@ -344,9 +344,7 @@ de:
reported_by: Gemeldet von
resolved: Gelöst
resolved_msg: Meldung erfolgreich gelöst!
silence_account: Konto stummschalten
status: Status
suspend_account: Konto sperren
title: Meldungen
unassign: Zuweisung entfernen
unresolved: Ungelöst

View File

@ -345,9 +345,7 @@ el:
reported_by: Αναφέρθηκε από
resolved: Επιλύθηκε
resolved_msg: Η καταγγελία επιλύθηκε επιτυχώς!
silence_account: Αποσιώπηση λογαριασμού
status: Κατάσταση
suspend_account: Ανέστειλε λογαριασμό
title: Αναφορές
unassign: Αποσύνδεση
unresolved: Άλυτη

View File

@ -128,7 +128,7 @@ en:
most_recent: Most recent
title: Order
outbox_url: Outbox URL
perform_full_suspension: Perform full suspension
perform_full_suspension: Suspend
profile_url: Profile URL
promote: Promote
protocol: Protocol
@ -346,9 +346,7 @@ en:
reported_by: Reported by
resolved: Resolved
resolved_msg: Report successfully resolved!
silence_account: Silence account
status: Status
suspend_account: Suspend account
title: Reports
unassign: Unassign
unresolved: Unresolved

View File

@ -325,9 +325,7 @@ eo:
reported_by: Signalita de
resolved: Solvita
resolved_msg: Signalo sukcese solvita!
silence_account: Kaŝi konton
status: Mesaĝoj
suspend_account: Haltigi konton
title: Signaloj
unassign: Malasigni
unresolved: Nesolvita

View File

@ -336,9 +336,7 @@ es:
reported_by: Reportado por
resolved: Resuelto
resolved_msg: "¡La denuncia se ha resuelto correctamente!"
silence_account: Silenciar cuenta
status: Estado
suspend_account: Suspender cuenta
title: Reportes
unassign: Desasignar
unresolved: No resuelto

View File

@ -336,9 +336,7 @@ eu:
reported_by: Salatzailea
resolved: Konponduta
resolved_msg: Salaketa ongi konpondu da!
silence_account: Isilarazi kontua
status: Mezua
suspend_account: Kanporatu kontua
title: Salaketak
unassign: Kendu esleipena
unresolved: Konpondu gabea

View File

@ -336,9 +336,7 @@ fa:
reported_by: گزارش از طرف
resolved: حل‌شده
resolved_msg: گزارش با موفقیت حل شد!
silence_account: بی‌صدا کردن حساب
status: نوشته
suspend_account: معلق‌کردن حساب
title: گزارش‌ها
unassign: پس‌گرفتن مسئولیت
unresolved: حل‌نشده

View File

@ -282,9 +282,7 @@ fi:
reported_by: Raportoija
resolved: Ratkaistut
resolved_msg: Raportti onnistuneesti ratkaistu!
silence_account: Hiljennä tili
status: Tila
suspend_account: Siirrä tili jäähylle
title: Raportit
unresolved: Ratkaisemattomat
updated_at: Päivitetty

View File

@ -345,9 +345,7 @@ fr:
reported_by: Signalé par
resolved: Résolus
resolved_msg: Signalement résolu avec succès!
silence_account: Masquer le compte
status: Statut
suspend_account: Suspendre le compte
title: Signalements
unassign: Dés-assigner
unresolved: Non résolus

View File

@ -345,9 +345,7 @@ gl:
reported_by: Reportada por
resolved: Resolto
resolved_msg: Resolveuse con éxito o informe!
silence_account: Acalar conta
status: Estado
suspend_account: Suspender conta
title: Informes
unassign: Non asignar
unresolved: Non resolto

View File

@ -189,9 +189,7 @@ he:
reported_account: חשבון מדווח
reported_by: דווח על ידי
resolved: פתור
silence_account: השתקת חשבון
status: הודעה
suspend_account: השעיית חשבון
title: דיווחים
unresolved: לא פתור
settings:

View File

@ -249,9 +249,7 @@ hu:
reported_account: Bejelentett fiók
reported_by: 'Jelentette:'
resolved: Megoldott
silence_account: Felhasználó némítása
status: Állapot
suspend_account: Felhasználó felfüggesztése
title: Jelentések
unresolved: Megoldatlan
settings:

View File

@ -114,9 +114,7 @@ id:
reported_account: Akun yang dilaporkan
reported_by: Dilaporkan oleh
resolved: Terseleseikan
silence_account: Akun yang didiamkan
status: Status
suspend_account: Akun yang disuspen
title: Laporan
unresolved: Belum Terseleseikan
settings:

View File

@ -107,9 +107,7 @@ io:
reported_account: Reported account
reported_by: Reported by
resolved: Resolved
silence_account: Silence account
status: Status
suspend_account: Suspend account
title: Reports
unresolved: Unresolved
settings:

View File

@ -324,9 +324,7 @@ it:
report: 'Rapporto #%{id}'
reported_by: Inviato da
resolved: Risolto
silence_account: Silenzia account
status: Stato
suspend_account: Sospendi account
title: Rapporti
unassign: Non assegnare
unresolved: Non risolto

View File

@ -346,9 +346,7 @@ ja:
reported_by: 報告者
resolved: 解決済み
resolved_msg: レポートを解決済みにしました!
silence_account: アカウントをサイレンス
status: ステータス
suspend_account: アカウントを停止
title: レポート
unassign: 担当を外す
unresolved: 未解決

View File

@ -325,9 +325,7 @@ ka:
reported_by: დაარეპორტა
resolved: გადაწყვეტილი
resolved_msg: რეპორტი წარმატებით გადაწყდა!
silence_account: ანგარიშის გაჩუმება
status: სტატუსი
suspend_account: ანგარიშის შეჩერება
title: რეპორტები
unassign: გადაყენება
unresolved: გადაუწყვეტელი

View File

@ -338,9 +338,7 @@ ko:
reported_by: 신고자
resolved: 해결됨
resolved_msg: 리포트가 성공적으로 해결되었습니다!
silence_account: 계정을 침묵 처리
status: 상태
suspend_account: 계정을 정지
title: 신고
unassign: 할당 해제
unresolved: 미해결

View File

@ -336,9 +336,7 @@ nl:
reported_by: Gerapporteerd door
resolved: Opgelost
resolved_msg: Rapportage succesvol opgelost!
silence_account: Account negeren
status: Toot
suspend_account: Account opschorten
title: Rapportages
unassign: Niet langer toewijzen
unresolved: Onopgelost

View File

@ -249,9 +249,7 @@
reported_account: Rapportert konto
reported_by: Rapportert av
resolved: Løst
silence_account: Målbind konto
status: Status
suspend_account: Utvis konto
title: Rapporter
unresolved: Uløst
settings:

View File

@ -144,7 +144,6 @@ oc:
role: Permissions
roles:
admin: Administrator
bot: Robòt
moderator: Moderador
staff: Personnal
user: Uitlizaire
@ -337,9 +336,7 @@ oc:
reported_by: Senhalat per
resolved: Resolgut
resolved_msg: Rapòrt corrèctament resolgut!
silence_account: Metre lo compte en silenci
status: Estatut
suspend_account: Suspendre lo compte
title: Senhalament
unassign: Levar
unresolved: Pas resolgut

View File

@ -354,9 +354,7 @@ pl:
reported_by: Zgłaszający
resolved: Rozwiązane
resolved_msg: Pomyślnie rozwiązano zgłoszenie.
silence_account: Wycisz konto
status: Stan
suspend_account: Zawieś konto
title: Zgłoszenia
unassign: Cofnij przypisanie
unresolved: Nierozwiązane

View File

@ -334,9 +334,7 @@ pt-BR:
reported_by: Denunciada por
resolved: Resolvido
resolved_msg: Denúncia resolvida com sucesso!
silence_account: Silenciar conta
status: Status
suspend_account: Suspender conta
title: Denúncias
unassign: Desatribuir
unresolved: Não resolvido

View File

@ -249,9 +249,7 @@ pt:
reported_account: Conta denunciada
reported_by: Denúnciada por
resolved: Resolvido
silence_account: Conta silenciada
status: Estado
suspend_account: Conta suspensa
title: Denúncias
unresolved: Por resolver
settings:

View File

@ -345,9 +345,7 @@ ru:
reported_by: Отправитель жалобы
resolved: Разрешено
resolved_msg: Жалоба успешно обработана!
silence_account: Заглушить аккаунт
status: Статус
suspend_account: Блокировать аккаунт
title: Жалобы
unassign: Снять назначение
unresolved: Неразрешенные

View File

@ -337,9 +337,7 @@ sk:
reported_by: Nahlásené užívateľom
resolved: Vyriešené
resolved_msg: Hlásenie úspešne vyriešené!
silence_account: Zamĺčať účet
status: Stav
suspend_account: Pozastaviť účet
title: Reporty
unassign: Odobrať
unresolved: Nevyriešené

View File

@ -251,9 +251,7 @@ sr-Latn:
reported_account: Prijavljeni nalog
reported_by: Prijavio
resolved: Rešeni
silence_account: Ućutkaj nalog
status: Status
suspend_account: Suspenduj nalog
title: Prijave
unresolved: Nerešeni
settings:

View File

@ -338,9 +338,7 @@ sr:
reported_by: Пријавио
resolved: Решена
resolved_msg: Пријава успешно разрешена!
silence_account: Ућуткај налог
status: Статус
suspend_account: Суспендуј налог
title: Пријаве
unassign: Уклони доделу
unresolved: Нерешене

View File

@ -285,9 +285,7 @@ sv:
reported_by: Anmäld av
resolved: Löst
resolved_msg: Anmälan har lösts framgångsrikt!
silence_account: Tysta ner konto
status: Status
suspend_account: Suspendera konto
title: Anmälningar
unassign: Otilldela
unresolved: Olösta

View File

@ -116,9 +116,7 @@ th:
reported_account: รายงานแอคเคาท์
reported_by: รายงานโดย
resolved: จัดการแล้ว
silence_account: แอคเค๊าท์ที่ปิดเสียง
status: สถานะ
suspend_account: แอคเค๊าท์ที่หยุดไว้
title: รายงาน
unresolved: Unresolved
settings:

View File

@ -115,9 +115,7 @@ tr:
reported_account: Şikayet edilen hesap
reported_by: Şikayet eden
resolved: Giderildi
silence_account: Hesabı sustur
status: Durum
suspend_account: Hesabı uzaklaştır
title: Şikayetler
unresolved: Giderilmedi
settings:

View File

@ -313,9 +313,7 @@ uk:
reported_by: Відправник скарги
resolved: Вирішено
resolved_msg: Скаргу успішно вирішено!
silence_account: Заглушити акаунт
status: Статус
suspend_account: Заблокувати акаунт
title: Скарги
unassign: Зняти призначення
unresolved: Невирішені

View File

@ -332,9 +332,7 @@ zh-CN:
reported_by: 举报人
resolved: 已处理
resolved_msg: 举报处理成功!
silence_account: 隐藏用户
status: 状态
suspend_account: 封禁用户
title: 举报
unassign: 取消接管
unresolved: 未处理

View File

@ -285,9 +285,7 @@ zh-HK:
reported_by: 舉報者
resolved: 已處理
resolved_msg: 舉報已處理。
silence_account: 將用戶靜音
status: 狀態
suspend_account: 將用戶停權
title: 舉報
unassign: 取消指派
unresolved: 未處理

View File

@ -295,9 +295,7 @@ zh-TW:
reported_by: 檢舉人
resolved: 已解決
resolved_msg: 檢舉已處理!
silence_account: 靜音使用者
status: 狀態
suspend_account: 停權使用者
title: 檢舉
unassign: 取消指派
unresolved: 未解決