]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/node/comments.html
a84ef89d5583d46b518aa6a61ee647e75434f683
[osqa.git] / forum / skins / default / templates / node / comments.html
1 {% load extra_tags %}\r
2 {% load i18n %}\r
3 \r
4 {% if show_latest_comments_first %}{% include "node/comment_skeleton.html" %}{% endif %}\r
5 \r
6 <div class="comments-container" id="comments-container-{{ post.id }}">\r
7     {% for comment in comments %}\r
8         <a name="{{ comment.id }}"></a>\r
9         <div class="comment{% if not comment.top_scorer %} not_top_scorer{% endif %}" id="comment-{{comment.id}}">\r
10             <div id="post-{{ comment.id }}-score" class="comment-score">{% if comment.score %}{{ comment.score }}{% endif %}</div>\r
11             <div class="comment-text">{{ comment.comment }}</div>\r
12             <div class="comment-info" id="comment-{{comment.id}}-info">\r
13                 {% if comment.can_like %}\r
14                     <a id="post-{{ comment.id }}-upvote" href="{% url like_comment id=comment.id %}"\r
15                      title="{% trans "I like this comment (click again to cancel)" %}" class="ajax-command comment-like{% if comment.likes %} on{% endif %}"\r
16                     rel="nofollow"> </a>\r
17                 {% endif %}\r
18                 {% if comment.can_edit %}\r
19                     <a id="comment-{{ comment.id }}-edit" href="{% url node_markdown id=comment.id %}" title="{% trans "Edit comment" %}"\r
20                         class="comment-edit" rel="nofollow"> </a>\r
21                 {% endif %}\r
22                 {% if comment.can_delete %}\r
23                     <a id="comment-{{ comment.id }}-delete" href="{% url delete_comment id=comment.id %}" title="{% trans "Delete comment" %}"\r
24                         class="ajax-command comment-delete confirm" rel="nofollow"> </a>\r
25                 {% endif %}\r
26                 {% if comment.can_convert %}\r
27                     <a rel="nofollow" id="comment-{{ comment.id }}-convert" href="{% url convert_comment id=comment.id %}" title="{% trans "Convert comment to answer" %}"\r
28                         class="ajax-command comment-convert confirm" rel="nofollow"> </a>\r
29                     <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
30                         class="comment-convert-to-question" rel="nofollow"> </a>\r
31                 {% endif %}\r
32 \r
33                 {% if comment.additional_controls %}\r
34                     {{ comment.additional_controls }}\r
35                 {% endif %}\r
36 \r
37                 <span class="comment-age">({% diff_date comment.added_at %})</span>\r
38                 <a class="comment-user userinfo" href="{{comment.user.get_profile_url}}">{{comment.user.decorated_name}}</a>\r
39                 {% if show_gravatar %}{% gravatar comment.user 18 %}{% endif %}\r
40             </div>\r
41         </div>\r
42     {% endfor %}\r
43 </div>\r
44 <div id="comment-tools-{{ post.id }}" class="comment-tools">\r
45     {% ifnotequal showing total %}\r
46         <span class="comments-showing">\r
47             {% blocktrans %}showing {{ showing }} of {{ total }}{% endblocktrans %}\r
48         </span>\r
49         <a href="#" class="show-all-comments-link">{% blocktrans %}show {{ more_comments_count }} more comments{% endblocktrans %}</a>\r
50     {% endifnotequal %}\r
51     {% if can_comment %}\r
52         <a href="#" class="add-comment-link">{% trans "add new comment" %}</a>\r
53     {% endif %}\r
54 </div>\r
55 \r
56 {% if not show_latest_comments_first %}{% include "node/comment_skeleton.html" %}{% endif %}\r