~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to templates/news/post_detail.html

  • Committer: Holger Rapp
  • Date: 2009-02-21 18:24:02 UTC
  • Revision ID: sirver@kallisto.local-20090221182402-k3tuf5c4gjwslbjf
Main Page contains now the same informations as before

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{% extends "news/base_news.html" %}
2
2
 
 
3
 
 
4
{% load news %}
 
5
 
 
6
{% block title %}{{ object.title }} - News - {{ block.super }} {% endblock %}
 
7
{% block body_class %}{{ block.super }} post_detail{% endblock %}
 
8
{% block body_id %}post_{{ object.id }}{% endblock %}
 
9
 
 
10
 
 
11
{% block content %}
 
12
  <h2>{{ object.title }}</h2>
 
13
  <p class="other_posts">
 
14
    {% if object.get_previous_by_publish %}
 
15
    <a class="previous" href="{{ object.get_previous_post.get_absolute_url }}">&laquo; {{ object.get_previous_post }}</a>
 
16
    {% endif %}
 
17
    {% if object.get_next_by_publish %}
 
18
    | <a class="next" href="{{ object.get_next_post.get_absolute_url }}">{{ object.get_next_post }} &raquo;</a> 
 
19
    {% endif %}
 
20
  </p>
 
21
   
 
22
  {% post_detail object %}
 
23
 
 
24
  
 
25
 
3
26
{% comment %}
4
 
Base view to show a news post in the archive
5
 
{% endcomment %}
6
 
 
7
 
 
8
 
{% load threadedcommentstags %}
9
 
{% load static %}
10
 
 
11
 
{% block title %}{{ object.title }} - {{ block.super }}{% endblock %}
12
 
 
13
 
{% block extra_head %}
14
 
{{ block.super }}
15
 
        <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/news.css' %}" />
16
 
        <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/comments.css' %}" />
17
 
{% endblock %}
18
 
 
19
 
{% block content_header %}
20
 
        <h1>News: {{ object.title }}</h1><br />
21
 
        <div class="linksBox">
22
 
                <a href="{% url 'news_index' %}">News Archive: </a>
23
 
                {% if object.get_previous_by_publish %}
24
 
                        <a href="{{ object.get_previous_post.get_absolute_url }}">&laquo; {{ object.get_previous_post }}</a>
25
 
                {% endif %}
26
 
                {% if object.get_next_post %}
27
 
                        | <a href="{{ object.get_next_post.get_absolute_url }}">{{ object.get_next_post }} &raquo;</a> 
28
 
                {% endif %}
29
 
        </div>{% endblock %}
30
 
 
31
 
{% block content_main %}
32
 
 
33
 
        {% include "news/inlines/post_detail.html" %}
34
 
 
35
 
        <div class="blogEntry">
36
 
                <h3 id="comment_anchor">Comments on this Post:</h3>
37
 
                {% include "threadedcomments/inlines/comments.html" %}
38
 
        </div>
 
27
  {% get_comment_list for object as comment_list %}
 
28
  {% if comment_list %}
 
29
  <div id="comments">
 
30
     <a name="comments"></a>
 
31
     <h3 class="comments_title">Comments</h3>
 
32
     {% for comment in comment_list %}
 
33
     {% if comment.is_public %}
 
34
     <div class="comment">
 
35
        <h5 class="name">
 
36
           <a name="c{{ comment.id }}" href="{{ comment.get_absolute_url }}" title="Permalink to {{ comment.person_name }}'s comment" class="count">{{ forloop.counter }}</a> 
 
37
           {% if comment.user_url %}<a href="{{ comment.user_url }}">{{ comment.user_name }}</a>{% else %}{{ comment.user_name }}{% endif %} says...
 
38
        </h5>
 
39
        {{ comment.comment|urlizetrunc:"60"|markdown:"safe" }}
 
40
        <p class="date">Posted at {{ comment.submit_date|date:"P" }} on {{ comment.submit_date|date:"F j, Y" }}</p>
 
41
     </div>
 
42
     {% endif %}
 
43
     {% endfor %}
 
44
  </div>
 
45
  {% endif %}
 
46
  {% if object.allow_comments %}
 
47
    {% render_comment_form for object %}
 
48
  {% else %}
 
49
    <div id="comment_form">
 
50
      <h3>Comments are closed.</h3>
 
51
      <p>Comments have been close for this post.</p>
 
52
    </div>
 
53
  {% endif %}
 
54
  {% endcomment %}
39
55
{% endblock %}