UX: Rename Most Disagreed Flaggers report to "User Flagging Ratio"

This commit is contained in:
Robin Ward 2018-11-12 16:23:10 -05:00
parent dda1824270
commit 0cb33d2b52
7 changed files with 16 additions and 16 deletions

View File

@ -13,7 +13,7 @@ export default Ember.Controller.extend(PeriodComputationMixin, {
},
@computed
mostDisagreedFlaggersOptions() {
userFlaggingRatioOptions() {
return {
table: {
total: false,

View File

@ -34,9 +34,9 @@
filters=lastWeekfilters}}
{{admin-report
dataSourceName="most_disagreed_flaggers"
dataSourceName="user_flagging_ratio"
filters=lastWeekfilters
reportOptions=mostDisagreedFlaggersOptions}}
reportOptions=userFlaggingRatioOptions}}
{{plugin-outlet name="admin-dashboard-moderation-bottom"}}
</div>

View File

@ -1170,7 +1170,7 @@ class Report
end
end
def self.report_most_disagreed_flaggers(report)
def self.report_user_flagging_ratio(report)
report.data = []
report.modes = [:table]
@ -1185,27 +1185,27 @@ class Report
id: :user_id,
avatar: :avatar_template,
},
title: I18n.t("reports.most_disagreed_flaggers.labels.user")
title: I18n.t("reports.user_flagging_ratio.labels.user")
},
{
type: :number,
property: :disagreed_flags,
title: I18n.t("reports.most_disagreed_flaggers.labels.disagreed_flags")
title: I18n.t("reports.user_flagging_ratio.labels.disagreed_flags")
},
{
type: :number,
property: :agreed_flags,
title: I18n.t("reports.most_disagreed_flaggers.labels.agreed_flags")
title: I18n.t("reports.user_flagging_ratio.labels.agreed_flags")
},
{
type: :number,
property: :ignored_flags,
title: I18n.t("reports.most_disagreed_flaggers.labels.ignored_flags")
title: I18n.t("reports.user_flagging_ratio.labels.ignored_flags")
},
{
type: :number,
property: :score,
title: I18n.t("reports.most_disagreed_flaggers.labels.score")
title: I18n.t("reports.user_flagging_ratio.labels.score")
},
]
@ -1224,7 +1224,7 @@ class Report
WHERE u.id <> -1
AND flags_disagreed > flags_agreed
ORDER BY score DESC
LIMIT 20
LIMIT 100
SQL
DB.query(sql).each do |row|

View File

@ -797,7 +797,7 @@ de:
editor: Bearbeiter
author: Ersteller
edit_reason: Grund
most_disagreed_flaggers:
user_flagging_ratio:
title: "Melder mit höchster Ablehnung"
labels:
user: Benutzer

View File

@ -894,8 +894,8 @@ en:
editor: Editor
author: Author
edit_reason: Reason
most_disagreed_flaggers:
title: "Most disagreed flaggers"
user_flagging_ratio:
title: "User Flagging Ratio"
labels:
user: User
agreed_flags: Agreed flags

View File

@ -796,7 +796,7 @@ es:
editor: Editor
author: Autor
edit_reason: Motivo
most_disagreed_flaggers:
user_flagging_ratio:
title: "Most disagreed flaggers"
labels:
user: Usuari

View File

@ -936,7 +936,7 @@ describe Report do
end
end
describe 'most_disagreed_flaggers' do
describe 'user_flagging_ratio' do
let(:joffrey) { Fabricate(:user, username: "joffrey") }
let(:robin) { Fabricate(:user, username: "robin") }
let(:moderator) { Fabricate(:moderator) }
@ -958,7 +958,7 @@ describe Report do
PostAction.act(robin, post_agreed, PostActionType.types[:off_topic])
PostAction.agree_flags!(post_agreed, moderator)
report = Report.find('most_disagreed_flaggers')
report = Report.find('user_flagging_ratio')
first = report.data[0]
expect(first[:username]).to eq("joffrey")