forked from cnodejs/nodeclub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreply.html
69 lines (63 loc) · 2.69 KB
/
reply.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<div class='cell reply_area reply_item
<%- reply.ups && 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="<%= 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>
</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>