]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/blog/templates/blog/blog_index.html
make it so that registered/logged in users can see the non-live pages
[sommitrealweird.git] / sommitrealweird / blog / templates / blog / blog_index.html
1 {% extends "base.html" %}
2 {% load markup %}
3
4 {% block title %}
5 The world of sommitrealweird.
6 {% endblock %}
7
8 {% block content %}
9     {% if entries %}
10         {% for entry in entries %}
11             <h1>{{ entry.title|escape }}</h1>
12             <div class="blogentry">
13             {{ entry.content|restructuredtext }}
14             </div>
15             <p>Posted: {{ entry.publish_date|date:"Y-m-d H:i" }} in 
16                 {% for section in entry.sections.all %}
17                     {% if forloop.first %}
18                         <a href="{{ section.get_absolute_url }}">{{ section.title }}</a>{% if not forloop.last %}, {% endif %}
19                     {% else %}
20                         {% if forloop.last %}
21                             and <a href="{{ section.get_absolute_url }}">{{ section.title }}</a>
22                         {% else %}
23                             <a href="{{ section.get_abolute_url }}">{{ section.title }}</a>
24                         {% endif %}
25                     {% endif %}
26                 {% endfor %}
27                 <a href="{{ entry.get_absolute_url }}">permalink</a></p>
28         {% endfor %}
29         {% if paginated and has_more_than_one_page %}
30             <p class="paginator">Pages: 
31             {% if has_prev %}
32                 <a href="?page={{ prev }}">Previous</a> |
33             {% endif %}
34             {% for paginator_page in pages %}
35                 {% if forloop.first %}
36                 {% else %}
37                     |
38                 {% endif %}
39                 {% ifequal paginator_page page %}
40                     {{ page }}
41                 {% else %}
42                     <a href="?page={{ paginator_page }}">{{ paginator_page }}</a>
43                 {% endifequal %}
44             {% endfor %}
45             {% if has_next %}
46                 | <a href="?page={{ next }}">Next</a>
47             {% endif %}
48             </p>
49         {% endif %}
50     {% else %}
51         <p>We have no blog entries - that sucks!</p>
52     {% endif %}
53 {% endblock %}