]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/node/comments.html
Merge pull request #42 from aniketschneider/validation-email-template
[osqa.git] / forum / skins / default / templates / node / comments.html
index 3457aab60491aa5b8a9bafc755b89a5bfa4a4bd4..4959db54ba94a6577dc5a1c4974a5c98f8144ac5 100644 (file)
-{% load extra_tags %}\r
-{% load i18n %}\r
-\r
-<div class="clear"></div>\r
-<div id="comment-{{ post.id }}-form-container" class="comment-form-container">\r
-    {% if can_comment %}\r
-    <form id="comment-{{ post.id }}-form" method="post" action="{% url comment id=post.id %}" accept-charset="utf-8">\r
-        {% csrf_token %}\r
-        <div class="comment-form-widgets-container">\r
-            <textarea name="comment" class="commentBox" id="comment"></textarea>\r
-            <div class="comment-form-buttons">\r
-                <span id="comment-{{ post.id }}-chars-left" class="comment-chars-left">\r
-                    <span class="comments-char-left-count">{{ min_length }}|{{ max_length }}</span>\r
-                    <span class="comments-chars-togo-msg">{% trans "characters needed" %}</span>\r
-                    <span class="comments-chars-left-msg">{% trans "characters left" %}</span>\r
-                </span>\r
-                <input type="submit" class="comment-submit" value="{% trans " comment" %}" />\r
-                <input type="submit" class="comment-cancel" value="{% trans " cancel" %}" />\r
-            </div>\r
-            <div class="clear"></div>\r
-            {% if user.can_use_canned_comments %}\r
-            <div class="canned_comment">\r
-                <span id="post-{{ post.id }}-menu" class="context-menu">\r
-                    <span id="post-{{ post.id }}-menu-trigger" class="action-link context-menu-trigger">{% trans "Use canned comment" %}</span>\r
-                    <ul id="post-{{ post.id }}-menu-dropdown" class="context-menu-dropdown" style="width: 275px;">\r
-                        {% for canned_comment in canned_comments %}\r
-                        <li class="item">\r
-                            <a style="white-space: pre-wrap;" href="javascript:void(0);" onclick="canned_comment({{ post.id }}, jQuery(this).text())">{{ canned_comment }}</a>\r
-                        </li>\r
-                        {% endfor %}\r
-                    </ul>\r
-                </span>\r
-            </div>\r
-            {% endif %}\r
-        </div>\r
-        <script type="text/html" class="new-comment-skeleton" id="new-comment-skeleton-{{ post.id }}">\r
-            <div class="comment{% if not comment.top_scorer %} not_top_scorer{% endif %}" id="comment-%ID%">\r
-                <div id="post-%ID%-score" class="comment-score"></div>\r
-                <div class="comment-text">%COMMENT%</div>\r
-                <div class="comment-info" id="comment-%ID%-info">\r
-                    <a id="comment-%ID%-edit" href="%EDIT_URL%" title="{% trans "Edit comment" %}"\r
-                        class="comment-edit" rel="nofollow"> </a>\r
-                    <a id="comment-%ID%-delete" href="%DELETE_URL%" title="{% trans "Delete comment" %}"\r
-                        class="ajax-command comment-delete confirm" rel="nofollow"> </a>\r
-                    <a rel="nofollow" id="comment-%ID%-convert" style="display:none;" href="%CONVERT_URL%" title="{% trans "Convert comment to answer" %}"\r
-                        class="ajax-command comment-convert confirm" rel="nofollow"> </a>\r
-\r
-                    <span class="comment-age">({% trans "just now" %})</span>\r
-                    <a class="comment-user" href="%PROFILE_URL%">%USERNAME%</a>\r
-                    {% if user.is_authenticated %}\r
-                        {% if show_gravatar %}{% gravatar user 18 %}{% endif %}\r
-                    {% endif %}\r
-                </div>\r
-             </div>\r
-        </script>\r
-    </form>\r
-    {% endif %}\r
-</div>\r
-<div class="clear"></div>\r
-\r
-<div class="comments-container" id="comments-container-{{ post.id }}">\r
-    {% for comment in comments %}\r
-        <a name="{{ comment.id }}"></a>\r
-        <div class="comment{% if not comment.top_scorer %} not_top_scorer{% endif %}" id="comment-{{comment.id}}">\r
-            <div id="post-{{ comment.id }}-score" class="comment-score">{% if comment.score %}{{ comment.score }}{% endif %}</div>\r
-            <div class="comment-text">{{ comment.comment }}</div>\r
-            <div class="comment-info" id="comment-{{comment.id}}-info">\r
-                {% if comment.can_like %}\r
-                    <a id="post-{{ comment.id }}-upvote" href="{% url like_comment id=comment.id %}"\r
-                     title="{% trans "I like this comment (click again to cancel)" %}" class="ajax-command comment-like{% if comment.likes %} on{% endif %}"\r
-                    rel="nofollow"> </a>\r
-                {% endif %}\r
-                {% if comment.can_edit %}\r
-                    <a id="comment-{{ comment.id }}-edit" href="{% url node_markdown id=comment.id %}" title="{% trans "Edit comment" %}"\r
-                        class="comment-edit" rel="nofollow"> </a>\r
-                {% endif %}\r
-                {% if comment.can_delete %}\r
-                    <a id="comment-{{ comment.id }}-delete" href="{% url delete_comment id=comment.id %}" title="{% trans "Delete comment" %}"\r
-                        class="ajax-command comment-delete confirm" rel="nofollow"> </a>\r
-                {% endif %}\r
-                {% if comment.can_convert %}\r
-                    <a rel="nofollow" id="comment-{{ comment.id }}-convert" href="{% url convert_comment id=comment.id %}" title="{% trans "Convert comment to answer" %}"\r
-                        class="ajax-command comment-convert confirm" rel="nofollow"> </a>\r
-                    <a rel="nofollow" id="comment-{{ comment.id }}-convert-to-question" href="{% url convert_to_question id=comment.id %}?node_type=comment" title="{% trans "Convert comment to question" %}"\r
-                        class="comment-convert-to-question" rel="nofollow"> </a>\r
-                {% endif %}\r
-                    \r
-\r
-                <span class="comment-age">({% diff_date comment.added_at %})</span>\r
-                <a class="comment-user userinfo" href="{{comment.user.get_profile_url}}">{{comment.user.decorated_name}}</a>\r
-                {% if show_gravatar %}{% gravatar comment.user 18 %}{% endif %}\r
-            </div>\r
-        </div>\r
-    {% endfor %}\r
-</div>\r
-<div id="comment-tools-{{ post.id }}" class="comment-tools">\r
-    {% ifnotequal showing total %}\r
-        <span class="comments-showing">\r
-            {% blocktrans %}showing {{ showing }} of {{ total }}{% endblocktrans %}\r
-        </span>\r
-        <a href="#" class="show-all-comments-link">{% blocktrans %}show {{ more_comments_count }} more comments{% endblocktrans %}</a>\r
-    {% endifnotequal %}\r
-    {% if can_comment %}\r
-        <a href="#" class="add-comment-link">{% trans "add new comment" %}</a>\r
-    {% endif %}\r
-</div>\r
+{% load extra_tags %}
+{% load i18n %}
+
+{% if show_latest_comments_first %}{% include "node/comment_skeleton.html" %}{% endif %}
+
+<div class="comments-container" id="comments-container-{{ post.id }}">
+    {% for comment in comments %}
+        <a name="{{ comment.id }}"></a>
+        <div class="comment{% if not comment.top_scorer %} not_top_scorer{% endif %}" id="comment-{{comment.id}}">
+            <div id="post-{{ comment.id }}-score" class="comment-score">{% if comment.score %}{{ comment.score }}{% endif %}</div>
+            <div class="comment-text">{{ comment.comment }}</div>
+            <div class="comment-info" id="comment-{{comment.id}}-info">
+                {% if comment.can_like %}
+                    <a id="post-{{ comment.id }}-upvote" href="{% url "like_comment" id=comment.id %}"
+                     title="{% trans "I like this comment (click again to cancel)" %}" class="ajax-command comment-like{% if comment.likes %} on{% endif %}"
+                    rel="nofollow"> </a>
+                {% endif %}
+                {% if comment.can_edit %}
+                    <a id="comment-{{ comment.id }}-edit" href="{% url "node_markdown" id=comment.id %}" title="{% trans "Edit comment" %}"
+                        class="comment-edit" rel="nofollow"> </a>
+                {% endif %}
+                {% if comment.can_delete %}
+                    <a id="comment-{{ comment.id }}-delete" href="{% url "delete_comment" id=comment.id %}" title="{% trans "Delete comment" %}"
+                        class="ajax-command comment-delete confirm" rel="nofollow"> </a>
+                {% endif %}
+                {% if comment.can_convert %}
+                    <a rel="nofollow" id="comment-{{ comment.id }}-convert" href="{% url "convert_comment" id=comment.id %}" title="{% trans "Convert comment to answer" %}"
+                        class="ajax-command comment-convert confirm" rel="nofollow"> </a>
+                    <a rel="nofollow" id="comment-{{ comment.id }}-convert-to-question" href="{% url "convert_to_question" id=comment.id %}?node_type=comment" title="{% trans "Convert comment to question" %}"
+                        class="comment-convert-to-question" rel="nofollow"> </a>
+                {% endif %}
+
+                {% if comment.additional_controls %}
+                    {{ comment.additional_controls }}
+                {% endif %}
+
+                <span class="comment-age">({% diff_date comment.added_at %})</span>
+                <a class="comment-user userinfo" href="{{comment.user.get_profile_url}}">{{comment.user.decorated_name}}</a>
+                {% if show_gravatar %}{% gravatar comment.user 18 %}{% endif %}
+            </div>
+        </div>
+    {% endfor %}
+</div>
+<div id="comment-tools-{{ post.id }}" class="comment-tools">
+    {% ifnotequal showing total %}
+        <span class="comments-showing">
+            {% blocktrans %}showing {{ showing }} of {{ total }}{% endblocktrans %}
+        </span>
+        <a href="#" class="show-all-comments-link">{% blocktrans %}show {{ more_comments_count }} more comments{% endblocktrans %}</a>
+    {% endifnotequal %}
+    {% if can_comment %}
+        <a href="#" class="add-comment-link">{% trans "add new comment" %}</a>
+    {% endif %}
+</div>
+
+{% if not show_latest_comments_first %}{% include "node/comment_skeleton.html" %}{% endif %}