Node.js based forum software built for the modern web
closes #847
Baris Soner Usakliaa856e2f5c25
diff --git a/public/src/forum/category.js b/public/src/forum/category.jsindex a720f8b715..0621b68019 100644--- a/public/src/forum/category.js+++ b/public/src/forum/category.js@@ -166,11 +166,10 @@ 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() {+ templates['recentreplies'].parse({posts:[]});+var html = templates.prepare(templates['recentreplies'].blocks['posts']).parse({posts: posts});@@ -182,28 +181,6 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {app.createUserTooltips();});});- */-- var replies = '';- for (var i = 0, numPosts = posts.length; i < numPosts; ++i) {-- replies += '<li data-pid="'+ posts[i].pid +'" class="clearfix">' +- '<a href="' + RELATIVE_PATH + '/user/' + posts[i].userslug + '"><img title="' + posts[i].username + '" class="img-rounded user-img" src="' + posts[i].picture + '"/></a>' +- '<strong><span>'+ posts[i].username + '</span></strong>' +- '<p>' + posts[i].content + '</p>' +- '<span class="pull-right">'+- '<a href="' + RELATIVE_PATH + '/topic/' + posts[i].topicSlug + '#' + posts[i].pid + '">[[category:posted]]</a> '+- '<span class="timeago" title="' + posts[i].relativeTime + '"></span>' +- '</span>'+- '</li>';- }-- translator.translate(replies, function(translatedHTML) {- recentReplies.html(translatedHTML);-- $('#category_recent_replies span.timeago').timeago();- app.createUserTooltips();- });};return Category;diff --git a/public/templates/recentreplies.tpl b/public/templates/recentreplies.tplindex b1e7951e50..121211c3d6 100644--- a/public/templates/recentreplies.tpl+++ b/public/templates/recentreplies.tpl@@ -5,7 +5,7 @@<img title="{posts.username}" class="img-rounded user-img" src="{posts.picture}" /></a><strong><span>{posts.username}</span></strong>- <p>posts.content</p>+ <p>{posts.content}</p><span class="pull-right"><a href="{relative_path}/topic/{posts.topicSlug}#{posts.pid}">[[category:posted]]</a><span class="timeago" title="{posts.relativeTime}"></span>