aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-12-30 16:54:54 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-12-30 16:55:41 -1000
commit0f2d21603df91e7285c4a50da9d9dadf95f600b6 (patch)
treeaa3b61cb0798c7ec6e17df49de524d33fe4d4ceb
parentc3d96d538721cc63ce7226a5ccf0bf754ec5054e (diff)
downloadpatchfoo-0f2d21603df91e7285c4a50da9d9dadf95f600b6.tar.gz
patchfoo-0f2d21603df91e7285c4a50da9d9dadf95f600b6.zip
Render about-resource messages
-rw-r--r--lib/render-msg.js11
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)
+}