mirror of
https://github.com/cnodejs/nodeclub.git
synced 2026-01-18 15:13:13 +00:00
73 lines
3.2 KiB
HTML
73 lines
3.2 KiB
HTML
<div class='cell reply_area reply_item
|
|
<%- reply.ups && reply.ups.length > 0 && reply.ups.length >= topic.reply_up_threshold ? 'reply_highlight' : '' %>'
|
|
id="reply<%= indexInCollection+1 %>" reply_id="<%= reply._id %>" reply_to_id="<%= reply.reply_id || '' %>">
|
|
<a class="anchor" id="<%= reply._id %>"></a>
|
|
|
|
<div class='author_content'>
|
|
<a href="/user/<%= reply.author.loginname %>" class="user_avatar">
|
|
<img src="<%= reply.author.avatar_url %>"
|
|
title="<%= reply.author.loginname %>" height="30" width="30" /></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.friendly_create_at
|
|
%></a>
|
|
</div>
|
|
<div class='user_action'>
|
|
<span>
|
|
<img class='dark up_btn
|
|
<%= (typeof current_user !== 'undefined' && isUped(current_user, reply)) ? 'uped' : '' %>
|
|
<%= (!reply.ups || !reply.ups.length) ? 'invisible' : '' %>' src="<%- staticFile('/public/images/up_icon&16.png') %>" height="16" width="16"
|
|
title="喜欢">
|
|
<span class="up-count">
|
|
<%= reply.ups && reply.ups.length ? reply.ups.length : '' %>
|
|
</span>
|
|
</span>
|
|
<% if ( typeof(current_user) !== 'undefined' && current_user.is_admin ||
|
|
(typeof(current_user) !== 'undefined' && current_user._id.toString() == reply.author._id.toString())
|
|
) { %>
|
|
<a href='/reply/<%= reply._id %>/edit' class='edit_reply_btn'>
|
|
<img class='user_icon' src="<%- staticFile('/public/images/doc_edit_icon&16.png') %>" height="16" width="16"
|
|
title='编辑'/>
|
|
</a>
|
|
<a href='javascript:void(0);' class='delete_reply_btn'>
|
|
<img class='user_icon' src="<%- staticFile('/public/images/trash_icon&16.png') %>" height="16" width="16" title='删除'/>
|
|
</a>
|
|
<% } %>
|
|
<span>
|
|
<% if(typeof(current_user) !== 'undefined'){ %>
|
|
<img class='dark reply2_btn' src="<%- staticFile('/public/images/reply_icon_16.png') %>" height="16" width="16" title="回复">
|
|
<% } %>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class='reply_content from-<%= reply.author.loginname %>'>
|
|
<%- markdown(reply.content) %>
|
|
</div>
|
|
<div class='clearfix'>
|
|
<div class='reply2_area'>
|
|
<% if (typeof(current_user) !== 'undefined') { %>
|
|
<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>
|