Mercurial > public > sg101
annotate gpp/templates/forums/forum_index.html @ 103:bb3f0d315c5f
Forums: added template support for displaying stickied topics.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 17 Sep 2009 00:20:00 +0000 |
parents | e67c4dd98db5 |
children | e5faf9f0c11a |
rev | line source |
---|---|
bgneal@82 | 1 {% extends 'base.html' %} |
bgneal@84 | 2 {% load forum_tags %} |
bgneal@82 | 3 {% block title %}Forums: {{ forum.name }}{% endblock %} |
bgneal@82 | 4 {% block content %} |
bgneal@82 | 5 <h2>Forums: {{ forum.name }}</h2> |
bgneal@82 | 6 |
bgneal@82 | 7 <h3> |
bgneal@82 | 8 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> » |
bgneal@82 | 9 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> |
bgneal@82 | 10 </h3> |
bgneal@82 | 11 |
bgneal@82 | 12 <div class="forum-block"> |
bgneal@93 | 13 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> |
bgneal@97 | 14 {{ page_nav }} |
bgneal@82 | 15 <table class="forum-index-table"> |
bgneal@82 | 16 <thead> |
bgneal@82 | 17 <tr> |
bgneal@82 | 18 <th class="forum-index_title">Topics</th> |
bgneal@82 | 19 <th class="forum-index_replies">Replies</th> |
bgneal@82 | 20 <th class="forum-index_author">Author</th> |
bgneal@82 | 21 <th class="forum-index_views">Views</th> |
bgneal@82 | 22 <th class="forum-index_last_post">Last Post</th> |
bgneal@82 | 23 </tr> |
bgneal@82 | 24 </thead> |
bgneal@82 | 25 <tbody> |
bgneal@93 | 26 {% for topic in page.object_list %} |
bgneal@93 | 27 <tr class="{% cycle 'odd' 'even' %}"> |
bgneal@103 | 28 <td>{% if topic.sticky %}<img src="{{ MEDIA_URL }}icons/asterisk_orange.png" alt="Sticky" title="Sticky" class="forums-topic-icon" />{% endif %} |
bgneal@103 | 29 {% if topic.locked %}<img src="{{ MEDIA_URL }}icons/lock.png" alt="Locked" title="Locked" |
bgneal@102 | 30 class="forums-topic-icon" />{% endif %} |
bgneal@102 | 31 <h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4></td> |
bgneal@83 | 32 <td class="forum-index_replies">{{ topic.reply_count }}</td> |
bgneal@85 | 33 <td class="forum-index_author"><a href="{% url bio-view_profile username=topic.user.username %}" title="View profile for {{ topic.user.username }}">{{ topic.user.username }}</a></td> |
bgneal@82 | 34 <td class="forum-index_views">{{ topic.view_count }}</td> |
bgneal@82 | 35 <td class="forum-index_last_post"> |
bgneal@94 | 36 {% last_post_info topic.last_post MEDIA_URL %} |
bgneal@82 | 37 </td> |
bgneal@82 | 38 </tr> |
bgneal@82 | 39 {% empty %} |
bgneal@82 | 40 <tr> |
bgneal@82 | 41 <td colspan="4"> |
bgneal@82 | 42 <i>No topics available.</i> |
bgneal@82 | 43 </td> |
bgneal@82 | 44 </tr> |
bgneal@82 | 45 {% endfor %} |
bgneal@82 | 46 </tbody> |
bgneal@82 | 47 </table> |
bgneal@97 | 48 {{ page_nav }} |
bgneal@82 | 49 </div> |
bgneal@82 | 50 {% endblock %} |