mirror of
https://github.com/cnodejs/nodeclub.git
synced 2025-12-08 19:55:55 +00:00
72 lines
3.2 KiB
HTML
72 lines
3.2 KiB
HTML
<div class='cell reply_area reply_item' id="reply<%= indexInCollection+1 %>" reply_id="<%- reply._id %>">
|
|
<a id="<%- reply._id %>"></a>
|
|
<div class='author_content'>
|
|
<div class='user_avatar block'>
|
|
<a href="/user/<%= reply.author.name %>"><img src="<%= reply.author.avatar_url %>" title="<%= reply.author.name %>" /></a>
|
|
</div>
|
|
<div class='user_info'>
|
|
<span class='reply_author'>
|
|
<a class='dark' href="/user/<%= reply.author.name %>"><%= reply.author.name %>
|
|
</a>
|
|
</span>
|
|
<span class='col_fade'>
|
|
<a href="#<%- reply._id %>"><%= reply.friendly_create_at %></a>
|
|
</span>
|
|
</div>
|
|
<div class='user_action fr'>
|
|
<span class='col_fade'>#<%= indexInCollection + 1 %></span>
|
|
<% if(locals.current_user && current_user._id.toString() == reply.author._id.toString()) { %>
|
|
<a href='javascript:void(0);' class='delete_reply_btn'>
|
|
<img class='user_icon' src="<%- config.site_static_host %>/images/trash_icon&16.png" title='删除' />
|
|
</a>
|
|
<% } %>
|
|
<span>
|
|
<% if(locals.current_user){ %>
|
|
<a href='javascript:void(0);' class='dark reply2_btn'>回复</a>
|
|
<% } %>
|
|
<!--<% if(reply.replies.length>0){ %>
|
|
<span class='col_fade'>{<%= reply.replies.length %>}</span>
|
|
<% } %>-->
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<!-- <div class='sep5'></div> -->
|
|
<div class='reply_content'>
|
|
<%- markdown(reply.content) %>
|
|
</div>
|
|
<div class='cl'>
|
|
<!-- <div class='sep5'></div> -->
|
|
<div class='reply2_area'>
|
|
<% if (reply.replies.length >0) { %>
|
|
<div class='sep10'></div>
|
|
<%- partial('reply/reply2',{collection: reply.replies, as: 'reply'}) %>
|
|
<% } %>
|
|
<% if (locals.current_user) { %>
|
|
<div class='reply2_editor tabbable' id='reply2_editor-<%= indexInCollection+1 %>'>
|
|
<form id='reply_form' action='/<%= topic._id %>/reply2' method='post'>
|
|
<input type='hidden' name='_csrf' value='<%- csrf %>' />
|
|
<input type='hidden' name='reply_id' value='<%- reply._id %>' />
|
|
<ul class='nav nav-pills'>
|
|
<li class='active'><a href='#markdown-<%= indexInCollection+1 %>' data-toggle='pill'>markdown</a></li>
|
|
<!-- <li><a href='#preview-<%= indexInCollection+1 %>' data-toggle='pill' class="preview-btn">预览</a></li> -->
|
|
</ul>
|
|
<div class='tab-content'>
|
|
<div class='active tab-pane' id='markdown-<%= indexInCollection+1 %>'>
|
|
<div id='wmd-button-bar-<%= indexInCollection+1 %>'></div>
|
|
<textarea class='span8 editor' id='wmd-input-<%= indexInCollection+1 %>' name='r2_content' rows='4'></textarea>
|
|
</div>
|
|
<div id='preview-<%= indexInCollection+1 %>' class='tab-pane'>
|
|
<div id='wmd-preview-<%= indexInCollection+1 %>' class='wmd-preview reply2-wmd-preview'></div>
|
|
</div>
|
|
</div>
|
|
<div class='sep10'></div>
|
|
<button class='btn reply2_submit_btn' type="submit" data-id='<%= reply._id %>'>回复</button>
|
|
<span class='sp10'></span>
|
|
<span class='col_fade'>Ctrl+Enter 快捷回复</span>
|
|
</form>
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
</div>
|
|
</div>
|