view gpp/templates/forums/post_list.html @ 505:a5d11471d031

Refactor the logic in the rate limiter decorator. Check to see if the request was ajax, as the ajax view always returns 200. Have to decode the JSON response to see if an error occurred or not.
author Brian Neal <bgneal@gmail.com>
date Sat, 03 Dec 2011 19:13:38 +0000
parents 593fb6dbd449
children
line wrap: on
line source
{% extends 'base.html' %}
{% 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 }}
{% if page.object_list %}
<dl id="forums-post-list">
   {% for post in page.object_list %}
   <dt>
      <a href="{{ post.topic.forum.get_absolute_url }}" title="Visit Forum">{{ post.topic.forum.name }}</a> &raquo;
         <a href="{{ post.topic.get_absolute_url }}" title="Visit Topic">{{ post.topic.name }}</a> &raquo;
         <a href="{{ post.get_absolute_url }}" title="View Post in Context">
            {% forum_date post.creation_date user %}</a>
   </dt>
   <dd class="{% cycle 'odd' 'even' %}">
      {{ post.html|safe }}
   </dd>
   {% endfor %}
</dl>
{% else %}
   <h4>No posts found.</h4>
{% endif %}
{{ page_nav }}
</div>
{% endblock %}