Mercurial > public > sg101
diff gpp/templates/forums/topic.html @ 102:e67c4dd98db5
Forums: new topic form sprouts boolean fields for sticky and locking if the user has rights. Implemented the locked logic. Fixed a bug where topics where getting out of order (the view_count was bumping the update_date because of auto_now).
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 16 Sep 2009 02:01:57 +0000 |
parents | 96eec1ed0fd3 |
children | 59688577a8f1 |
line wrap: on
line diff
--- a/gpp/templates/forums/topic.html Wed Sep 16 00:39:27 2009 +0000 +++ b/gpp/templates/forums/topic.html Wed Sep 16 02:01:57 2009 +0000 @@ -11,12 +11,16 @@ </h3> <div class="forum-block"> +{% if topic.locked %} +<img src="{{ MEDIA_URL }}/icons/lock.png" alt="Lock" title="This topic is locked" /> +{% else %} {% if last_page %} -<a href="#forum-reply-form">New Reply</a> • +<a href="#forum-reply-form">New Reply</a> {% else %} -<a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> • +<a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> {% endif %} -<a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> +{% endif %} +• <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> {{ page_nav }} <table class="forum-topic" id="forum-topic"> @@ -26,7 +30,7 @@ </table> {{ page_nav }} -{% if last_page and user.is_authenticated %} +{% if last_page and user.is_authenticated and not topic.locked %} <a name="forum-reply-form"></a> <form action="" method="post" id="forums-quick-reply"> <fieldset>