{% load i18n %}
{% load threadedcommentstags %}
-{% if comments %}
- <script type="text/javascript">
- function showReply(comment_id) {
- YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'block');
- YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'none');
- }
+<script type="text/javascript">
+ function showReply(comment_id) {
+ YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'block');
+ YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'none');
+ }
- function hideReply(comment_id) {
- YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'none');
- YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'block');
- }
- </script>
+ function hideReply(comment_id) {
+ YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'none');
+ YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'block');
+ }
+</script>
+{% if comments %}
{% for comment in comments %}
<div style="margin-left: {{ comment.depth }}em;" class="comment{% if not comment.is_public %} private{% endif %}">
{{ comment.user }} said:<br/>
{% else %}
{% trans "No comments were added yet" %}
{% endif %}
+
+<p style="display:none;" id="replyLink"><a href="javascript:showReply('')">Add comment</a></p>
+<div id="replyForm">
+<script type="text/javascript">hideReply('')</script>
+<h3>{% trans "Add comment" %}</h3>
+<form method="post" action="{% url influences_influence_comment object.id %}">
+ <p><a href="javascript:hideReply('')">Cancel comment</a></p>
+ <table>
+ {{ comment_form.as_table }}
+ </table>
+ <div><input type="submit" value="{% trans "Add comment" %}" /></div>
+ {# <input type="submit" name="preview" value="{% trans "Preview comment" %}" /></li> #}
+</form>
+</div>