]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/node/comments.html
044a1a37d423ce34b280ae0ab4d855b7af7b123f
[osqa.git] / forum / skins / default / templates / node / comments.html
1 {% load extra_tags %}\r
2 {% load i18n %}\r
3 \r
4 <div class="comments-container" id="comments-container-{{ post.id }}">\r
5     {% for comment in comments %}\r
6         <a name="{{ comment.id }}"></a>\r
7         <div class="comment{% if not comment.top_scorer %} not_top_scorer{% endif %}" id="comment-{{comment.id}}">\r
8             <div id="post-{{ comment.id }}-score" class="comment-score">{% if comment.score %}{{ comment.score }}{% endif %}</div>\r
9             <div class="comment-text">{{ comment.comment }}</div>\r
10             <div class="comment-info" id="comment-{{comment.id}}-info">\r
11                 {% if comment.can_like %}\r
12                     <a id="post-{{ comment.id }}-upvote" href="{% url like_comment id=comment.id %}"\r
13                      title="{% trans "I like this comment (click again to cancel)" %}" class="ajax-command comment-like{% if comment.likes %} on{% endif %}"\r
14                     rel="nofollow"> </a>\r
15                 {% endif %}\r
16                 {% if comment.can_edit %}\r
17                     <a id="comment-{{ comment.id }}-edit" href="{% url node_markdown id=comment.id %}" title="{% trans "Edit comment" %}"\r
18                         class="comment-edit" rel="nofollow"> </a>\r
19                 {% endif %}\r
20                 {% if comment.can_delete %}\r
21                     <a id="comment-{{ comment.id }}-delete" href="{% url delete_comment id=comment.id %}" title="{% trans "Delete comment" %}"\r
22                         class="ajax-command comment-delete confirm" rel="nofollow"> </a>\r
23                 {% endif %}\r
24                 {% if comment.can_convert %}\r
25                     <a rel="nofollow" id="comment-{{ comment.id }}-convert" href="{% url convert_comment id=comment.id %}" title="{% trans "Convert comment to answer" %}"\r
26                         class="ajax-command comment-convert confirm" rel="nofollow"> </a>\r
27                 {% endif %}\r
28                     \r
29 \r
30                 <span class="comment-age">({% diff_date comment.added_at %})</span>\r
31                 <a class="comment-user userinfo" href="{{comment.user.get_profile_url}}">{{comment.user.decorated_name}}</a>\r
32                 {% if show_gravatar %}{% gravatar comment.user 18 %}{% endif %}\r
33             </div>\r
34         </div>\r
35     {% endfor %}\r
36 </div>\r
37 <div id="comment-tools-{{ post.id }}" class="comment-tools">\r
38     {% ifnotequal showing total %}\r
39         <span class="comments-showing">\r
40             {% blocktrans %}showing {{ showing }} of {{ total }}{% endblocktrans %}\r
41         </span>\r
42         <a href="#" class="show-all-comments-link">{% trans "show all" %}</a>\r
43     {% endifnotequal %}\r
44     {% if can_comment %}\r
45         <a href="#" class="add-comment-link">{% trans "add new comment" %}</a>\r
46     {% endif %}\r
47 </div>\r
48 <div id="comment-{{ post.id }}-form-container" class="comment-form-container">\r
49     {% if can_comment %}\r
50     <form id="comment-{{ post.id }}-form" method="post" action="{% url comment id=post.id %}" accept-charset="utf-8">\r
51         <div class="comment-form-widgets-container">\r
52             <textarea name="comment" class="commentBox"></textarea>\r
53             <div class="comment-form-buttons">\r
54                 <span id="comment-{{ post.id }}-chars-left" class="comment-chars-left">\r
55                     <span class="comments-char-left-count">{{ min_length }}|{{ max_length }}</span>\r
56                     <span class="comments-chars-togo-msg">{% trans "characters needed" %}</span>\r
57                     <span class="comments-chars-left-msg">{% trans "characters left" %}</span>\r
58                 </span>\r
59                 <input type="submit" class="comment-submit" value="{% trans " comment" %}" />\r
60                 <input type="submit" class="comment-cancel" value="{% trans " cancel" %}" />\r
61             </div>\r
62         </div>\r
63         <script type="text/html" class="new-comment-skeleton" id="new-comment-skeleton-{{ post.id }}">\r
64             <div class="comment{% if not comment.top_scorer %} not_top_scorer{% endif %}" id="comment-%ID%">\r
65                 <div id="post-%ID%-score" class="comment-score"></div>\r
66                 <div class="comment-text">%COMMENT%</div>\r
67                 <div class="comment-info" id="comment-%ID%-info">\r
68                     <a id="comment-%ID%-edit" href="%EDIT_URL%"\r
69                         class="comment-edit" rel="nofollow"> </a>\r
70                     <a id="comment-%ID%-delete" href="%DELETE_URL%"\r
71                         class="ajax-command comment-delete confirm" rel="nofollow"> </a>\r
72                     <a rel="nofollow" id="comment-%ID%-convert" href="%CONVERT_URL%" title="{% trans "Convert comment to answer" %}"\r
73                         class="ajax-command comment-convert confirm" rel="nofollow"> </a>\r
74 \r
75                     <span class="comment-age">({% trans "just now" %})</span>\r
76                     <a class="comment-user" href="%PROFILE_URL%">%USERNAME%</a>\r
77                     {% if user.is_authenticated %}\r
78                         {% if show_gravatar %}{% gravatar user 18 %}{% endif %}\r
79                     {% endif %}\r
80                 </div>\r
81              </div>\r
82         </script>\r
83     </form>\r
84     {% endif %}\r
85 </div>\r
86     \r