Mercurial > public > sg101
diff sg101/templates/forums/topic_list.html @ 581:ee87ea74d46b
For Django 1.4, rearranged project structure for new manage.py.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 May 2012 17:10:48 -0500 |
parents | gpp/templates/forums/topic_list.html@3c48a555298d |
children | 25a408bb71a3 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sg101/templates/forums/topic_list.html Sat May 05 17:10:48 2012 -0500 @@ -0,0 +1,68 @@ +{% extends 'base.html' %} +{% load url from future %} +{% load bio_tags %} +{% load forum_tags %} +{% block title %}Forums: {{ title }}{% endblock %} +{% block custom_js %} +{% include "forums/forum_query.js" %} +{% endblock %} +{% block content %} +{% forum_navigation title %} +{% include "forums/forum_query.html" %} +<div class="forum-block"> +{{ page_nav }} +<table class="forum-topic-table"> + <thead> + <th class="col-0">Forum</th> + <th class="col-1">Topic</th> + <th class="col-2">Author</th> + <th class="col-3">Replies</th> + <th class="col-4">Views</th> + <th class="col-5">Last Post</th> + </thead> + <tbody> + {% for topic in page.object_list %} + <tr class="{% cycle 'odd' 'even' %}"> + <td class="col-0"> + <h4><a href="{{ topic.forum.get_absolute_url }}">{{ topic.forum.name }}</a></h4> + </td> + <td class="col-1"> + {% topic_icons topic %} + <h4>{% if unread %}<a href="{% url 'forums-topic_unread' id=topic.id %}">{% else %}<a href="{{ topic.get_absolute_url }}">{% endif %}{{ topic.name }}</a></h4> + {% if topic.page_range %} + {% topic_page_range topic %} + {% endif %} + </td> + <td class="col-2"> + {% profile_link topic.user.username %} + </td> + <td class="col-3"> + {{ topic.reply_count }} + </td> + <td class="col-4"> + {{ topic.view_count }} + </td> + <td class="col-5"> + {% last_post_info topic.last_post %} + </td> + </tr> + {% empty %} + <tr> + <td colspan="6" class="info"> + <em>No topics meet your search criteria.</em> + </td> + </tr> + {% endfor %} + </tbody> +</table> + +{% if unread and page.object_list %} +<form action="{% url 'forums-catchup_all' %}" method="post">{% csrf_token %} + <input type="submit" value="Mark All Forums Read" /> +</form> +<br /> + +{% endif %} +{{ page_nav }} +</div> +{% endblock %}