Mercurial > public > sg101
diff gpp/templates/forums/topic.html @ 310:daa2916f5b34
Fixing 145; New url tag behavior (forwards compatibility) in Django 1.3.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 20 Jan 2011 04:03:48 +0000 |
parents | 8fd4984d5c3b |
children | 88b2b9cb8c1f |
line wrap: on
line diff
--- a/gpp/templates/forums/topic.html Mon Jan 17 04:00:59 2011 +0000 +++ b/gpp/templates/forums/topic.html Thu Jan 20 04:03:48 2011 +0000 @@ -1,4 +1,5 @@ {% extends 'base.html' %} +{% load url from future %} {% load forum_tags %} {% block title %}Forums: {{ topic.name }}{% endblock %} {% block custom_js %}{{ form.media }}{% endblock %} @@ -20,7 +21,7 @@ <a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> {% endif %} {% endif %} -• <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> +• <a href="{% url 'forums-new_topic' slug=forum.slug %}">New Topic</a> {{ page_nav }} <table class="forum-topic" id="forum-topic"> @@ -31,19 +32,19 @@ {{ page_nav }} {% if can_moderate %} <div class="forum-mod-controls"> - <form action="{% url forums-mod_topic_stick topic.id %}" method="post">{% csrf_token %} + <form action="{% url 'forums-mod_topic_stick' topic.id %}" method="post">{% csrf_token %} <input type="submit" value="{% if topic.sticky %}Unstick{% else %}Stick{% endif %} Topic" /> </form> - <form action="{% url forums-mod_topic_lock topic.id %}" method="post">{% csrf_token %} + <form action="{% url 'forums-mod_topic_lock' topic.id %}" method="post">{% csrf_token %} <input type="submit" value="{% if topic.locked %}Unlock{% else %}Lock{% endif %} Topic" /> </form> - <form action="{% url forums-mod_topic_delete topic.id %}" method="post">{% csrf_token %} + <form action="{% url 'forums-mod_topic_delete' topic.id %}" method="post">{% csrf_token %} <input type="submit" value="Delete Topic" id="forum-mod-del-topic" /> </form> - <a href="{% url forums-mod_topic_move topic.id %}"><img src="{{ MEDIA_URL }}icons/application_go.png" alt="Move Topic" title="Move Topic" /></a> - <a href="{% url forums-mod_topic_move topic.id %}">Move this topic</a> - <a href="{% url forums-mod_topic_split topic.id %}"><img src="{{ MEDIA_URL }}icons/arrow_branch.png" alt="Split Topic" title="Split Topic" /></a> - <a href="{% url forums-mod_topic_split topic.id %}">Split this topic</a> + <a href="{% url 'forums-mod_topic_move' topic.id %}"><img src="{{ MEDIA_URL }}icons/application_go.png" alt="Move Topic" title="Move Topic" /></a> + <a href="{% url 'forums-mod_topic_move' topic.id %}">Move this topic</a> + <a href="{% url 'forums-mod_topic_split' topic.id %}"><img src="{{ MEDIA_URL }}icons/arrow_branch.png" alt="Split Topic" title="Split Topic" /></a> + <a href="{% url 'forums-mod_topic_split' topic.id %}">Split this topic</a> </div> {% endif %} @@ -53,7 +54,7 @@ {% endif %} {% if user.is_authenticated %} -<form action={% if is_favorite %}"{% url forums-unfavorite_topic topic.id %}"{% else %}"{% url forums-favorite_topic topic.id %}"{% endif %} method="post">{% csrf_token %} +<form action={% if is_favorite %}"{% url 'forums-unfavorite_topic' topic.id %}"{% else %}"{% url 'forums-favorite_topic' topic.id %}"{% endif %} method="post">{% csrf_token %} <fieldset> <legend>Favorite Options</legend> <p> @@ -69,12 +70,12 @@ </p> <p> To manage all your forum topic favorites, please visit your - <a href="{% url forums-manage_favorites %}">favorites page</a>. + <a href="{% url 'forums-manage_favorites' %}">favorites page</a>. </p> </fieldset> </form> -<form action={% if is_subscribed %}"{% url forums-unsubscribe_topic topic.id %}"{% else %}"{% url forums-subscribe_topic topic.id %}"{% endif %} method="post">{% csrf_token %} +<form action={% if is_subscribed %}"{% url 'forums-unsubscribe_topic' topic.id %}"{% else %}"{% url 'forums-subscribe_topic' topic.id %}"{% endif %} method="post">{% csrf_token %} <fieldset> <legend>Subscription Options</legend> <p> @@ -90,7 +91,7 @@ </p> <p> To manage all your forum topic subscriptions, please visit your - <a href="{% url forums-manage_subscriptions %}">subscriptions page</a>. + <a href="{% url 'forums-manage_subscriptions' %}">subscriptions page</a>. </p> </fieldset> </form>