在 topic 页面加入回复楼层信息

This commit is contained in:
Alsotang 2014-05-08 13:49:13 +08:00
parent bf3ecf8c4f
commit bd447f6ea9
3 changed files with 5 additions and 3 deletions

View File

@ -36,7 +36,7 @@ exports.getTopicById = function (id, callback) {
if (topic.last_reply) {
Reply.getReplyById(topic.last_reply, proxy.done(function (last_reply) {
proxy.emit('last_reply', last_reply || null);
proxy.emit('last_reply', last_reply);
}));
} else {
proxy.emit('last_reply', null);

View File

@ -7,7 +7,7 @@
<div class='user_info'>
<a class='dark reply_author' href="/user/<%= reply.author.name %>"><%= reply.author.name %>
</a>
<a class="reply_time" href="#<%- reply._id %>"><%= reply.friendly_create_at %></a>
<a class="reply_time" href="#<%- reply._id %>"><%= indexInCollection + 1 %>楼•<%= reply.friendly_create_at %></a>
</div>
<div class='user_action'>
<% if ( typeof(current_user) !== 'undefined' && current_user.is_admin ||

View File

@ -50,7 +50,9 @@
</span>
<div class="changes">
<span>
发布于 <%= topic.friendly_create_at %>,
发布于 <%= topic.friendly_create_at %>
</span>
<span>
<%= topic.visit_count %> 次浏览
</span>
<% if (topic.friendly_create_at != topic.friendly_update_at) { %>