mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 00:45:47 +01:00
closes #847
This commit is contained in:
@@ -166,11 +166,10 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|||||||
|
|
||||||
var recentReplies = $('#category_recent_replies');
|
var recentReplies = $('#category_recent_replies');
|
||||||
|
|
||||||
|
|
||||||
// doesnt work see https://github.com/designcreateplay/NodeBB/issues/893
|
|
||||||
/*
|
|
||||||
templates.preload_template('recentreplies', function() {
|
templates.preload_template('recentreplies', function() {
|
||||||
|
|
||||||
|
templates['recentreplies'].parse({posts:[]});
|
||||||
|
|
||||||
var html = templates.prepare(templates['recentreplies'].blocks['posts']).parse({
|
var html = templates.prepare(templates['recentreplies'].blocks['posts']).parse({
|
||||||
posts: posts
|
posts: posts
|
||||||
});
|
});
|
||||||
@@ -182,28 +181,6 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
|||||||
app.createUserTooltips();
|
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;
|
return Category;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<img title="{posts.username}" class="img-rounded user-img" src="{posts.picture}" />
|
<img title="{posts.username}" class="img-rounded user-img" src="{posts.picture}" />
|
||||||
</a>
|
</a>
|
||||||
<strong><span>{posts.username}</span></strong>
|
<strong><span>{posts.username}</span></strong>
|
||||||
<p>posts.content</p>
|
<p>{posts.content}</p>
|
||||||
<span class="pull-right">
|
<span class="pull-right">
|
||||||
<a href="{relative_path}/topic/{posts.topicSlug}#{posts.pid}">[[category:posted]]</a>
|
<a href="{relative_path}/topic/{posts.topicSlug}#{posts.pid}">[[category:posted]]</a>
|
||||||
<span class="timeago" title="{posts.relativeTime}"></span>
|
<span class="timeago" title="{posts.relativeTime}"></span>
|
||||||
|
|||||||
Reference in New Issue
Block a user