]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/node/comments.html
Some small tweaks.
[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" rel="nofollow"> </a>\r
23                 {% endif %}\r
24                 <span class="comment-age">({% diff_date comment.added_at %})</span>\r
25                 <a class="comment-user userinfo" href="{{comment.user.get_profile_url}}">{{comment.user.decorated_name}}</a>\r
26                 {% if show_gravatar %}{% gravatar comment.user 18 %}{% endif %}\r
27             </div>\r
28         </div>\r
29     {% endfor %}\r
30 </div>\r
31 <div id="comment-tools-{{ post.id }}" class="comment-tools">\r
32     {% ifnotequal showing total %}\r
33         <span class="comments-showing">\r
34             {% blocktrans %}showing {{ showing }} of {{ total }}{% endblocktrans %}\r
35         </span>\r
36         <a href="#" class="show-all-comments-link">{% trans "show all" %}</a>\r
37     {% endifnotequal %}\r
38     {% if can_comment %}\r
39         <a href="#" class="add-comment-link">{% trans "add new comment" %}</a>\r
40     {% endif %}\r
41 </div>\r
42 <div id="comment-{{ post.id }}-form-container" class="comment-form-container">\r
43     {% if can_comment %}\r
44     <form id="comment-{{ post.id }}-form" method="post" action="{% url comment id=post.id %}" accept-charset="utf-8">\r
45         <div class="comment-form-widgets-container">\r
46             <textarea name="comment" class="commentBox"></textarea>\r
47             <div class="comment-form-buttons">\r
48                 <span id="comment-{{ post.id }}-chars-left" class="comment-chars-left">\r
49                     <span class="comments-char-left-count">{{ min_length }}|{{ max_length }}</span>\r
50                     <span class="comments-chars-togo-msg">{% trans "characters needed" %}</span>\r
51                     <span class="comments-chars-left-msg">{% trans "characters left" %}</span>\r
52                 </span>\r
53                 <input type="submit" class="comment-submit" value="{% trans " comment" %}" />\r
54                 <input type="submit" class="comment-cancel" value="{% trans " cancel" %}" />\r
55             </div>\r
56         </div>\r
57         <script type="text/html" class="new-comment-skeleton" id="new-comment-skeleton-{{ post.id }}">\r
58             <div class="comment{% if not comment.top_scorer %} not_top_scorer{% endif %}" id="comment-%ID%">\r
59                 <div id="post-%ID%-score" class="comment-score"></div>\r
60                 <div class="comment-text">%COMMENT%</div>\r
61                 <div class="comment-info" id="comment-{{comment.id}}-info">\r
62                     <a id="comment-%ID%-edit" href="%EDIT_URL%"\r
63                         class="comment-edit" rel="nofollow"> </a>\r
64                     <a id="comment-%ID%-delete" href="%DELETE_URL%"\r
65                         class="ajax-command comment-delete" rel="nofollow"> </a>\r
66                     <span class="comment-age">({% trans "just now" %})</span>\r
67                     <a class="comment-user" href="%PROFILE_URL%">%USERNAME%</a>\r
68                     {% if user.is_authenticated %}\r
69                         {% if show_gravatar %}{% gravatar user 18 %}{% endif %}\r
70                     {% endif %}\r
71                 </div>\r
72              </div>\r
73         </script>\r
74     </form>\r
75     {% endif %}\r
76 </div>\r
77