~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to templates/pybb/topic.html

  • Committer: franku
  • Date: 2016-04-18 13:29:23 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: somal@arcor.de-20160418132923-bfzkb5mvdr7l8mz4
added migrations to each app

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
{% load wiki_extras %}
6
6
{% load wlprofile_extras %}
7
7
{% load custom_date %}
8
 
{% load pagination_tags %}
9
 
{% load static %}
10
8
 
11
9
{% block title %}
12
10
{{ topic.name }} - {{ topic.forum.name }} - {{ block.super }}
13
11
{% endblock title %}
14
12
 
15
13
{% block extra_head %}
16
 
<link rel="alternate" type="application/atom+xml" title="Latest Posts on forum '{{ topic.forum.name }}'" href="{% url 'pybb_feed_posts' %}{{topic.forum.id}}/"  />
17
 
<link rel="alternate" type="application/atom+xml" title="Latest Topics on forum '{{ topic.forum.name }}'" href="{% url 'pybb_feed_topics' %}{{topic.forum.id}}/" />
 
14
<link rel="alternate" type="application/atom+xml" title="Latest Posts on forum '{{ topic.forum.name }}'" href="{% url 'pybb_feed' "posts" %}{{topic.forum.id}}/"  />
 
15
<link rel="alternate" type="application/atom+xml" title="Latest Topics on forum '{{ topic.forum.name }}'" href="{% url 'pybb_feed' "topics"%}{{topic.forum.id}}/" />
18
16
{{ block.super }}
19
17
{% endblock %}
20
18
 
21
 
{% block content_header %}
22
 
    <h1>Topic: {{ topic }} </h1>
23
 
{% endblock %}
24
 
 
25
 
{% block content_main %}
 
19
{% block content %}
 
20
<h1>Topic: {{ topic }}</h1>
26
21
<div class="blogEntry">
27
 
        <div class="breadCrumb">
28
 
                <a href="{% url 'pybb_index' %}">Forums</a> &#187; 
29
 
                {% pybb_link topic.forum.category %} &#187; 
30
 
                <a href="{{ topic.forum.get_absolute_url }}">{{ topic.forum.name }}</a> &#187;
31
 
                {{ topic }}
32
 
                </div>
33
 
        {% if topic.is_hidden %}
34
 
                <p>This topic is hidden. It is either waiting for a review or was hidden by a moderator.</p>
35
 
                {% if posts.0.is_spam and moderator %}
36
 
                        <p>This topic's first post is possible spam. Toggle the visibility to show the post. If it is indeed spam, consider deleting the user:</p>
37
 
                        <p>To delete the user, go to the <a href="/admin/auth/user/{{posts.0.user.pk}}/change/">admin user-page for the post's author</a></p>
38
 
                {% endif %}
39
 
                <div class="posRight">
40
 
                {% if moderator %}
41
 
                        <a class="button" href="{% url 'pybb_toggle_hid_topic' topic.id %}">
42
 
                                <img src="{% static 'forum/img/topic_show.png' %}" alt ="" class="middle" />
43
 
                                <span class="middle">{% trans "Toggle Visibility" %}</span>
44
 
                        </a>
45
 
                {% endif %}
46
 
        {% else %}
47
 
                <div class="posRight">
48
 
                {% if moderator %}
49
 
                        <a class="button" href="{% url 'pybb_toggle_hid_topic' topic.id %}">
50
 
                                <img src="{% static 'forum/img/topic_hide.png' %}" alt ="" class="middle" />
51
 
                                <span class="middle">{% trans "Toggle Visibility" %}</span>
52
 
                        </a>
53
 
                        {% if topic.sticky %}
54
 
                        <a class="button" href="{% url 'pybb_unstick_topic' topic.id %}">
55
 
                                <img src="{% static 'forum/img/unstick.png' %}" alt ="" class="middle" />
56
 
                                <span class="middle">{% trans "Unstick Topic" %}</span>
57
 
                        </a>
58
 
                        {% else %}
59
 
                        <a class="button" href="{% url 'pybb_stick_topic' topic.id %}">
60
 
                                <img src="{% static 'forum/img/sticky.png' %}" alt ="" class="middle" />
61
 
                                <span class="middle">{% trans "Stick Topic" %}</span>
62
 
                        </a>
63
 
                        {% endif %}
64
 
                        {% if topic.closed %}
65
 
                        <a class="button" href="{% url 'pybb_open_topic' topic.id %}">
66
 
                                <img src="{% static 'forum/img/open.png' %}" alt ="" class="middle" />
67
 
                                <span class="middle">{% trans "Open Topic" %}</span>
