2 {% load threadedcommentstags %}
4 <script type="text/javascript">
5 function showReply(comment_id) {
6 YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'block');
7 YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'none');
10 function hideReply(comment_id) {
11 YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'none');
12 YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'block');
17 {% for comment in comments %}
18 <div style="margin-left: {{ comment.depth }}em;" class="comment{% if not comment.is_public %} private{% endif %}">
19 {{ comment.user }} said:<br/>
20 {% auto_transform_markup comment %}
21 <p style="display:none;" id="replyLink{{comment.id}}">
22 <a href="javascript:showReply('{{comment.id}}');">{% trans "Reply to this comment" %}</a>
24 <div id="replyForm{{comment.id}}" class="commentReplyForm">
25 <script type="text/javascript">hideReply('{{comment.id}}');</script>
26 <form method="post" action="{% url influences_influence_comment_parent object.id,comment.id %}">
27 <p><a href="javascript:hideReply('{{comment.id}}');">{% trans "Cancel reply" %}</a></p>
29 {{ comment.reply_form.as_table }}
32 <input type="hidden" name="next" value="{{ request.path }}" />
33 <input type="submit" value="{% trans "Reply to this comment" %}" />
34 <input type="submit" name="preview" value="{% trans "Preview" %}" />
41 {% trans "No comments were added yet" %}
44 <p style="display:none;" id="replyLink"><a href="javascript:showReply('')">Add comment</a></p>
46 <script type="text/javascript">hideReply('')</script>
47 <h3>{% trans "Add comment" %}</h3>
48 <form method="post" action="{% url influences_influence_comment object.id %}">
49 <p><a href="javascript:hideReply('')">Cancel comment</a></p>
51 {{ comment_form.as_table }}
54 <input type="hidden" name="next" value="{{ request.path }}" />
55 <input type="submit" value="{% trans "Add comment" %}" />
56 <input type="submit" name="preview" value="{% trans "Preview" %}" />