A platform for community discussion. Free, open, simple.
Add some extensibility to posts rendering
Robin Warda34010e49ac3
diff --git a/app/assets/javascripts/discourse/widgets/post.js.es6 b/app/assets/javascripts/discourse/widgets/post.js.es6index 70451b2bb11..471ca682933 100644--- a/app/assets/javascripts/discourse/widgets/post.js.es6+++ b/app/assets/javascripts/discourse/widgets/post.js.es6@@ -201,7 +201,7 @@ createWidget('post-meta-data', {attributes["class"] += " last-wiki-edit";}- result.push(h('div.post-info', h('a', { attributes }, date)));+ result.push(h('div.post-info.post-date', h('a', { attributes }, date)));if (attrs.via_email) {result.push(this.attach('post-email-indicator', attrs));@@ -344,10 +344,11 @@ createWidget('post-contents', {createWidget('post-body', {tagName: 'div.topic-body.clearfix',- html(attrs) {+ html(attrs, state) {const postContents = this.attach('post-contents', attrs);- const result = [this.attach('post-meta-data', attrs), postContents];-+ let result = [this.attach('post-meta-data', attrs)];+ result = result.concat(applyDecorators(this, 'after-meta-data', attrs, state));+ result.push(postContents);result.push(this.attach('actions-summary', attrs));result.push(this.attach('post-links', attrs));if (attrs.showTopicMap) {