mirror of
https://github.com/cnodejs/nodeclub.git
synced 2025-12-08 19:55:55 +00:00
70 lines
2.8 KiB
HTML
70 lines
2.8 KiB
HTML
<div class='cell reply_area reply_item
|
|
<%- reply.ups && reply.ups.length >= topic.reply_up_threshold ? 'reply_highlight' : '' %>'
|
|
reply_id="<%= reply._id %>" reply_to_id="<%= reply.reply_id || '' %>" id="<%= reply._id %>">
|
|
<div class='author_content'>
|
|
<a href="/user/<%= reply.author.loginname %>" class="user_avatar">
|
|
<img src="<%= proxy(reply.author.avatar_url) %>" title="<%= reply.author.loginname %>"/></a>
|
|
|
|
<div class='user_info'>
|
|
<a class='dark reply_author' href="/user/<%= reply.author.loginname %>"><%= reply.author.loginname %></a>
|
|
<a class="reply_time" href="#<%= reply._id %>"><%= indexInCollection + 1 %>楼•<%= reply.create_at_ago()
|
|
%></a>
|
|
<% if(reply.author.loginname == topic.author.loginname){ %>
|
|
<span class="reply_by_author">作者</span>
|
|
<% } %>
|
|
</div>
|
|
<div class='user_action'>
|
|
<span>
|
|
<i class="fa up_btn
|
|
<%= (current_user && is_uped(current_user, reply)) ? 'fa-thumbs-up uped' : 'fa-thumbs-o-up' %>
|
|
<%= (!reply.ups || !reply.ups.length) ? 'invisible' : '' %>" title="喜欢"></i>
|
|
<span class="up-count">
|
|
<%= reply.ups && reply.ups.length ? reply.ups.length : '' %>
|
|
</span>
|
|
</span>
|
|
<% if (current_user && current_user.is_admin ||
|
|
(current_user && current_user._id.toString() == reply.author._id.toString())
|
|
) { %>
|
|
<a href='/reply/<%= reply._id %>/edit' class='edit_reply_btn'>
|
|
<i class="fa fa-pencil-square-o" title='编辑'></i>
|
|
</a>
|
|
<a href='javascript:void(0);' class='delete_reply_btn'>
|
|
<i class="fa fa-trash" title='删除'></i>
|
|
</a>
|
|
<% } %>
|
|
<span>
|
|
<% if (current_user){ %>
|
|
<i class="fa fa-reply reply2_btn" title="回复"></i>
|
|
<% } %>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class='reply_content from-<%= reply.author.loginname %>'>
|
|
<%- markdown(reply.content) %>
|
|
</div>
|
|
<div class='clearfix'>
|
|
<div class='reply2_area'>
|
|
<% if (current_user) { %>
|
|
<form class='reply2_form' action='/<%= topic._id %>/reply' method='post'>
|
|
<input type='hidden' name='_csrf' value='<%= csrf %>'/>
|
|
<input type='hidden' name='reply_id' value='<%= reply._id %>'/>
|
|
|
|
<div class='markdown_editor in_editor'>
|
|
<div class='markdown_in_editor'>
|
|
<textarea class='span8 editor reply_editor'
|
|
id="reply2_editor_<%= reply._id %>" name='r_content' rows='4'></textarea>
|
|
|
|
<div class='editor_buttons'>
|
|
<input class='span-primary reply2_submit_btn submit_btn'
|
|
type="submit" data-id='<%= reply._id %>' data-loading-text="回复中.." value="回复">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
<% } %>
|
|
</div>
|
|
</div>
|
|
</div>
|