root/lib/sct/sphenecoll/sphene/sphblog/templates/sphene/sphblog/blogindex.html

Revision 147:942e3ce3d7d2, 3.4 kB (checked in by Daniele Varrazzo <piro@develer.com>, 1 year ago)

Sphene package updated to r803.

Line 
1 {% extends "sphene/sphblog/base.html" %}
2
3 {% load sph_extras %}
4 {% load sphblog_extras %}
5 {% load i18n %}
6
7 {% block subtitle %}
8   {% if tag %}
9     {{ tag.name }}
10   {% else %}
11     {# {{ block.super }} #}
12     {% trans "Blog" %}
13   {% endif %}
14 {% endblock %}
15
16 {% block content %}
17
18   {% if allowpostcategories %}
19     <form method="post" name="postthread" action="{% sph_url 'sphblog_postthread' %}">
20       <select name="category">
21         {% for category in allowpostcategories %}
22           <option value="{{ category.id }}">{{ category.name }}</option>
23         {% endfor %}
24       </select>
25       <input type="submit" value="{% trans "Submit new Post" %}" />
26     </form>
27   {% endif %}
28
29   {% if category %}
30     <center><h1>{{ category.name }}</h1></center>
31     <p>
32     {% if user.is_authenticated %}
33       {% include "sphene/sphboard/_category_monitor.html" %}
34     {% else %}
35       Log in to add email notification.
36     {% endif %}
37     </p>
38   {% endif %}
39
40   {% if archive_year %}
41     {% if archive_month %}
42         <center><h2>Archive for {{ archive_month|humanize_month }}, {{ archive_year }}</h2></center>
43     {% else %}
44         <center><h2>Archive for {{ archive_year }}</h2></center>
45     {% endif %}
46   {% endif %}
47
48   {% if tag %}
49     <p class="sphtagheader">{% trans "Tag" %}: {{ tag.name }} / <a href="{% sph_url2 sphblog_index %}">{% trans "Back" %}</a></p>
50   {% endif %}
51
52   {% if not threads.object_list %}
53     <p>{% trans "There are no blog posts yet." %}</p>
54   {% endif %}
55
56   {% for thread in threads.object_list %}
57     {% sphblog_showblogpost thread %}
58   {% endfor %}
59
60   {# Pagination #}
61   <p align="right">
62   {% if threads.has_previous %}
63     {% if not archive_year %}
64       <a href="{% if tag %}{% sph_url2 sphblog_show_tag_posts tag_name=tag page=threads.previous_page_number %}{% else %}{% sph_url2 sphblog_paged_index page=threads.previous_page_number %}{% endif %}">Previous</a> |
65     {% else %}
66         {% if archive_month %}
67         <a href="{% sph_url2 sphblog_archive_month_paged page=threads.previous_page_number year=archive_year month=archive_month %}">Previous</a> |
68         {% else %}
69         <a href="{% sph_url2 sphblog_archive_year_paged page=threads.previous_page_number year=archive_year %}">Previous</a> |
70         {% endif %}
71     {% endif %}
72   {% endif %}
73   Page {{ threads.number }}
74   {% if threads.has_next %}
75     {% if not archive_year %}
76     | <a href="{% if tag %}{% sph_url2 sphblog_show_tag_posts tag_name=tag page=threads.next_page_number%}{% else %}{% sph_url2 sphblog_paged_index page=threads.next_page_number %}{% endif %}">Next</a>
77     {% else %}
78         {% if archive_month %}
79         | <a href="{% sph_url2 sphblog_archive_month_paged page=threads.next_page_number year=archive_year month=archive_month %}">Next</a>
80         {% else %}
81         | <a href="{% sph_url2 sphblog_archive_year_paged page=thread.next_page_number year=archive_year %}">Next</a>
82         {% endif %}
83     {% endif %}
84   {% endif %}
85   </p>
86   {# Pagination end #}
87
88   {% if all_tags %}
89     <div class="sph_all_tags">
90       <strong>{% trans "All used Tags:" %}</strong>
91       <ul>
92       {% for tag in all_tags %}
93         <li><a href="{% sph_url2 sphblog_show_tag_posts tag_name=tag.name%}">{{ tag.name }}</a></li>
94       {% endfor %}
95       </ul>
96     </div>
97   {% endif %}
98
99   <div class="sph_archive_list">
100     <strong>{% trans "Archive" %}</strong>
101     {% show_archive categories %}
102   </div>
103
104   <p>
105     <a href="{% sph_url2 sphblog-feeds url="latestposts" %}">{% trans "RSS Feed" %}</a>
106   </p>
107
108 {% endblock %}
Note: See TracBrowser for help on using the browser.