68
 
                        </a>
69
 
                        {% else %}
70
 
                        <a class="button" href="{% url 'pybb_close_topic' topic.id %}">
71
 
                                <img src="{% static 'forum/img/closed.png' %}" alt ="" class="middle" />
72
 
                                <span class="middle">{% trans "Close Topic" %}</span>
73
 
                        </a>
74
 
                        {% endif %}
75
 
                {% endif %}
76
 
                {% if user.is_authenticated %}
77
 
                        {% if subscribed %}
78
 
                        <a class="button" href="{% url 'pybb_delete_subscription' topic.id %}?from_topic">
79
 
                                <img src="{% static 'forum/img/unsubscribe.png' %}" alt ="" class="middle" />
80
 
                                <span class="middle">{% trans "Unsubscribe" %}</span>
81
 
                        </a>
82
 
                        {% else %}
83
 
                        <a class="button" href="{% url 'pybb_add_subscription' topic.id %}">
84
 
                                <img src="{% static 'forum/img/subscribe.png' %}" alt ="" class="middle" />
85
 
                                <span class="middle">{% trans "Subscribe" %}</span>
86
 
                        </a>
87
 
                        {% endif %}
88
 
                        <a class="button" href="{% url 'pybb_add_post' topic.id %}">
89
 
                                <img src="{% static 'forum/img/send.png' %}" alt ="" class="middle" />
90
 
                                <span class="middle">{% trans "New Reply" %}</span>
91
 
                        </a>
92
 
                {% endif %}
93
 
                        </div>
94
 
                        {% autopaginate posts page_size as object_list %}
95
 
                        {% paginate using "pagination/pagination_mod.html" %}
96
 
                
97
 
                {% if first_post %}
98
 
                        {% ifnotequal first_post posts.0 %}
99
 
                                {% with first_post as post %}
100
 
                        {% trans "First Post" %}:
101
 
                        <table class="forum">
102
 
                                <tbody>
103
 
                                <tr class="odd">
104
 
                                        <td class="author">
105
 
                                                {{ post.user|user_link }}<br />
106
 
                                                {% if post.user.wlprofile_extras.avatar %}
107
 
                                                <a href="{% url 'profile_view' post.user %}">
108
 
                                                        <img src="{{ post.user.wlprofile.avatar.url }}" alt="Avatar" />
109
 
                                                </a>
110
 
                                                {% endif %}
111
 
                                                <div class="authorStats">
112
 
                                                <strong>Joined:</strong> {{ post.user.date_joined|custom_date:user|title }}<br />
113
 
                                                <strong>Posts:</strong> {{ post.user.wlprofile.post_count }}<br />
114
 
                                                <img src="{% static 'img/' %}{{ post.user.wlprofile.user_status.image }}" alt="Ranking" /><br />
115
 
                                                <strong>{{ post.user.wlprofile.user_status.text }}</strong><br />
116
 
                                                {% if post.user.wlprofile.location %}
117
 
                                                <strong>Location:</strong> {{ post.user.wlprofile.location }}<br />
118
 
                                                {% endif %}
119
 
                                                </div>
120
 
                                        </td>
121
 
                                        <td class="post">
122
 
                                                <a id="post-{{ post.id }}" href="{{post.get_absolute_url}}" title="{% trans "Permalink" %}" class="posRight small permalink">&nbsp;</a>
123
 
                                                <span class="small">Posted at: {{ post.created|custom_date:user}}</span>
124
 
                                                <hr />
125
 
                                                <div class="post">
126
 
                                                        {{ post.body_html|safe }}
127
 
                                                </div>
128
 
 
129
 
                                                {% if post.attachment_cache %}
130
 
                                                        {% for attach in post.attachment_cache %}
131
 
                                                                {% trans "Attachment" %}: <a href="{{ attach.get_absolute_url }}">{{ attach.name }}</a> ({{ attach.size_display }})
132
 
                                                        {% endfor %}
133
 
                                                {% endif %}
134
 
 
135
 
                                                {% if post.updated %}
136
 
                                                        <span class="small">{% trans "Edited" %}: {{ post.updated|custom_date:user|title}}</span>
137
 
                                                {% endif %}
138
 
                                                <hr />
139
 
                                                {% if user.is_authenticated %}
140
 
                                                        {% ifequal user.wlprofile.show_signatures 1 %}
141
 
                                                                {% if post.user.wlprofile.signature %}
142
 
                                                                        {{ post.user.wlprofile.signature|urlize|linebreaks }}
143
 
                                                                {% endif %}
144
 
                                                        {% endifequal %}
