From c0184ba350b464af0a53623f475e77a4e32a3ebc Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Mon, 27 Jan 2014 14:57:25 -0500 Subject: [PATCH] blocked --- public/src/forum/category.js | 19 +++++++++++++++++++ public/templates/recentreplies.tpl | 14 ++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 public/templates/recentreplies.tpl diff --git a/public/src/forum/category.js b/public/src/forum/category.js index e61443337b..7ff7e72718 100644 --- a/public/src/forum/category.js +++ b/public/src/forum/category.js @@ -165,6 +165,25 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { } var recentReplies = $('#category_recent_replies'); + + + // doesnt work see https://github.com/designcreateplay/NodeBB/issues/893 + /* + templates.preload_template('recentreplies', function() { + + var html = templates.prepare(templates['recentreplies'].blocks['posts']).parse({ + posts: posts + }); + + translator.translate(html, function(translatedHTML) { + recentReplies.html(translatedHTML); + + $('#category_recent_replies span.timeago').timeago(); + app.createUserTooltips(); + }); + }); + */ + var replies = ''; for (var i = 0, numPosts = posts.length; i < numPosts; ++i) { diff --git a/public/templates/recentreplies.tpl b/public/templates/recentreplies.tpl new file mode 100644 index 0000000000..b1e7951e50 --- /dev/null +++ b/public/templates/recentreplies.tpl @@ -0,0 +1,14 @@ + + +
  • + + + + {posts.username} +

    posts.content

    + + [[category:posted]] + + +
  • +