Mercurial > public > sg101
view gpp/templates/forums/mod_split_topic.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 | 88b2b9cb8c1f |
children |
line wrap: on
line source
{% extends 'base.html' %} {% load forum_tags %} {% block title %}Forums: Split Topic{% endblock %} {% block custom_js %}{{ form.media }}{% endblock %} {% block content %} {% forum_navigation topic "Split Topic" %} <div class="forum-block"> <p> Using the form below, you can split a topic into two. You can either specify which posts get split to the new topic ("Split Selected Posts"), or by selecting a post such that all posts at or below the selection get split ("Split At Selected Post"). <p> <form action="." method="post">{% csrf_token %} <table> {{ form.as_table }} <tr><td> </td><td> <input type="submit" name="split-selected" value="Split Selected Posts" /> <input type="submit" name="split-at" value="Split At Selected Post" /></td></tr> </table> <table class="forum-topic" id="forum-topic"> {% for post in posts %} <tr class="forum-post {% cycle 'odd' 'even' %}" id="post-{{ post.id }}"> <td class="forum-post-author">{{ post.user.username }}</td> <td class="forum-post-body"> <div class="forum-post-info quiet"> <a href="{{ post.get_absolute_url }}"><img src="{{ STATIC_URL }}icons/link.png" alt="Link" title="Link to this post" /></a> Posted on {{ post.creation_date|date:"M d, Y H:i" }} from IP: {{ post.user_ip }} </div> <div class="forum-post-body-split"> {{ post.html|safe }} </div> </td> <td class="forum-post-split-check"> {% if not forloop.first %} <input type="checkbox" name="post_ids" value="{{ post.id }}" /> {% endif %} </td> </tr> {% endfor %} </table> </form> </div> {% endblock %}