Mercurial > public > sg101
comparison gpp/templates/forums/topic.html @ 104:59688577a8f1
Forums: display of sticky status. Moderators/superusers see IP address of post. Added a can_reply flag to the template and have view compute it.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 17 Sep 2009 01:44:51 +0000 |
parents | e67c4dd98db5 |
children | e94398f5e027 |
comparison
equal
deleted
inserted
replaced
103:bb3f0d315c5f | 104:59688577a8f1 |
---|---|
9 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> » | 9 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> » |
10 <a href="{% url forums-topic_index id=topic.id %}">{{ topic.name }}</a> | 10 <a href="{% url forums-topic_index id=topic.id %}">{{ topic.name }}</a> |
11 </h3> | 11 </h3> |
12 | 12 |
13 <div class="forum-block"> | 13 <div class="forum-block"> |
14 {% if topic.sticky %} | |
15 <img src="{{ MEDIA_URL }}/icons/asterisk_orange.png" alt="Sticky" title="Sticky" /> | |
16 {% endif %} | |
14 {% if topic.locked %} | 17 {% if topic.locked %} |
15 <img src="{{ MEDIA_URL }}/icons/lock.png" alt="Lock" title="This topic is locked" /> | 18 <img src="{{ MEDIA_URL }}/icons/lock.png" alt="Lock" title="This topic is locked" /> |
16 {% else %} | 19 {% endif %} |
20 {% if can_reply %} | |
21 {% if topic.locked or topic.sticky %}•{% endif %} | |
17 {% if last_page %} | 22 {% if last_page %} |
18 <a href="#forum-reply-form">New Reply</a> | 23 <a href="#forum-reply-form">New Reply</a> |
19 {% else %} | 24 {% else %} |
20 <a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> | 25 <a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> |
21 {% endif %} | 26 {% endif %} |
28 {% include 'forums/display_post.html' %} | 33 {% include 'forums/display_post.html' %} |
29 {% endfor %} | 34 {% endfor %} |
30 </table> | 35 </table> |
31 {{ page_nav }} | 36 {{ page_nav }} |
32 | 37 |
33 {% if last_page and user.is_authenticated and not topic.locked %} | 38 {% if last_page and can_reply %} |
34 <a name="forum-reply-form"></a> | 39 <a name="forum-reply-form"></a> |
35 <form action="" method="post" id="forums-quick-reply"> | 40 <form action="" method="post" id="forums-quick-reply"> |
36 <fieldset> | 41 <fieldset> |
37 <legend>Reply to "{{ topic.name }}"</legend> | 42 <legend>Reply to "{{ topic.name }}"</legend> |
38 {{ form.as_p }} | 43 {{ form.as_p }} |