| 1 | {% extends 'forum/base.html' %} |
|---|
| 2 | {% load forum_extras %} |
|---|
| 3 | {% load i18n %} |
|---|
| 4 | |
|---|
| 5 | {% block title %} / {{ topic.forum.name }} / {{ topic.name }}{% endblock %} |
|---|
| 6 | {% block content %} |
|---|
| 7 | <div class="linkst"> |
|---|
| 8 | <div class="inbox"> |
|---|
| 9 | <p class="pagelink conl">{% pagination %}</p> |
|---|
| 10 | {% if not topic.closed and user.is_authenticated %} |
|---|
| 11 | <p class="postlink conr"><a href="{% url djangobb:add_post topic.id %}">{% trans "Reply" %}</a></p> |
|---|
| 12 | {% endif %} |
|---|
| 13 | <ul> |
|---|
| 14 | <li> |
|---|
| 15 | <a href="{% url djangobb:index %}">{% trans "Root" %} </a></li><li>» {% link topic.forum %} </li><li>» {{ topic.name }} |
|---|
| 16 | <a href="{% url djangobb:forum_topic_feed topic.id %}"><img src="{{ MEDIA_URL }}forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" class="breadcrumb_rss" /></a> |
|---|
| 17 | </li> |
|---|
| 18 | </ul> |
|---|
| 19 | <div class="clearer"></div> |
|---|
| 20 | </div> |
|---|
| 21 | </div> |
|---|
| 22 | {% for post in posts %} |
|---|
| 23 | <div id="p{{ post.id }}" class="blockpost roweven firstpost"> |
|---|
| 24 | <a name="post-{{ post.id }}"></a> |
|---|
| 25 | <h2><span><span class="conr">#{{ forloop.counter }} </span><a href="{{ post.get_absolute_url }}">{% forum_time post.created %}</a></span></h2> |
|---|
| 26 | <div class="box"> |
|---|
| 27 | <div class="inbox"> |
|---|
| 28 | <div class="postleft"> |
|---|
| 29 | <dl> |
|---|
| 30 | <dt><strong><a href="javascript:pasteN('{{ post.user.username }}');">{{ post.user.username }}</a></strong></dt> |
|---|
| 31 | <dd class="usertitle"> |
|---|
| 32 | {% if post.user.forum_profile.status %} |
|---|
| 33 | <strong>{{ post.user.forum_profile.status }}</strong> |
|---|
| 34 | {% else %} |
|---|
| 35 | <strong>{{ post.user.forum_profile.group }}</strong> |
|---|
| 36 | {% endif %} |
|---|
| 37 | </dd> |
|---|
| 38 | {% if forum_settings.AUTHORITY_SUPPORT %} |
|---|
| 39 | <dd class="usertitle"> |
|---|
| 40 | {{ post.user|forum_authority }} |
|---|
| 41 | </dd> |
|---|
| 42 | {% endif %} |
|---|
| 43 | {% if post.user.forum_profile.avatar and post.user.forum_profile.show_avatar %} |
|---|
| 44 | <dd class="postavatar"><img src="{{ post.user.forum_profile.avatar.url }}" /></dd> |
|---|
| 45 | {% else %} |
|---|
| 46 | <dd class="postavatar"><img src="{% gravatar post.user.email %}" /></dd> |
|---|
| 47 | {% endif %} |
|---|
| 48 | {% if post.user.forum_profile.location %} |
|---|
| 49 | <dd>{% trans "From:" %} {{ post.user.forum_profile.location }}</dd> |
|---|
| 50 | {% endif %} |
|---|
| 51 | <dd>{% trans "Registered:" %} {{ post.user.date_joined|date:"Y-m-d" }}</dd> |
|---|
| 52 | <dd>{% trans "Posts:" %} {{ post.user.forum_profile.post_count }}</dd> |
|---|
| 53 | {% if moderator %} |
|---|
| 54 | <dd>{% trans "IP:" %} {{ post.user_ip }}</dd> |
|---|
| 55 | {% endif %} |
|---|
| 56 | {% if forum_settings.REPUTATION_SUPPORT %} |
|---|
| 57 | <dd><a href="{% url djangobb:reputation post.user %}">{% trans "Reputation" %}</a>: |
|---|
| 58 | {% if request.user != post.user %} {# TODO: and user.is_authenticated #} |
|---|
| 59 | <a href="{% url djangobb:reputation post.user %}?action=plus&post_id={{ post.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_add.gif" alt="+" /></a> <strong>{{ post.user.forum_profile.reply_total }} </strong><a href="{% url djangobb:reputation post.user %}?action=minus&post_id={{ post.id }}"><img src="{{ MEDIA_URL }}forum/img/reputation/warn_minus.gif" alt="-" /></a> |
|---|
| 60 | {% else %} |
|---|
| 61 | <strong>{{ post.user.forum_profile.reply_total }}</strong> |
|---|
| 62 | {% endif %} |
|---|
| 63 | </dd> |
|---|
| 64 | {% endif %} |
|---|
| 65 | <dd class="usercontacts"><a href="{% url djangobb:forum_profile post.user %}">{% trans "Profile" %}</a> |
|---|
| 66 | {% if post.user.forum_profile.privacy_permission == 0 %} |
|---|
| 67 | <a href="mailto:{{ post.user.email }}">{% trans "E-mail" %}</a> |
|---|
| 68 | {% else %} |
|---|
| 69 | {% if post.user.forum_profile.privacy_permission == 1 %} |
|---|
| 70 | <a href="{% url djangobb:misc %}?mail_to={{ post.user }}">{% trans "Send e-mail" %}</a> |
|---|
| 71 | {% endif %} |
|---|
| 72 | {% endif %} |
|---|
| 73 | {% if forum_settings.PM_SUPPORT %} |
|---|
| 74 | {% if user.is_authenticated %} |
|---|
| 75 | <a href="{% url messages_compose_to post.user %}">{% trans "PM" %}</a> </dd> |
|---|
| 76 | {% endif %} |
|---|
| 77 | {% endif %} |
|---|
| 78 | </dl> |
|---|
| 79 | </div> |
|---|
| 80 | <div class="postright"> |
|---|
| 81 | <h3>{{ post.topic.name }}</h3> |
|---|
| 82 | <div class="postmsg"> |
|---|
| 83 | {{ post.body_html|safe }} |
|---|
| 84 | {% if not user.is_authenticated or user.forum_profile.show_signatures %} |
|---|
| 85 | {% if post.user.forum_profile.signature %} |
|---|
| 86 | <div class="postsignature"> |
|---|
| 87 | <br /><br/ > |
|---|
| 88 | {{ post.user.forum_profile.signature|safe }} |
|---|
| 89 | </div> |
|---|
| 90 | {% endif %} |
|---|
| 91 | {% endif %} |
|---|
| 92 | {% if post.updated %} |
|---|
| 93 | <p class="postedit"><em>{% trans "Edited" %} {{ post.updated_by }} ({% forum_time post.updated %})</em></p> |
|---|
| 94 | {% endif %} |
|---|
| 95 | {% if post.attachments.all %} |
|---|
| 96 | {% for attach in post.attachments.all %} |
|---|
| 97 | <p class="postedit"><em>{% trans "Attachments:" %} <br />{{ attach|attachment_link }}</em></p> |
|---|
| 98 | {% endfor %} |
|---|
| 99 | {% endif %} |
|---|
| 100 | </div> |
|---|
| 101 | </div> |
|---|
| 102 | <div class="clearer"></div> |
|---|
| 103 | <div class="postfootleft"> |
|---|
| 104 | {% if post.user|online %} |
|---|
| 105 | <p><strong>{% trans "Online" %}</strong></p> |
|---|
| 106 | {% else %} |
|---|
| 107 | <p>{% trans "Offline" %}</p> |
|---|
| 108 | {% endif %} |
|---|
| 109 | </div> |
|---|
| 110 | <div class="postfootright"> |
|---|
| 111 | <ul> |
|---|
| 112 | <li class="postreport"><a href="{% url djangobb:misc %}?action=report&post_id={{ post.id }}">{% trans "Report" %}</a> </li> |
|---|
| 113 | {% if moderator or post|forum_equal_to:last_post %} |
|---|
| 114 | {% if moderator or post.user|forum_equal_to:user %} |
|---|
| 115 | <li class="postdelete">| <a onclick="return confirm('{% trans "Are you sure you want to delete this post?" %}')" href="{% url djangobb:delete_post post.id %}">{% trans "Delete" %}</a> </li> |
|---|
| 116 | {% endif %} |
|---|
| 117 | {% endif %} |
|---|
| 118 | {% if moderator or post|forum_posted_by:user %} |
|---|
| 119 | <li class="postedit">| <a href="{% url djangobb:edit_post post.id %}">{% trans "Edit" %}</a> </li> |
|---|
| 120 | {% endif %} |
|---|
| 121 | <li class="postquote">| <a href="{% url djangobb:add_post topic.id %}?post_id={{ post.id }}">{% trans "Reply" %}</a> </li> |
|---|
| 122 | {% if user.is_authenticated %} |
|---|
| 123 | <li class="postquote">| <a onmouseover="copyQ('{{ post.user }}');" href="javascript:pasteQ();">{% trans "Quote" %}</a></li> |
|---|
| 124 | {% endif %} |
|---|
| 125 | </ul> |
|---|
| 126 | </div> |
|---|
| 127 | </div> |
|---|
| 128 | </div> |
|---|
| 129 | </div> |
|---|
| 130 | {% endfor %} |
|---|
| 131 | <div class="postlinksb"> |
|---|
| 132 | <div class="inbox"> |
|---|
| 133 | <p class="pagelink conl">{% pagination %}</p> |
|---|
| 134 | <p class="postlink conr"><a href="{% url djangobb:add_post topic.id %}">{% trans "Reply" %}</a></p> |
|---|
| 135 | <ul><li><a href="{% url djangobb:index %}">{% trans "Root" %} </a></li><li>» {% link topic.forum %} </li><li>» {{ topic }} |
|---|
| 136 | <a href="{% url djangobb:forum_topic_feed topic.id %}"><img src="{{ MEDIA_URL }}/forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" class="breadcrumb_rss" /></a> |
|---|
| 137 | </li></ul> |
|---|
| 138 | {% if user.is_authenticated %} |
|---|
| 139 | {% if subscribed %} |
|---|
| 140 | <a class="subscribelink clearb" href="{% url djangobb:forum_delete_subscription topic.id %}?from_topic">{% trans "Unsubscribe" %}</a> |
|---|
| 141 | {% else %} |
|---|
| 142 | <a class="subscribelink clearb" href="{% url djangobb:forum_add_subscription topic.id %}">{% trans "Subscribe" %}</a> |
|---|
| 143 | {% endif %} |
|---|
| 144 | {% endif %} |
|---|
| 145 | <div class="clearer"></div> |
|---|
| 146 | </div> |
|---|
| 147 | </div> |
|---|
| 148 | {% if not topic.closed and user.is_authenticated %} |
|---|
| 149 | <div class="blockform"> |
|---|
| 150 | <h2><span>{% trans "Quick post" %}</span></h2> |
|---|
| 151 | <div class="box"> |
|---|
| 152 | <form id="post" action="{% url djangobb:add_post topic.id %}" method="post" enctype="multipart/form-data"> |
|---|
| 153 | {% csrf_token %} |
|---|
| 154 | <div class="inform"> |
|---|
| 155 | <fieldset> |
|---|
| 156 | <legend>{% trans "Write your message and submit" %}</legend> |
|---|
| 157 | <div class="infldset txtarea"> |
|---|
| 158 | {{ form.body }} |
|---|
| 159 | </div> |
|---|
| 160 | </fieldset> |
|---|
| 161 | </div> |
|---|
| 162 | {% if forum_settings.ATTACHMENT_SUPPORT %} |
|---|
| 163 | <div class="inform"> |
|---|
| 164 | <fieldset> |
|---|
| 165 | <legend>{% trans "Attachment" %}</legend> |
|---|
| 166 | <div class="infldset"> |
|---|
| 167 | <div class="rbox"> |
|---|
| 168 | {{ form.attachment }} |
|---|
| 169 | </div> |
|---|
| 170 | </div> |
|---|
| 171 | </fieldset> |
|---|
| 172 | </div> |
|---|
| 173 | {% endif %} |
|---|
| 174 | <p><input type="submit" value="{% trans "Submit" %}" /></p> |
|---|
| 175 | </form> |
|---|
| 176 | </div> |
|---|
| 177 | </div> |
|---|
| 178 | {% endif %} |
|---|
| 179 | {% endblock %} |
|---|
| 180 | |
|---|
| 181 | {% block controls %} |
|---|
| 182 | <div class="conl"> |
|---|
| 183 | <form id="qjump" method="get" action="forum"> |
|---|
| 184 | <div><label>{% trans "Jump to " %} |
|---|
| 185 | <br /> |
|---|
| 186 | <select name="id" id="forum_id" onchange="window.location=('{% url djangobb:index %}'+this.options[this.selectedIndex].value)"> |
|---|
| 187 | {% for category in categories %} |
|---|
| 188 | <optgroup label="{{ category }}"> |
|---|
| 189 | {% for forum in category.forums.all %} |
|---|
| 190 | <option value="{{ forum.id }}">{{ forum }}</option> |
|---|
| 191 | {% endfor %} |
|---|
| 192 | </optgroup> |
|---|
| 193 | {% endfor %} |
|---|
| 194 | </select> |
|---|
| 195 | <input type="button" onclick="window.location=('{% url djangobb:index %}'+getElementById('forum_id').value)" value=" {% trans "Go" %} " accesskey="g" /> |
|---|
| 196 | </label></div> |
|---|
| 197 | </form> |
|---|
| 198 | <dl id="modcontrols"><dt><strong>{% trans "Moderator control" %}</strong></dt> |
|---|
| 199 | {% if moderator %} |
|---|
| 200 | <dd><a href="{% url djangobb:delete_posts topic.id %}">{% trans "Delete multiple posts" %}</a></dd> |
|---|
| 201 | <dd><a href="{% url djangobb:move_topic %}?topic_id={{ topic.id }}">{% trans "Move topic" %}</a></dd> |
|---|
| 202 | {% if topic.closed %} |
|---|
| 203 | <dd><a href="{% url djangobb:open_close_topic topic.id %}">{% trans "Open topic" %}</a></dd> |
|---|
| 204 | {% else %} |
|---|
| 205 | <dd><a href="{% url djangobb:open_close_topic topic.id %}">{% trans "Close topic" %}</a></dd> |
|---|
| 206 | {% endif %} |
|---|
| 207 | {% if topic.sticky %} |
|---|
| 208 | <dd><a href="{% url djangobb:stick_unstick_topic topic.id %}">{% trans "Unstick topic" %}</a></dd></dl> |
|---|
| 209 | {% else %} |
|---|
| 210 | <dd><a href="{% url djangobb:stick_unstick_topic topic.id %}">{% trans "Stick topic" %}</a></dd></dl> |
|---|
| 211 | {% endif %} |
|---|
| 212 | {% endif %} |
|---|
| 213 | </dl> |
|---|
| 214 | </div> |
|---|
| 215 | {% endblock %} |
|---|
| 216 | |
|---|
| 217 | {% block lofi %} |
|---|
| 218 | {% if forum_settings.LOFI_SUPPORT %} |
|---|
| 219 | <p class="lofi"> |
|---|
| 220 | <a href="{{ topic.get_absolute_url }}lofi/">Lo-Fi Version</a> |
|---|
| 221 | </p> |
|---|
| 222 | {% endif %} |
|---|
| 223 | {% endblock %} |
|---|