From d36916ccf5120719f409df943f72daf3cd95c106 Mon Sep 17 00:00:00 2001 From: Robin Ward <robin.ward@gmail.com> Date: Tue, 26 May 2015 11:25:13 -0400 Subject: [PATCH] UX: Highlight the OP of a warning --- app/assets/javascripts/discourse/views/post.js.es6 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/views/post.js.es6 b/app/assets/javascripts/discourse/views/post.js.es6 index 640a9df9a39..f9b9a122916 100644 --- a/app/assets/javascripts/discourse/views/post.js.es6 +++ b/app/assets/javascripts/discourse/views/post.js.es6 @@ -3,7 +3,7 @@ const DAY = 60 * 50 * 1000; const PostView = Discourse.GroupedView.extend(Ember.Evented, { classNames: ['topic-post', 'clearfix'], templateName: 'post', - classNameBindings: ['postTypeClass', + classNameBindings: ['needsModeratorClass:moderator:regular', 'selected', 'post.hidden:post-hidden', 'post.deleted:deleted', @@ -26,8 +26,9 @@ const PostView = Discourse.GroupedView.extend(Ember.Evented, { if (updatedAtDate > (rightNow - DAY * Discourse.SiteSettings.history_hours_high)) return 'heatmap-low'; }.property('post.updated_at'), - postTypeClass: function() { - return this.get('post.post_type') === Discourse.Site.currentProp('post_types.moderator_action') ? 'moderator' : 'regular'; + needsModeratorClass: function() { + return (this.get('post.post_type') === this.site.get('post_types.moderator_action')) || + (this.get('post.topic.is_warning') && this.get('post.firstPost')); }.property('post.post_type'), groupNameClass: function() {