annotate gpp/templates/forums/topic_list.html @ 520:e94570675664

Created stats for users (number of users and list of newest users). Better separated the forums, who's online, and user stats. Use a Celery task to execute the new user stats processing. This addresses #194 and #238.
author Brian Neal <bgneal@gmail.com>
date Sat, 17 Dec 2011 23:19:15 +0000
parents 3c48a555298d
children
rev   line source
bgneal@167 1 {% extends 'base.html' %}
bgneal@310 2 {% load url from future %}
bgneal@492 3 {% load bio_tags %}
bgneal@167 4 {% load forum_tags %}
bgneal@167 5 {% block title %}Forums: {{ title }}{% endblock %}
bgneal@280 6 {% block custom_js %}
bgneal@280 7 {% include "forums/forum_query.js" %}
bgneal@280 8 {% endblock %}
bgneal@167 9 {% block content %}
bgneal@283 10 {% forum_navigation title %}
bgneal@280 11 {% include "forums/forum_query.html" %}
bgneal@167 12 <div class="forum-block">
bgneal@167 13 {{ page_nav }}
bgneal@167 14 <table class="forum-topic-table">
bgneal@167 15 <thead>
bgneal@167 16 <th class="col-0">Forum</th>
bgneal@167 17 <th class="col-1">Topic</th>
bgneal@167 18 <th class="col-2">Author</th>
bgneal@167 19 <th class="col-3">Replies</th>
bgneal@167 20 <th class="col-4">Views</th>
bgneal@167 21 <th class="col-5">Last Post</th>
bgneal@167 22 </thead>
bgneal@167 23 <tbody>
bgneal@167 24 {% for topic in page.object_list %}
bgneal@167 25 <tr class="{% cycle 'odd' 'even' %}">
bgneal@167 26 <td class="col-0">
bgneal@167 27 <h4><a href="{{ topic.forum.get_absolute_url }}">{{ topic.forum.name }}</a></h4>
bgneal@167 28 </td>
bgneal@167 29 <td class="col-1">
bgneal@167 30 {% topic_icons topic %}
bgneal@374 31 <h4>{% if unread %}<a href="{% url 'forums-topic_unread' id=topic.id %}">{% else %}<a href="{{ topic.get_absolute_url }}">{% endif %}{{ topic.name }}</a></h4>
bgneal@167 32 {% if topic.page_range %}
bgneal@167 33 {% topic_page_range topic %}
bgneal@167 34 {% endif %}
bgneal@167 35 </td>
bgneal@167 36 <td class="col-2">
bgneal@492 37 {% profile_link topic.user.username %}
bgneal@167 38 </td>
bgneal@167 39 <td class="col-3">
bgneal@167 40 {{ topic.reply_count }}
bgneal@167 41 </td>
bgneal@167 42 <td class="col-4">
bgneal@167 43 {{ topic.view_count }}
bgneal@167 44 </td>
bgneal@167 45 <td class="col-5">
bgneal@167 46 {% last_post_info topic.last_post %}
bgneal@167 47 </td>
bgneal@167 48 </tr>
bgneal@167 49 {% empty %}
bgneal@167 50 <tr>
bgneal@167 51 <td colspan="6" class="info">
bgneal@167 52 <em>No topics meet your search criteria.</em>
bgneal@167 53 </td>
bgneal@167 54 </tr>
bgneal@167 55 {% endfor %}
bgneal@167 56 </tbody>
bgneal@167 57 </table>
bgneal@384 58
bgneal@384 59 {% if unread and page.object_list %}
bgneal@384 60 <form action="{% url 'forums-catchup_all' %}" method="post">{% csrf_token %}
bgneal@384 61 <input type="submit" value="Mark All Forums Read" />
bgneal@384 62 </form>
bgneal@384 63 <br />
bgneal@384 64
bgneal@384 65 {% endif %}
bgneal@167 66 {{ page_nav }}
bgneal@167 67 </div>
bgneal@167 68 {% endblock %}