Mercurial > public > sg101
annotate gpp/templates/forums/index.html @ 479:32cec6cd8808
Refactor RateLimiter so that if Redis is not running, everything still runs normally (minus the rate limiting protection). My assumption that creating a Redis connection would throw an exception if Redis wasn't running was wrong. The exceptions actually occur when you issue a command. This is for #224.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 25 Sep 2011 00:49:05 +0000 |
parents | a1b03de20345 |
children | e94570675664 |
rev | line source |
---|---|
bgneal@81 | 1 {% extends 'base.html' %} |
bgneal@382 | 2 {% load url from future %} |
bgneal@164 | 3 {% load cache %} |
bgneal@84 | 4 {% load forum_tags %} |
bgneal@227 | 5 {% load core_tags %} |
bgneal@170 | 6 {% block custom_head %} |
bgneal@170 | 7 {% for feed in feeds %} |
bgneal@170 | 8 <link rel="alternate" type="application/rss+xml" title="{{ feed.name }}" href="{{ feed.feed }}" /> |
bgneal@170 | 9 {% endfor %} |
bgneal@280 | 10 {% include "forums/forum_query.js" %} |
bgneal@170 | 11 {% endblock %} |
bgneal@81 | 12 {% block title %}Forums{% endblock %} |
bgneal@81 | 13 {% block content %} |
bgneal@312 | 14 <h2>Forums <a href="/feeds/forums/"><img src="{{ STATIC_URL }}icons/feed.png" alt="Forums Feed" title="Forums Feed" /></a></h2> |
bgneal@81 | 15 |
bgneal@280 | 16 {% include "forums/forum_query.html" %} |
bgneal@167 | 17 |
bgneal@81 | 18 <div class="forum-block"> |
bgneal@81 | 19 {% for iter in cats %} |
bgneal@81 | 20 <h3>{{ iter.cat }}</h3> |
bgneal@81 | 21 <table class="forum-index-table"> |
bgneal@81 | 22 <thead> |
bgneal@81 | 23 <tr> |
bgneal@81 | 24 <th class="forum-title">Forum</th> |
bgneal@81 | 25 <th class="forum-topics">Topics</th> |
bgneal@81 | 26 <th class="forum-posts">Posts</th> |
bgneal@81 | 27 <th class="forum-last_post">Last Post</th> |
bgneal@81 | 28 </tr> |
bgneal@81 | 29 </thead> |
bgneal@81 | 30 <tbody> |
bgneal@81 | 31 {% for forum in iter.forums %} |
bgneal@94 | 32 <tr class="{% cycle 'odd' 'even' %}"> |
bgneal@113 | 33 <td> |
bgneal@113 | 34 {% if forum.has_unread %} |
bgneal@374 | 35 <a href="{{ forum.get_absolute_url }}"><img src="{{ STATIC_URL }}icons/new.png" alt="New Posts" title="New Posts" class="forums-topic-icon" /></a> |
bgneal@113 | 36 {% endif %} |
bgneal@263 | 37 <h4><a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a></h4> |
bgneal@263 | 38 <p>{{ forum.description }}</p> |
bgneal@263 | 39 </td> |
bgneal@81 | 40 <td class="forum-topics">{{ forum.topic_count }}</td> |
bgneal@81 | 41 <td class="forum-posts">{{ forum.post_count }}</td> |
bgneal@120 | 42 <td class="forum-last_post">{% last_post_info forum.last_post %}</td> |
bgneal@81 | 43 </tr> |
bgneal@81 | 44 {% endfor %} |
bgneal@81 | 45 </tbody> |
bgneal@81 | 46 </table> |
bgneal@81 | 47 {% endfor %} |
bgneal@382 | 48 <form action="{% url 'forums-catchup_all' %}" method="post">{% csrf_token %} |
bgneal@382 | 49 <input type="submit" value="Mark All Forums Read" /> |
bgneal@382 | 50 </form> |
bgneal@382 | 51 <br /> |
bgneal@164 | 52 {% cache 900 forum-stats-block %} |
bgneal@164 | 53 {% forum_stats %} |
bgneal@164 | 54 {% endcache %} |
bgneal@160 | 55 {% whos_online %} |
bgneal@120 | 56 <p>{% current_forum_time user %}</p> |
bgneal@81 | 57 </div> |
bgneal@81 | 58 {% endblock %} |