diff --git a/app/assets/javascripts/admin/models/flagged_post.js b/app/assets/javascripts/admin/models/flagged_post.js index 439d1f73a46..9392786e5a8 100644 --- a/app/assets/javascripts/admin/models/flagged_post.js +++ b/app/assets/javascripts/admin/models/flagged_post.js @@ -8,6 +8,15 @@ **/ Discourse.FlaggedPost = Discourse.Post.extend({ + summary: function(){ + return _(this.post_actions) + .groupBy(function(a){ return a.post_action_type_id }) + .map(function(v,k){ + return Em.String.i18n("admin.flags.summary.action_type_" + k, {count: v.length}); + }) + .join(",") + }.property(), + flaggers: function() { var r, _this = this; diff --git a/app/assets/javascripts/admin/templates/flags.js.handlebars b/app/assets/javascripts/admin/templates/flags.js.handlebars index 14d5dd78e5c..b38a67f519d 100644 --- a/app/assets/javascripts/admin/templates/flags.js.handlebars +++ b/app/assets/javascripts/admin/templates/flags.js.handlebars @@ -27,7 +27,9 @@
{{flag.summary}}
+{{i18n admin.flags.no_results}}
{{/if}} -{{/if}} \ No newline at end of file +{{/if}} diff --git a/app/assets/stylesheets/admin/admin_base.scss b/app/assets/stylesheets/admin/admin_base.scss index 77f93888c5a..019fcca3cbc 100644 --- a/app/assets/stylesheets/admin/admin_base.scss +++ b/app/assets/stylesheets/admin/admin_base.scss @@ -274,6 +274,7 @@ table { .admin-flags { + tr.hidden-post td.excerpt { opacity: 0.4; } td.message { padding: 4px 0; @@ -289,6 +290,7 @@ table { } .flaggers { padding: 0 10px; } .last-flagged { padding: 0 10px; } + .flag-summary { font-size: 11px; } } /* Dashboard */ diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index b926db8cba4..a61683ba4a5 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1041,6 +1041,25 @@ en: view_message: "view message" no_results: "There are no flags." + summary: + action_type_3: + one: "off-topic" + other: "off-topic x{{count}}" + action_type_4: + one: "inappropriate" + other: "inappropriate x{{count}}" + action_type_6: + one: "custom" + other: "custom x{{count}}" + one: "spam" + other: "spam x{{count}}" + action_type_7: + one: "custom" + other: "custom x{{count}}" + action_type_8: + one: "spam" + other: "spam x{{count}}" + groups: title: "Groups" edit: "Edit Groups"