145
 
                                                {% else %}
146
 
                                                        {% if post.user.wlprofile.signature %}
147
 
                                                                {{ post.user.wlprofile.signature|urlize|linebreaks }}
148
 
                                                        {% endif %}
149
 
                                                {% endif %}
150
 
 
151
 
                                                <button onclick="window.location.href='#top';" class="posRight">
152
 
                                                        <img src="{% static 'forum/img/top.png' %}" alt ="" class="middle" />
153
 
                                                        <span class="middle">{% trans "Top" %}</span>
154
 
                                                </button>
155
 
 
156
 
                                                <button onclick="window.location.href='{% url 'pybb_add_post' topic.id %}?quote_id={{ post.id }}';">
157
 
                                                        <img src="{% static 'forum/img/quote.png' %}" alt ="" class="middle" />
158
 
                                                        <span class="middle">{% trans "Quote" %}</span>
159
 
                                                </button>
160
 
                                                {% if moderator or post|pybb_posted_by:user %}
161
 
                                                        <button onclick="window.location.href='{% url 'pybb_edit_post' post.id %}';">
162
 
                                                                <img src="{% static 'forum/img/edit.png' %}" alt ="" class="middle" />
163
 
                                                                <span class="middle">{% trans "Edit" %}</span>
164
 
                                                        </button>
165
 
                                                        {% if moderator or post|pybb_equal_to:last_post %}
166
 
                                                        <button onclick="window.location.href='{% url 'pybb_delete_post' post.id %}';">
167
 
                                                                <img src="{% static 'forum/img/delete.png' %}" alt ="" class="middle" />
168
 
                                                                <span class="middle">{% trans "Delete" %}</span>
169
 
                                                        </button>
170
 
                                                        {% endif %}
171
 
                                                {% endif %}
172
 
                                        </td>
173
 
                                </tr>
174
 
                                </tbody>
175
 
                        </table>
176
 
                        <br /><hr /><br />
177
 
                                {% endwith %}
178
 
                        {% endifnotequal %}
179
 
                {% endif %}
180
 
                
181
 
                        <table class="forum">
182
 
                                <tbody>
183
 
                        {% for post in object_list %}
184
 
                                {% comment %}
185
 
                                TODO (Franku): use
186
 
                                {% include 'pybb/inlines/post.html' %}
187
 
                                {% endcomment %}
188
 
                                <tr class="{% cycle 'odd' 'even' %}" {% if post.is_spam %} style="background-color: gray" {% endif %}>
189
 
                                        <td class="author">
190
 
                                                {{ post.user|user_link }}<br />
191
 
                                                {% if post.user.wlprofile.avatar %}
192
 
                                                <a href="{% url 'profile_view' post.user %}">
193
 
                                                        <img src="{{ post.user.wlprofile.avatar.url }}" alt="Avatar" />
194
 
                                                </a>
195
 
                                                {% endif %}
196
 
                                                <div class="authorStats">
197
 
                                                <strong>Joined:</strong> {{ post.user.date_joined|custom_date:user|title }}<br />
198
 
                                                <strong>Posts:</strong> {{ post.user.wlprofile.post_count }}<br />
199
 
                                                <img src="{% static 'img/'%}{{ post.user.wlprofile.user_status.image }}" alt="Ranking" /><br />
200
 
                                                <strong>{{ post.user.wlprofile.user_status.text }}</strong><br />
201
 
                                                {% if post.user.wlprofile.location %}
202
 
                                                <strong>Location:</strong> {{ post.user.wlprofile.location }}<br />
203
 
                                                {% endif %}
204
 
                                                </div>
205
 
                                        </td>
206
 
                                        <td class="post">
207
 
                                                <a id="post-{{ post.id }}" href="{{post.get_absolute_url}}" title="{% trans "Permalink" %}" class="posRight small permalink">&nbsp;</a>
208
 
                                                <span class="small">Posted at: {{ post.created|custom_date:user}}</span>
209
 
                                                <hr />
210
 
                                                <div class="post">
211
 
                                                        {{ post.body_html|safe }}
212
 
                                                </div>
213
 
 
214
 
                                                {% if post.attachment_cache %}
215
 
                                                        {% for attach in post.attachment_cache %}
216
 
                                                                {% trans "Attachment" %}: <a href="{{ attach.get_absolute_url }}">{{ attach.name }}</a> ({{ attach.size_display }})
217
 
                                                        {% endfor %}
218
 
                                                {% endif %}
219
 
 
220
 
                                                {% if post.updated %}
221
 
                                                        <span class="small">{% trans "Edited" %}: {{ post.updated|custom_date:user|title}}</span>
