forked from stormsha/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomment_list.html
83 lines (69 loc) · 4.58 KB
/
comment_list.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{% load staticfiles %}
{% load comment_tags oauth_tags %}
<div id="respond" class="no_webshot">
<form action="/comment/add" method="post" id="commentform">
<div class="comt-title">
{% if request.session.username|default:'' != '' %}
{% get_user_data request.session.uid as user %}
<div class="comt-avatar pull-left">
<img alt='' src='/media/{{ user.avatar }}' class='avatar avatar-54 photo avatar-default' height='54' width='54' /> </div>
<div class="comt-author pull-left" id="nick">
{{ request.session.username }}
</div>
{% endif %}
{% if request.session.nick|default:'' != '' %}
{% get_tourist_data request.session.tid as tourist %}
<div class="comt-avatar pull-left">
<img alt='' src='/media/avatar' class='avatar avatar-54 photo avatar-default' height='54' width='54' /> </div>
<div class="comt-author pull-left" id="nick">
{{ tourist.nickname }}
<a class="switch-author" href="javascript:;" data-type="switch-author" style="font-size:12px;">换个身份</a>
</div>
{% else %}
<div class="comt-author pull-left" id="nick">
</div>
{% endif %}
<a id="cancel-comment-reply-link" class="pull-right" href="javascript:;">取消评论</a>
</div>
<div class="comt">
<div class="comt-box">
<h3>发表我的评论</h3>
<textarea placeholder="写点什么..." class="input-block-level comt-area" name="w" id="comment" cols="100%" rows="3" tabindex="1" onkeydown="if(event.ctrlKey&&event.keyCode==13){document.getElementById('submit').click();return false};"></textarea><textarea name="comment" cols="100%" rows="4" style="display:none"></textarea>
<div class="comt-ctrl">
<button class="btn btn-primary pull-right" type="submit" name="submit" id="submit" tabindex="5"><i class="fa fa-check-square-o"></i> 提交评论</button>
<div class="comt-tips pull-right"><input type='hidden' name='comment_post_ID' value='{{ category }}' id='comment_post_ID' />
<input type='hidden' name='comment_parent' id='comment_parent' value='0' />
<p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="da9dc5c77a" /></p><p style="display: none;"><input type="hidden" id="ak_js" name="ak_js" value="50"/></p></div>
<span data-type="comment-insert-smilie" class="muted comt-smilie"><i class="fa fa-smile-o"></i> 表情</span>
<span class="muted comt-mailme"><label for="comment_mail_notify" class="checkbox inline" style="padding-top:0"><input type="checkbox" name="comment_mail_notify" id="comment_mail_notify" value="comment_mail_notify" checked="checked"/>有人回复时邮件通知我</label></span>
</div>
</div>
<div class="comt-comterinfo" id="comment-author-info" >
<h4>Hi,您需要填写昵称和邮箱!</h4>
<ul>
<li class="form-inline"><label class="hide" for="author">昵称</label><input class="ipt" type="text" name="author" id="author" value="{% if user %}{{ user.username }}{% elif tourist %}{{ tourist.nickname }}{% endif %}" tabindex="2" placeholder="昵称"><span class="help-inline">昵称 (必填)</span></li>
<li class="form-inline"><label class="hide" for="email">邮箱</label><input class="ipt" type="text" name="email" id="email" value="{% if user %}{{ user.email }}{% elif tourist %}{{ tourist.email }}{% endif %}" tabindex="3" placeholder="邮箱"><span class="help-inline">邮箱 (必填)</span></li>
<li class="form-inline"><label class="hide" for="url">网址</label><input class="ipt" type="text" name="url" id="url" value="{% if user %}{{ user.link }}{% elif tourist %}{{ tourist.address }}{% endif %}" tabindex="4" placeholder="网址"><span class="help-inline">网址</span></li>
</ul>
</div>
</div>
</form>
</div>
<div id="postcomments">
{% if category == 'message'%}
{% get_comment_user_count category as user_num%}
{% build_comment_tree category request.path as htm %}
{% elif category == 'about' %}
{% get_comment_user_count category as user_num%}
{% build_comment_tree category request.path as htm %}
{% else %}
{% get_comment_user_count category category as user_num%}
{% build_comment_tree category request.path category as htm %}
{% endif %}
<div id="comments">
<i class="fa fa-comments-o"></i> <b> ({{ user_num }})</b>个小伙伴在吐槽
</div>
{{ htm }}
<div class="commentnav" >
</div>
</div>