Reformat blog links a bit
[sommitrealweird.git] / sommitrealweird / blog / templates / blog / single_entry_rst.html
index 5681e14e28a3475b1603ccc342b934220b3df269..2536c7521e440da47980beb867cfd125bc0e17fd 100644 (file)
@@ -1,8 +1,44 @@
 {% extends "base.html" %}
 
-{% load markup %}
+{% load xhtml11rst %}
+{% load comments %}
 
 {% block content %}
-<h1>{{ title }}</h1>
-{{ content|restructuredtext }}
+<h1>{{ entry.title }}</h1>
+<div class="blogentry">
+{{ entry.content|restructuredtext }}
+</div>
+<p>Posted: {{ entry.publish_date|date:"Y-m-d H:i" }} 
+    {% if entry.sections.count %}
+    in 
+    {% for section in entry.sections.all %}
+        {% if forloop.first %}
+            <a href="{{ section.get_absolute_url }}">{{ section.title }}</a>{% if not forloop.last %}, {% endif %}
+        {% else %}
+            {% if forloop.last %}
+                and <a href="{{ section.get_absolute_url }}">{{ section.title }}</a>
+            {% else %}
+                <a href="{{ section.get_abolute_url }}">{{ section.title }}</a>
+            {% endif %}
+        {% endif %}
+    {% endfor %}
+    {% endif %}
+    {% get_comment_count for entry as comment_count %}
+    | <a href="{{ entry.get_absolute_url }}">permalink</a> | Comments: {{ comment_count }}
+</p>
+{% if comment_count %}
+    <div class="comments">
+    <a name="comments"></a>
+    {% get_comment_list for entry as comment_list %}
+    {% for comment in comment_list %}
+    <div class="comment">
+        <h3>{{ comment.user_name }} - {{ comment.submit_date|date:"Y-m-d H:i" }}</h3>
+        {{ comment.comment }}
+    </div>
+    {% endfor %}
+    </div>
+{% endif %}
+<div class="comment_new">
+    {% render_comment_form for entry %}
+</div>
 {% endblock %}