222
 
                                                {% endif %}
223
 
                                                <hr />
224
 
                                                {% if user.is_authenticated %}
225
 
                                                        {% ifequal user.wlprofile.show_signatures 1 %}
226
 
                                                                {% if post.user.wlprofile.signature %}
227
 
                                                                        {{ post.user.wlprofile.signature|urlize|linebreaks }}
228
 
                                                                {% endif %}
229
 
                                                        {% endifequal %}
230
 
                                                {% else %}
231
 
                                                        {% if post.user.wlprofile.signature %}
232
 
                                                                {{ post.user.wlprofile.signature|urlize|linebreaks }}
233
 
                                                        {% endif %}
234
 
                                                {% endif %}
235
 
 
236
 
                                                <a class="button posRight" href="#top">
237
 
                                                        <img src="{% static 'forum/img/top.png' %}" alt ="" class="middle" />
238
 
                                                        <span class="middle">{% trans "Top" %}</span>
239
 
                                                </a>
240
 
 
241
 
                                                <a class="button" href="{% url 'pybb_add_post' topic.id %}?quote_id={{ post.id }}">
242
 
                                                        <img src="{% static 'forum/img/quote.png' %}" alt ="" class="middle" />
243
 
                                                        <span class="middle">{% trans "Quote" %}</span>
244
 
                                                </a>
245
 
                                                {% if moderator or post|pybb_posted_by:user %}
246
 
                                                        <a class="button" href="{% url 'pybb_edit_post' post.id %}">
247
 
                                                                <img src="{% static 'forum/img/edit.png' %}" alt ="" class="middle" />
248
 
                                                                <span class="middle">{% trans "Edit" %}</span>
249
 
                                                        </a>
250
 
                                                        {% if moderator or post|pybb_equal_to:last_post %}
251
 
                                                        <a class="button" href="{% url 'pybb_delete_post' post.id %}">
252
 
                                                                <img src="{% static 'forum/img/delete.png' %}" alt ="" class="middle" />
253
 
                                                                <span class="middle">{% trans "Delete" %}</span>
254
 
                                                        </a>
255
 
                                                        {% endif %}
256
 
                                                {% endif %}
257
 
                                        </td>
258
 
                                </tr>
259
 
                                {% if not forloop.last %}
