~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to templates/news/post_detail.html

  • Committer: Holger Rapp
  • Date: 2009-02-26 22:38:49 UTC
  • Revision ID: sirver@kallisto.local-20090226223849-1563ij0uuw0lz0zu
First version of widelands online help

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{% extends "news/base_news.html" %}
2
2
 
3
 
{% load wlprofile %}
4
3
{% load threadedcommentstags %}
5
4
{% load news %}
6
5
 
11
10
{% block extra_head %}
12
11
<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}/css/news.css" />{{ block.super }}
13
12
<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}/css/comments.css" />{{ block.super }}
 
13
<script type="text/javascript" src="{{ MEDIA_URL }}/js/jquery.js"></script>
14
14
{% endblock %}
15
15
 
16
16
{% block content %}
27
27
    {% include "news/inlines/post_detail.html" %}
28
28
    
29
29
    <!-- Comments below -->
30
 
    <h3>Comments on this Post:</h3>
31
 
    {% include "threadedcomments/inlines/comments.html" %}
 
30
    {% get_threaded_comment_form as form %}
 
31
    {% include "threadedcomments/inlines/reply_to.js" %}
 
32
  
 
33
    <h3>Comments on This Post:</h3>
 
34
    {% get_threaded_comment_tree for object as tree %}
 
35
    {% for comment in tree %}
 
36
        <div style="margin-left: {{ comment.depth }}em;" class="comment {% cycle "odd" "even" %}">
 
37
            <p class="author">{{ comment.user.username }} said:</p>
 
38
            {% auto_transform_markup comment %}
 
39
            {% if user.is_authenticated %}
 
40
            <p><a id="c{{ comment.id }}" href="javascript:show_reply_form('c{{ comment.id }}','{% get_comment_url object comment %}','{{ comment.user.username }}')">Reply</a></p>
 
41
            {% endif %}
 
42
        </div>
 
43
    {% endfor %}
 
44
    {% if user.is_authenticated %}
 
45
    <p>Reply to Original:</p>
 
46
    <form method="POST" action="{% get_comment_url object %}">
 
47
        <ul>
 
48
            {{ form.as_ul }}
 
49
            <li><input type="submit" value="Submit Comment" /></li>
 
50
        </ul>
 
51
    </form>
 
52
    {% else %}
 
53
    <p>Log in to post comments</p>
 
54
    {% endif %}
 
55
 
32
56
{% endblock %}