comparison gpp/templates/forums/index.html @ 170:6f14970b103a

Implement #52 Forums RSS feeds.
author Brian Neal <bgneal@gmail.com>
date Thu, 11 Feb 2010 02:29:03 +0000
parents cf9f9d4c4d54
children 423c39ee44e0
comparison
equal deleted inserted replaced
169:7071b196ddd5 170:6f14970b103a
1 {% extends 'base.html' %} 1 {% extends 'base.html' %}
2 {% load cache %} 2 {% load cache %}
3 {% load forum_tags %} 3 {% load forum_tags %}
4 {% block custom_head %}
5 {% for feed in feeds %}
6 <link rel="alternate" type="application/rss+xml" title="{{ feed.name }}" href="{{ feed.feed }}" />
7 {% endfor %}
8 {% endblock %}
4 {% block title %}Forums{% endblock %} 9 {% block title %}Forums{% endblock %}
5 {% block content %} 10 {% block content %}
6 <h2>Forums</h2> 11 <h2>Forums <a href="/feeds/forums/"><img src="{{ MEDIA_URL }}icons/feed.png" alt="Forums Feed" title="Forums Feed" /></a></h2>
7 12
8 <form action="." method="get" id="forum-query-form"> 13 <form action="." method="get" id="forum-query-form">
9 <select name="query"> 14 <select name="query">
10 <option value="unread">Show topics with unread posts</option> 15 <option value="unread">Show topics with unread posts</option>
11 <option value="mine">Show my posts</option> 16 <option value="mine">Show my posts</option>
30 <tr class="{% cycle 'odd' 'even' %}"> 35 <tr class="{% cycle 'odd' 'even' %}">
31 <td> 36 <td>
32 {% if forum.has_unread %} 37 {% if forum.has_unread %}
33 <img src="{{ MEDIA_URL }}icons/new.png" alt="New Posts" title="New Posts" class="forums-topic-icon" /> 38 <img src="{{ MEDIA_URL }}icons/new.png" alt="New Posts" title="New Posts" class="forums-topic-icon" />
34 {% endif %} 39 {% endif %}
35 <h4><a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a></h4> 40 <h4><a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a>
41 {% if forum.has_feed %}
42 <a href="/feeds/forums/{{ forum.slug }}">
43 <img src="{{ MEDIA_URL }}icons/feed.png" alt="RSS Feed" title="Feed for this forum" /></a>
44 {% endif %}</h4>
36 <p>{{ forum.description }}</p></td> 45 <p>{{ forum.description }}</p></td>
37 <td class="forum-topics">{{ forum.topic_count }}</td> 46 <td class="forum-topics">{{ forum.topic_count }}</td>
38 <td class="forum-posts">{{ forum.post_count }}</td> 47 <td class="forum-posts">{{ forum.post_count }}</td>
39 <td class="forum-last_post">{% last_post_info forum.last_post %}</td> 48 <td class="forum-last_post">{% last_post_info forum.last_post %}</td>
40 </tr> 49 </tr>