~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to templates/threadedcomments/inlines/reply_to.js

  • Committer: franku
  • Date: 2016-07-02 12:38:06 UTC
  • mfrom: (404.2.56 widelands)
  • Revision ID: somal@arcor.de-20160702123806-q69u3d48s1prrxds
merged the django1_8 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
    vim:ft=htmldjango:
3
3
{% endcomment %}
4
4
{% load threadedcommentstags %}
5
 
{% load wlprofile %}
 
5
{% load wlprofile_extras %}
6
6
 
7
7
<script type="text/javascript">
8
8
function show_reply_form(comment_id, url, depth) {
9
9
        var comment = $('#' + comment_id);
10
 
        var reply_link = $('#' + comment_id + " .reply_link");
 
10
        var reply_link = $('#' + comment_id + ' .reply_link');
11
11
        var reply_form = $('<div class="comment odd response" style="margin-left: ' + (depth+1) +'cm;">'
12
12
                        + '<table>'
13
13
                                + '<tr>'
14
14
                                        + '<td class="author">'
15
15
                {% if post.user.wlprofile.avatar %}
16
 
                                                + '<a href="{% url profile_view user %}">'
 
16
                                                + '<a href="{% url 'profile_view' user %}">'
17
17
                                                        + '<img style="width: 50px; height: 50px;" src="{{ user.wlprofile.avatar.url }}" />'
18
18
                                                + '</a>'
19
19
                {% endif %}
23
23
                                        + '<td class="text">'
24
24
                                                + '<form method="POST" action="' + url + '?next={{object.get_absolute_url}}">'
25
25
                                                        + '<span class="errormessage">{{ form.comment.errors }}</span>'
26
 
                                                        + '{{ form.comment }}'
 
26
                                                        /* NOCOMM franku: i don't know the reason why this do not work anymore
 
27
                                                           I just replaced it with the next line
 
28
                                                        + '{{ form.comment }}'*/
 
29
                                                        + '<textarea cols="40" id="id_comment" maxlength="1000" name="comment" rows="10"></textarea>'
27
30
                                                        + '<br />'
28
31
                                                        + '<input type="hidden" name="markup" value="1" />'
29
32
                                                        + '<input type="submit" value="Submit Comment" />'