Add some extensibility to posts rendering
This commit is contained in:
parent
2d49250107
commit
a34010e49a
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue