annotate gpp/templates/forums/forum_index.html @ 292:2367c4795c92

Added a legacy management command to import old news comments.
author Brian Neal <bgneal@gmail.com>
date Fri, 24 Dec 2010 22:20:30 +0000
parents 593fb6dbd449
children daa2916f5b34
rev   line source
bgneal@82 1 {% extends 'base.html' %}
bgneal@84 2 {% load forum_tags %}
bgneal@263 3 {% block custom_head %}
bgneal@263 4 {% if feed %}
bgneal@263 5 <link rel="alternate" type="application/rss+xml" title="{{ feed.name }}" href="{{ feed.feed }}" />
bgneal@263 6 {% endif %}
bgneal@263 7 {% endblock %}
bgneal@82 8 {% block title %}Forums: {{ forum.name }}{% endblock %}
bgneal@82 9 {% block content %}
bgneal@283 10 {% forum_navigation forum %}
bgneal@82 11
bgneal@82 12 <div class="forum-block">
bgneal@113 13 {% if user.is_authenticated %}
bgneal@113 14 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> &bull;
bgneal@194 15 <form action="{% url forums-catchup slug=forum.slug %}" method="post" style="display:inline">{% csrf_token %}
bgneal@113 16 <input type="submit" value="Mark All Topics Read" />
bgneal@113 17 </form>
bgneal@113 18 {% endif %}
bgneal@97 19 {{ page_nav }}
bgneal@82 20 <table class="forum-index-table">
bgneal@82 21 <thead>
bgneal@82 22 <tr>
bgneal@82 23 <th class="forum-index_title">Topics</th>
bgneal@82 24 <th class="forum-index_replies">Replies</th>
bgneal@82 25 <th class="forum-index_author">Author</th>
bgneal@82 26 <th class="forum-index_views">Views</th>
bgneal@82 27 <th class="forum-index_last_post">Last Post</th>
bgneal@82 28 </tr>
bgneal@82 29 </thead>
bgneal@82 30 <tbody>
bgneal@93 31 {% for topic in page.object_list %}
bgneal@93 32 <tr class="{% cycle 'odd' 'even' %}">
bgneal@114 33 <td>
bgneal@167 34 {% topic_icons topic %}
bgneal@161 35 <h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4>
bgneal@161 36 {% if topic.page_range %}
bgneal@167 37 {% topic_page_range topic %}
bgneal@161 38 {% endif %}
bgneal@161 39 </td>
bgneal@83 40 <td class="forum-index_replies">{{ topic.reply_count }}</td>
bgneal@85 41 <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 42 <td class="forum-index_views">{{ topic.view_count }}</td>
bgneal@82 43 <td class="forum-index_last_post">
bgneal@120 44 {% last_post_info topic.last_post %}
bgneal@82 45 </td>
bgneal@82 46 </tr>
bgneal@82 47 {% empty %}
bgneal@82 48 <tr>
bgneal@111 49 <td colspan="5">
bgneal@82 50 <i>No topics available.</i>
bgneal@82 51 </td>
bgneal@82 52 </tr>
bgneal@82 53 {% endfor %}
bgneal@82 54 </tbody>
bgneal@82 55 </table>
bgneal@97 56 {{ page_nav }}
bgneal@113 57 {% if user.is_authenticated %}
bgneal@113 58 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> &bull;
bgneal@194 59 <form action="{% url forums-catchup slug=forum.slug %}" method="post" style="display:inline">{% csrf_token %}
bgneal@113 60 <input type="submit" value="Mark All Topics Read" />
bgneal@113 61 </form>
bgneal@113 62 {% endif %}
bgneal@113 63 {% if can_moderate %}
bgneal@111 64 <p><a href="{% url forums-mod_forum slug=forum.slug %}">Moderate this forum</a></p>
bgneal@113 65 {% endif %}
bgneal@120 66 {% current_forum_time user %}
bgneal@82 67 </div>
bgneal@82 68 {% endblock %}