diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-12-30 16:54:54 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-12-30 16:55:41 -1000 |
commit | 0f2d21603df91e7285c4a50da9d9dadf95f600b6 (patch) | |
tree | aa3b61cb0798c7ec6e17df49de524d33fe4d4ceb | |
parent | c3d96d538721cc63ce7226a5ccf0bf754ec5054e (diff) | |
download | patchfoo-0f2d21603df91e7285c4a50da9d9dadf95f600b6.tar.gz patchfoo-0f2d21603df91e7285c4a50da9d9dadf95f600b6.zip |
Render about-resource messages
-rw-r--r-- | lib/render-msg.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 92f8531..d4ad670 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -286,6 +286,7 @@ RenderMsg.prototype.message = function (cb) { case 'talenet-idea-update': return this.ideaUpdate(cb) case 'talenet-idea-comment': case 'talenet-idea-comment_reply': return this.ideaComment(cb) + case 'about-resource': return this.aboutResource(cb) default: return this.object(cb) } } @@ -1627,3 +1628,13 @@ RenderMsg.prototype.ideaComment = function (cb) { ]), cb) }) } + +RenderMsg.prototype.aboutResource = function (cb) { + var self = this + return self.wrap(h('div', + 'describes resource ', + h('a', {href: self.toUrl(self.c.about)}, self.c.name), + ':', + h('blockquote', {innerHTML: self.render.markdown(self.c.description)}) + ), cb) +} |