260
 
                                {# no spacer at end of table #}
261
 
                                <tr class="spacer">
262
 
                                        <td></td>
263
 
                                        <td></td>
264
 
                                </tr>
265
 
                                {% endif %}
266
 
                        {% endfor %}
267
 
                                </tbody>
268
 
                        </table>
269
 
 
270
 
                        <div class="posRight">
271
 
                        {% if moderator %}
272
 
                        <a class="button" href="{% url 'pybb_toggle_hid_topic' topic.id %}">
273
 
                                        <img src="{% static 'forum/img/topic_hide.png' %}" alt ="" class="middle" />
274
 
                                        <span class="middle">{% trans "Toggle Visibility" %}</span>
275
 
                                </a>
276
 
                                {% if topic.sticky %}
277
 
                                <a class="button" href="{% url 'pybb_unstick_topic' topic.id %}">
278
 
                                        <img src="{% static 'forum/img/unstick.png' %}" alt ="" class="middle" />
279
 
                                        <span class="middle">{% trans "Unstick Topic" %}</span>
280
 
                                </a>
281
 
                                {% else %}
282
 
                                <a class="button" href="{% url 'pybb_stick_topic' topic.id %}">
283
 
                                        <img src="{% static 'forum/img/sticky.png' %}" alt ="" class="middle" />
284
 
                                        <span class="middle">{% trans "Stick Topic" %}</span>
285
 
                                </a>
286
 
                                {% endif %}
287
 
                                {% if topic.closed %}
288
 
                                <a class="button" href="{% url 'pybb_open_topic' topic.id %}">
289
 
                                        <img src="{% static 'forum/img/open.png' %}" alt ="" class="middle" />
290
 
                                        <span class="middle">{% trans "Open Topic" %}</span>
291
 
                                </a>
292
 
                                {% else %}
293
 
                                <a class="button" href="{% url 'pybb_close_topic' topic.id %}">
294
 
                                        <img src="{% static 'forum/img/closed.png' %}" alt ="" class="middle" />
295
 
                                        <span class="middle">{% trans "Close Topic" %}</span>
296
 
                                </a>
297
 
                                {% endif %}
298
 
                        {% endif %}
299
 
                        {% if user.is_authenticated %}
300
 
                                {% if subscribed %}
301
 
                                <a class="button" href="{% url 'pybb_delete_subscription' topic.id %}?from_topic">
302
 
                                        <img src="{% static 'forum/img/unsubscribe.png' %}" alt ="" class="middle" />
303
 
                                        <span class="middle">{% trans "Unsubscribe" %}</span>
304
 
                                </a>
305
 
                                {% else %}
306
 
                                <a class="button" href="{% url 'pybb_add_subscription' topic.id %}">
307
 
                                        <img src="{% static 'forum/img/subscribe.png' %}" alt ="" class="middle" />
308
 
                                        <span class="middle">{% trans "Subscribe" %}</span>
309
 
                                </a>
310
 
                                {% endif %}
311
 
                                <a class="button" href="{% url 'pybb_add_post' topic.id %}">
312
 
                                        <img src="{% static 'forum/img/send.png' %}" alt ="" class="middle" />
313
 
                                        <span class="middle">{% trans "New Reply" %}</span>
314
 
                                </a>
315
 
                        {% endif %}
316
 
                        </div>
317
 
                        {% paginate %}
318
 
                </div>
319
 
 
320
 
                {% if user.is_authenticated %}
321
 
                        {% if not topic.closed %}
322
 
                                {% include "pybb/inlines/add_post_form.html" %}
323
 
                        {% endif %}
324
 
                {% endif %}
325
 
        {% endif %}
 
22
        <a href="{% url 'pybb_index' %}">Forums</a> &#187; 
 
23
        {% pybb_link topic.forum.category %} &#187; 
 
24
        <a href="{{ topic.forum.get_absolute_url }}">{{ topic.forum.name }}</a> &#187;
 
25
        {{ topic }}
 
26
        <br /><br />
 
27
        <div class="posRight">
 
28
        {% if moderator %}
 
29
                {% if topic.sticky %}
 
30
                <a class="button" href="{% url 'pybb_unstick_topic' topic.id %}">
 
31
                        <img src="{{ MEDIA_URL }}forum/img/unstick.png" alt ="" class="middle" />
 
32
                        <span class="middle">{% trans "Unstick Topic" %}</span>
 
33
                </a>
 
34
                {% else %}
 
35
                <a class="button" href="{% url 'pybb_stick_topic' topic.id %}">
 
36
                        <img src="{{ MEDIA_URL }}forum/img/sticky.png" alt ="" class="middle" />
 
37
                        <span class="middle">{% trans "Stick Topic" %}</span>
 
38
                </a>
 
39
                {% endif %}
 
40
                {% if topic.closed %}
 
41
                <a class="button" href="{% url 'pybb_open_topic' topic.id %}">
 
42
                        <img src="{{ MEDIA_URL }}forum/img/open.png" alt ="" class="middle" />
 
43
                        <span class="middle">{% trans "Open Topic" %}</span>
 
44
                </a>
 
45
                {% else %}
 
46
                <a class="button" href="{% url 'pybb_close_topic' topic.id %}">
 
47
                        <img src="{{ MEDIA_URL }}forum/img/closed.png" alt ="" class="middle" />
 
48
                        <span class="middle">{% trans "Close Topic" %}</span>
 
49
                </a>
 
50
                {% endif %}
 
51
        {% endif %}
 
52
        {% if user.is_authenticated %}
 
53
                {% if subscribed %}
 
54
                <a class="button" href="{% url 'pybb_delete_subscription' topic.id %}?from_topic">
 
55
                        <img src="{{ MEDIA_URL }}forum/img/unsubscribe.png" alt ="" class="middle" />
 
56
                        <span class="middle">{% trans "Unsubscribe" %}</span>
 
57
                </a>
 
58
                {% else %}
 
59
                <a class="button" href="{% url 'pybb_add_subscription' topic.id %}">
 
60
                        <img src="{{ MEDIA_URL }}forum/img/subscribe.png" alt ="" class="middle" />
 
61
                        <span class="middle">{% trans "Subscribe" %}</span>
 
62
                </a>
 
63
                {% endif %}
 
64
                <a class="button" href="{% url 'pybb_add_post' topic.id %}">
 
65
                        <img src="{{ MEDIA_URL }}forum/img/send.png" alt ="" class="middle" />
 
66
                        <span class="middle">{% trans "New Reply" %}</span>
 
67
                </a>
 
68
        {% endif %}
 
69
        </div>
 
70
        {% pybb_pagination _('Posts') %}
 
71
        <br /><br />
 
72
 
 
73
{% if first_post %}
 
74
        {% ifnotequal first_post posts.0 %}
 
75
                {% with first_post as post %}
 
76
        {% trans "First Post" %}:
 
77
        <table class="forum">
 
78
                <tbody>
 
79
                <tr class="odd">
 
80
                        <td class="author">
 
81
                                {{ post.user|user_link }}<br />
 
82
                                {% if post.user.wlprofile_extras.avatar %}
 
83
                                <a href="{% url 'profile_view' post.user %}">
 
84
                                        <img src="{{ post.user.wlprofile.avatar.url }}" alt="Avatar" />
 
85
                                </a>
 
86
                                {% endif %}
 
87
                                <div class="authorStats">
 
88
                                <strong>Joined:</strong> {{ post.user.date_joined|custom_date:user|title }}<br />
 
89
                                <strong>Posts:</strong> {{ post.user.wlprofile.post_count }}<br />
 
90
                                <img src="{{ MEDIA_URL }}img/{{ post.user.wlprofile.user_status.image }}" alt="Ranking" /><br />
 
91
                                <strong>{{ post.user.wlprofile.user_status.text }}</strong><br />
 
92
                                {% if post.user.wlprofile.location %}
 
93
                                <strong>Location:</strong> {{ post.user.wlprofile.location }}<br />
 
94
                                {% endif %}
 
95
                                {% if post.user.wlprofile.get_ggzstats and post.user.wlprofile.get_ggzstats.ranking %} 
 
96
                                <strong>GGZ ranking:</strong> {{ post.user.wlprofile.get_ggzstats.ranking|floatformat }}<br />
 
97
                                <strong>GGZ rating:</strong> {{ post.user.wlprofile.get_ggzstats.rating|floatformat }}<br />
 
98
                                <strong>GGZ win:</strong> {{ post.user.wlprofile.get_ggzstats.wins|floatformat }}<br />
 
99
                                <strong>GGZ loses:</strong> {{ post.user.wlprofile.get_ggzstats.losses|floatformat }}<br />
 
100
                                {% endif %}
 
101
                                </div>
 
102
                        </td>
 
103
                        <td class="post">
 
104
                                <a id="post-{{ post.id }}" href="{{post.get_absolute_url}}" title="{% trans "Permalink" %}" class="posRight small permalink">&nbsp;</a>
 
105
                                <span class="small">Posted at: {{ post.created|custom_date:user}}</span>
 
106
                                <hr />
 
107
                                <div class="post">
 
108
                                        {{ post.body_html|safe }}
 
109
                                </div>
 
110
 
 
111
                                {% if post.attachment_cache %}
 
112
                                        {% for attach in post.attachment_cache %}
 
113
                                                {% trans "Attachment" %}: <a href="{{ attach.get_absolute_url }}">{{ attach.name }}</a> ({{ attach.size_display }})
 
114
                                        {% endfor %}
 
115
                                {% endif %}
 
116
 
 
117
                                {% if post.updated %}
 
118
                                        <span class="small">{% trans "Edited" %}: {{ post.updated|custom_date:user|title}}</span>
 
119
                                {% endif %}
 
120
                                <hr />
 
121
                                {% if user.is_authenticated %}
 
122
                                        {% ifequal user.wlprofile.show_signatures 1 %}
 
123
                                                {% if post.user.wlprofile.signature %}
 
124
                                                        {{ post.user.wlprofile.signature|urlize|linebreaks }}
 
125
                                                {% endif %}
 
126
                                        {% endifequal %}
 
127
                                {% else %}
 
128
                                        {% if post.user.wlprofile.signature %}
 
129
                                                {{ post.user.wlprofile.signature|urlize|linebreaks }}
 
130
                                        {% endif %}
 
131
                                {% endif %}
 
132
 
 
133
                                <button onclick="window.location.href='#top';" class="posRight">
 
134
                                        <img src="{{ MEDIA_URL }}forum/img/top.png" alt ="" class="middle" />
 
135
                                        <span class="middle">{% trans "Top" %}</span>
 
136
                                </button>
 
137
 
 
138
                                <button onclick="window.location.href='{% url 'pybb_add_post' topic.id %}?quote_id={{ post.id }}';">
 
139
                                        <img src="{{ MEDIA_URL }}forum/img/quote.png" alt ="" class="middle" />
 
140
                                        <span class="middle">{% trans "Quote" %}</span>
 
141
                                </button>
 
142
                                {% if moderator or post|pybb_posted_by:user %}
 
143
                                        <button onclick="window.location.href='{% url 'pybb_edit_post' post.id %}';">
 
144
                                                <img src="{{ MEDIA_URL }}forum/img/edit.png" alt ="" class="middle" />
 
145
                                                <span class="middle">{% trans "Edit" %}</span>
 
146
                                        </button>
 
147
                                        {% if moderator or post|pybb_equal_to:last_post %}
 
148
                                        <button onclick="window.location.href='{% url 'pybb_delete_post' post.id %}';">
 
149
                                                <img src="{{ MEDIA_URL }}forum/img/delete.png" alt ="" class="middle" />
 
150
                                                <span class="middle">{% trans "Delete" %}</span>
 
151
                                        </button>
 
152
                                        {% endif %}
 
153
                                {% endif %}
 
154
                        </td>
 
155
                </tr>
 
156
                </tbody>
 
157
        </table>
 
158
        <br /><hr /><br />
 
159
                {% endwith %}
 
160
        {% endifnotequal %}
 
161
{% endif %}
 
162
 
 
163
        <table class="forum">
 
164
                <tbody>
 
165
        {% for post in posts %}
 
166
                <tr class="{% cycle 'odd' 'even' %}">
 
167
                        <td class="author">
 
168
                                {{ post.user|user_link }}<br />
 
169
                                {% if post.user.wlprofile.avatar %}
 
170
                                <a href="{% url 'profile_view' post.user %}">
 
171
                                        <img src="{{ post.user.wlprofile.avatar.url }}" alt="Avatar" />
 
172
                                </a>
 
173
                                {% endif %}
 
174
                                <div class="authorStats">
 
175
                                <strong>Joined:</strong> {{ post.user.date_joined|custom_date:user|title }}<br />
 
176
                                <strong>Posts:</strong> {{ post.user.wlprofile.post_count }}<br />
 
177
                                <img src="{{ MEDIA_URL }}img/{{ post.user.wlprofile.user_status.image }}" alt="Ranking" /><br />
 
178
                                <strong>{{ post.user.wlprofile.user_status.text }}</strong><br />
 
179
                                {% if post.user.wlprofile.location %}
 
180
                                <strong>Location:</strong> {{ post.user.wlprofile.location }}<br />
 
181
                                {% endif %}
 
182
                                {% if post.user.wlprofile.get_ggzstats and post.user.wlprofile.get_ggzstats.ranking %} 
 
183
                                <strong>GGZ ranking:</strong> {{ post.user.wlprofile.get_ggzstats.ranking|floatformat }}<br />
 
184
                                <strong>GGZ rating:</strong> {{ post.user.wlprofile.get_ggzstats.rating|floatformat }}<br />
 
185
                                <strong>GGZ win:</strong> {{ post.user.wlprofile.get_ggzstats.wins|floatformat }}<br />
 
186
                                <strong>GGZ loses:</strong> {{ post.user.wlprofile.get_ggzstats.losses|floatformat }}<br />
 
187
                                {% endif %}
 
188
                                </div>
 
189
                        </td>
 
190
                        <td class="post">
 
191
                                <a id="post-{{ post.id }}" href="{{post.get_absolute_url}}" title="{% trans "Permalink" %}" class="posRight small permalink">&nbsp;</a>
 
192
                                <span class="small">Posted at: {{ post.created|custom_date:user}}</span>
 
193
                                <hr />
 
194
                                <div class="post">
 
195
                                        {{ post.body_html|safe }}
 
196
                                </div>
 
197
 
 
198
                                {% if post.attachment_cache %}
 
199
                                        {% for attach in post.attachment_cache %}
 
200
                                                {% trans "Attachment" %}: <a href="{{ attach.get_absolute_url }}">{{ attach.name }}</a> ({{ attach.size_display }})
 
201
                                        {% endfor %}
 
202
                                {% endif %}
 
203
 
 
204
                                {% if post.updated %}
 
205
                                        <span class="small">{% trans "Edited" %}: {{ post.updated|custom_date:user|title}}</span>
 
206
                                {% endif %}
 
207
                                <hr />
 
208
                                {% if user.is_authenticated %}
 
209
                                        {% ifequal user.wlprofile.show_signatures 1 %}
 
210
                                                {% if post.user.wlprofile.signature %}
 
211
                                                        {{ post.user.wlprofile.signature|urlize|linebreaks }}
 
212
                                                {% endif %}
 
213
                                        {% endifequal %}
 
214
                                {% else %}
 
215
                                        {% if post.user.wlprofile.signature %}
 
216
                                                {{ post.user.wlprofile.signature|urlize|linebreaks }}
 
217
                                        {% endif %}
 
218
                                {% endif %}
 
219
 
 
220
                                <a class="button posRight" href="#top">
 
221
                                        <img src="{{ MEDIA_URL }}forum/img/top.png" alt ="" class="middle" />
 
222
                                        <span class="middle">{% trans "Top" %}</span>
 
223
                                </a>
 
224
 
 
225
                                <a class="button" href="{% url 'pybb_add_post' topic.id %}?quote_id={{ post.id }}">
 
226
                                        <img src="{{ MEDIA_URL }}forum/img/quote.png" alt ="" class="middle" />
 
227
                                        <span class="middle">{% trans "Quote" %}</span>
 
228
                                </a>
 
229
                                {% if moderator or post|pybb_posted_by:user %}
 
230
                                        <a class="button" href="{% url 'pybb_edit_post' post.id %}">
 
231
                                                <img src="{{ MEDIA_URL }}forum/img/edit.png" alt ="" class="middle" />
 
232
                                                <span class="middle">{% trans "Edit" %}</span>
 
233
                                        </a>
 
234
                                        {% if moderator or post|pybb_equal_to:last_post %}
 
235
                                        <a class="button" href="{% url 'pybb_delete_post' post.id %}">
 
236
                                                <img src="{{ MEDIA_URL }}forum/img/delete.png" alt ="" class="middle" />
 
237
                                                <span class="middle">{% trans "Delete" %}</span>
 
238
                                        </a>
 
239
                                        {% endif %}
 
240
                                {% endif %}
 
241
                        </td>
 
242
                </tr>
 
243
                <tr class="spacer">
 
244
                        <td></td>
 
245
                        <td></td>
 
246
                </tr>
 
247
        {% endfor %}
 
248
                </tbody>
 
249
        </table>
 
250
 
 
251
        <div class="posRight">
 
252
        {% if moderator %}
 
253
                {% if topic.sticky %}
 
254
                <a class="button" href="{% url 'pybb_unstick_topic' topic.id %}">
 
255
                        <img src="{{ MEDIA_URL }}forum/img/unstick.png" alt ="" class="middle" />
 
256
                        <span class="middle">{% trans "Unstick Topic" %}</span>
 
257
                </a>
 
258
                {% else %}
 
259
                <a class="button" href="{% url 'pybb_stick_topic' topic.id %}">
 
260
                        <img src="{{ MEDIA_URL }}forum/img/sticky.png" alt ="" class="middle" />
 
261
                        <span class="middle">{% trans "Stick Topic" %}</span>
 
262
                </a>
 
263
                {% endif %}
 
264
                {% if topic.closed %}
 
265
                <a class="button" href="{% url 'pybb_open_topic' topic.id %}">
 
266
                        <img src="{{ MEDIA_URL }}forum/img/open.png" alt ="" class="middle" />
 
267
                        <span class="middle">{% trans "Open Topic" %}</span>
 
268
                </a>
 
269
                {% else %}
 
270
                <a class="button" href="{% url 'pybb_close_topic' topic.id %}">
 
271
                        <img src="{{ MEDIA_URL }}forum/img/closed.png" alt ="" class="middle" />
 
272
                        <span class="middle">{% trans "Close Topic" %}</span>
 
273
                </a>
 
274
                {% endif %}
 
275
        {% endif %}
 
276
        {% if user.is_authenticated %}
 
277
                {% if subscribed %}
 
278
                <a class="button" href="{% url 'pybb_delete_subscription' topic.id %}?from_topic">
 
279
                        <img src="{{ MEDIA_URL }}forum/img/unsubscribe.png" alt ="" class="middle" />
 
280
                        <span class="middle">{% trans "Unsubscribe" %}</span>
 
281
                </a>
 
282
                {% else %}
 
283
                <a class="button" href="{% url 'pybb_add_subscription' topic.id %}">
 
284
                        <img src="{{ MEDIA_URL }}forum/img/subscribe.png" alt ="" class="middle" />
 
285
                        <span class="middle">{% trans "Subscribe" %}</span>
 
286
                </a>
 
287
                {% endif %}
 
288
                <a class="button" href="{% url 'pybb_add_post' topic.id %}">
 
289
                        <img src="{{ MEDIA_URL }}forum/img/send.png" alt ="" class="middle" />
 
290
                        <span class="middle">{% trans "New Reply" %}</span>
 
291
                </a>
 
292
        {% endif %}
 
293
        </div>
 
294
        {% pybb_pagination _('Posts') %}
 
295
        <br />
 
296
</div>
 
297
 
 
298
{% if user.is_authenticated %}
 
299
        {% if not topic.closed %}
 
300
                {% include "pybb/inlines/add_post_form.html" %}
 
301
        {% endif %}
 
302
{% endif %}
 
303
 
326
304
{% endblock %}