Mercurial > public > sg101
comparison 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 |
comparison
equal
deleted
inserted
replaced
309:8a0bae48b6ca | 310:daa2916f5b34 |
---|---|
1 {% extends 'base.html' %} | 1 {% extends 'base.html' %} |
2 {% load url from future %} | |
2 {% load forum_tags %} | 3 {% load forum_tags %} |
3 {% block title %}Forums: {{ topic.name }}{% endblock %} | 4 {% block title %}Forums: {{ topic.name }}{% endblock %} |
4 {% block custom_js %}{{ form.media }}{% endblock %} | 5 {% block custom_js %}{{ form.media }}{% endblock %} |
5 {% block content %} | 6 {% block content %} |
6 {% forum_navigation topic %} | 7 {% forum_navigation topic %} |
18 <a href="#forum-reply-form">New Reply</a> | 19 <a href="#forum-reply-form">New Reply</a> |
19 {% else %} | 20 {% else %} |
20 <a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> | 21 <a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> |
21 {% endif %} | 22 {% endif %} |
22 {% endif %} | 23 {% endif %} |
23 • <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> | 24 • <a href="{% url 'forums-new_topic' slug=forum.slug %}">New Topic</a> |
24 {{ page_nav }} | 25 {{ page_nav }} |
25 | 26 |
26 <table class="forum-topic" id="forum-topic"> | 27 <table class="forum-topic" id="forum-topic"> |
27 {% for post in page.object_list %} | 28 {% for post in page.object_list %} |
28 {% include 'forums/display_post.html' %} | 29 {% include 'forums/display_post.html' %} |
29 {% endfor %} | 30 {% endfor %} |
30 </table> | 31 </table> |
31 {{ page_nav }} | 32 {{ page_nav }} |
32 {% if can_moderate %} | 33 {% if can_moderate %} |
33 <div class="forum-mod-controls"> | 34 <div class="forum-mod-controls"> |
34 <form action="{% url forums-mod_topic_stick topic.id %}" method="post">{% csrf_token %} | 35 <form action="{% url 'forums-mod_topic_stick' topic.id %}" method="post">{% csrf_token %} |
35 <input type="submit" value="{% if topic.sticky %}Unstick{% else %}Stick{% endif %} Topic" /> | 36 <input type="submit" value="{% if topic.sticky %}Unstick{% else %}Stick{% endif %} Topic" /> |
36 </form> | 37 </form> |
37 <form action="{% url forums-mod_topic_lock topic.id %}" method="post">{% csrf_token %} | 38 <form action="{% url 'forums-mod_topic_lock' topic.id %}" method="post">{% csrf_token %} |
38 <input type="submit" value="{% if topic.locked %}Unlock{% else %}Lock{% endif %} Topic" /> | 39 <input type="submit" value="{% if topic.locked %}Unlock{% else %}Lock{% endif %} Topic" /> |
39 </form> | 40 </form> |
40 <form action="{% url forums-mod_topic_delete topic.id %}" method="post">{% csrf_token %} | 41 <form action="{% url 'forums-mod_topic_delete' topic.id %}" method="post">{% csrf_token %} |
41 <input type="submit" value="Delete Topic" id="forum-mod-del-topic" /> | 42 <input type="submit" value="Delete Topic" id="forum-mod-del-topic" /> |
42 </form> | 43 </form> |
43 <a href="{% url forums-mod_topic_move topic.id %}"><img src="{{ MEDIA_URL }}icons/application_go.png" alt="Move Topic" title="Move Topic" /></a> | 44 <a href="{% url 'forums-mod_topic_move' topic.id %}"><img src="{{ MEDIA_URL }}icons/application_go.png" alt="Move Topic" title="Move Topic" /></a> |
44 <a href="{% url forums-mod_topic_move topic.id %}">Move this topic</a> | 45 <a href="{% url 'forums-mod_topic_move' topic.id %}">Move this topic</a> |
45 <a href="{% url forums-mod_topic_split topic.id %}"><img src="{{ MEDIA_URL }}icons/arrow_branch.png" alt="Split Topic" title="Split Topic" /></a> | 46 <a href="{% url 'forums-mod_topic_split' topic.id %}"><img src="{{ MEDIA_URL }}icons/arrow_branch.png" alt="Split Topic" title="Split Topic" /></a> |
46 <a href="{% url forums-mod_topic_split topic.id %}">Split this topic</a> | 47 <a href="{% url 'forums-mod_topic_split' topic.id %}">Split this topic</a> |
47 </div> | 48 </div> |
48 {% endif %} | 49 {% endif %} |
49 | 50 |
50 {% if last_page and can_reply %} | 51 {% if last_page and can_reply %} |
51 <a name="forum-reply-form"></a> | 52 <a name="forum-reply-form"></a> |
52 {% show_form "Reply to Topic" form "Submit Reply" 1 %} | 53 {% show_form "Reply to Topic" form "Submit Reply" 1 %} |
53 {% endif %} | 54 {% endif %} |
54 | 55 |
55 {% if user.is_authenticated %} | 56 {% if user.is_authenticated %} |
56 <form action={% if is_favorite %}"{% url forums-unfavorite_topic topic.id %}"{% else %}"{% url forums-favorite_topic topic.id %}"{% endif %} method="post">{% csrf_token %} | 57 <form action={% if is_favorite %}"{% url 'forums-unfavorite_topic' topic.id %}"{% else %}"{% url 'forums-favorite_topic' topic.id %}"{% endif %} method="post">{% csrf_token %} |
57 <fieldset> | 58 <fieldset> |
58 <legend>Favorite Options</legend> | 59 <legend>Favorite Options</legend> |
59 <p> | 60 <p> |
60 {% if is_favorite %} | 61 {% if is_favorite %} |
61 <img src="{{ MEDIA_URL }}icons/delete.png" alt="Favorite" /> | 62 <img src="{{ MEDIA_URL }}icons/delete.png" alt="Favorite" /> |
67 <input type="submit" value="Save to favorites" /> | 68 <input type="submit" value="Save to favorites" /> |
68 {% endif %} | 69 {% endif %} |
69 </p> | 70 </p> |
70 <p> | 71 <p> |
71 To manage all your forum topic favorites, please visit your | 72 To manage all your forum topic favorites, please visit your |
72 <a href="{% url forums-manage_favorites %}">favorites page</a>. | 73 <a href="{% url 'forums-manage_favorites' %}">favorites page</a>. |
73 </p> | 74 </p> |
74 </fieldset> | 75 </fieldset> |
75 </form> | 76 </form> |
76 | 77 |
77 <form action={% if is_subscribed %}"{% url forums-unsubscribe_topic topic.id %}"{% else %}"{% url forums-subscribe_topic topic.id %}"{% endif %} method="post">{% csrf_token %} | 78 <form action={% if is_subscribed %}"{% url 'forums-unsubscribe_topic' topic.id %}"{% else %}"{% url 'forums-subscribe_topic' topic.id %}"{% endif %} method="post">{% csrf_token %} |
78 <fieldset> | 79 <fieldset> |
79 <legend>Subscription Options</legend> | 80 <legend>Subscription Options</legend> |
80 <p> | 81 <p> |
81 {% if is_subscribed %} | 82 {% if is_subscribed %} |
82 <img src="{{ MEDIA_URL }}icons/email_delete.png" alt="Email" /> | 83 <img src="{{ MEDIA_URL }}icons/email_delete.png" alt="Email" /> |
88 <input type="submit" value="Subscribe via Email" /> | 89 <input type="submit" value="Subscribe via Email" /> |
89 {% endif %} | 90 {% endif %} |
90 </p> | 91 </p> |
91 <p> | 92 <p> |
92 To manage all your forum topic subscriptions, please visit your | 93 To manage all your forum topic subscriptions, please visit your |
93 <a href="{% url forums-manage_subscriptions %}">subscriptions page</a>. | 94 <a href="{% url 'forums-manage_subscriptions' %}">subscriptions page</a>. |
94 </p> | 95 </p> |
95 </fieldset> | 96 </fieldset> |
96 </form> | 97 </form> |
97 {% endif %} | 98 {% endif %} |
98 </div> | 99 </div> |