Show More
@@ -1,244 +1,249 b'' | |||||
1 | {% extends "boards/base.html" %} |
|
1 | {% extends "boards/base.html" %} | |
2 |
|
2 | |||
3 | {% load i18n %} |
|
3 | {% load i18n %} | |
4 | {% load cache %} |
|
4 | {% load cache %} | |
5 | {% load board %} |
|
5 | {% load board %} | |
6 | {% load static %} |
|
6 | {% load static %} | |
7 |
|
7 | |||
8 | {% block head %} |
|
8 | {% block head %} | |
9 | {% if tag %} |
|
9 | {% if tag %} | |
10 | <title>Neboard - {{ tag.name }}</title> |
|
10 | <title>Neboard - {{ tag.name }}</title> | |
11 | {% else %} |
|
11 | {% else %} | |
12 | <title>Neboard</title> |
|
12 | <title>Neboard</title> | |
13 | {% endif %} |
|
13 | {% endif %} | |
14 |
|
14 | |||
15 | {% if prev_page %} |
|
15 | {% if prev_page %} | |
16 | <link rel="next" href=" |
|
16 | <link rel="next" href=" | |
17 | {% if tag %} |
|
17 | {% if tag %} | |
18 | {% url "tag" tag_name=tag page=prev_page %} |
|
18 | {% url "tag" tag_name=tag page=prev_page %} | |
19 | {% else %} |
|
19 | {% else %} | |
20 | {% url "index" page=prev_page %} |
|
20 | {% url "index" page=prev_page %} | |
21 | {% endif %} |
|
21 | {% endif %} | |
22 | " /> |
|
22 | " /> | |
23 | {% endif %} |
|
23 | {% endif %} | |
24 | {% if next_page %} |
|
24 | {% if next_page %} | |
25 | <link rel="next" href=" |
|
25 | <link rel="next" href=" | |
26 | {% if tag %} |
|
26 | {% if tag %} | |
27 | {% url "tag" tag_name=tag page=next_page %} |
|
27 | {% url "tag" tag_name=tag page=next_page %} | |
28 | {% else %} |
|
28 | {% else %} | |
29 | {% url "index" page=next_page %} |
|
29 | {% url "index" page=next_page %} | |
30 | {% endif %} |
|
30 | {% endif %} | |
31 | " /> |
|
31 | " /> | |
32 | {% endif %} |
|
32 | {% endif %} | |
33 |
|
33 | |||
34 | {% endblock %} |
|
34 | {% endblock %} | |
35 |
|
35 | |||
36 | {% block content %} |
|
36 | {% block content %} | |
37 |
|
37 | |||
38 | {% get_current_language as LANGUAGE_CODE %} |
|
38 | {% get_current_language as LANGUAGE_CODE %} | |
39 |
|
39 | |||
40 | {% if tag %} |
|
40 | {% if tag %} | |
41 | <div class="tag_info"> |
|
41 | <div class="tag_info"> | |
42 | <h2> |
|
42 | <h2> | |
43 | {% if tag in user.fav_tags.all %} |
|
43 | {% if tag in user.fav_tags.all %} | |
44 | <a href="{% url 'tag_unsubscribe' tag.name %}?next={{ request.path }}" |
|
44 | <a href="{% url 'tag_unsubscribe' tag.name %}?next={{ request.path }}" | |
45 | class="fav">β </a> |
|
45 | class="fav">β </a> | |
46 | {% else %} |
|
46 | {% else %} | |
47 | <a href="{% url 'tag_subscribe' tag.name %}?next={{ request.path }}" |
|
47 | <a href="{% url 'tag_subscribe' tag.name %}?next={{ request.path }}" | |
48 | class="not_fav">β </a> |
|
48 | class="not_fav">β </a> | |
49 | {% endif %} |
|
49 | {% endif %} | |
50 | #{{ tag.name }} |
|
50 | #{{ tag.name }} | |
51 | </h2> |
|
51 | </h2> | |
52 | </div> |
|
52 | </div> | |
53 | {% endif %} |
|
53 | {% endif %} | |
54 |
|
54 | |||
55 | {% if threads %} |
|
55 | {% if threads %} | |
56 | {% if prev_page %} |
|
56 | {% if prev_page %} | |
57 | <div class="page_link"> |
|
57 | <div class="page_link"> | |
58 | <a href=" |
|
58 | <a href=" | |
59 | {% if tag %} |
|
59 | {% if tag %} | |
60 | {% url "tag" tag_name=tag page=prev_page %} |
|
60 | {% url "tag" tag_name=tag page=prev_page %} | |
61 | {% else %} |
|
61 | {% else %} | |
62 | {% url "index" page=prev_page %} |
|
62 | {% url "index" page=prev_page %} | |
63 | {% endif %} |
|
63 | {% endif %} | |
64 | ">{% trans "Previous page" %}</a> |
|
64 | ">{% trans "Previous page" %}</a> | |
65 | </div> |
|
65 | </div> | |
66 | {% endif %} |
|
66 | {% endif %} | |
67 |
|
67 | |||
68 | {% for thread in threads %} |
|
68 | {% for thread in threads %} | |
69 | {% cache 600 thread_short thread.id thread.thread.last_edit_time moderator LANGUAGE_CODE %} |
|
69 | {% cache 600 thread_short thread.id thread.thread.last_edit_time moderator LANGUAGE_CODE %} | |
70 | <div class="thread"> |
|
70 | <div class="thread"> | |
71 | {% if thread.bumpable %} |
|
71 | {% if thread.bumpable %} | |
72 | <div class="post" id="{{ thread.op.id }}"> |
|
72 | <div class="post" id="{{ thread.op.id }}"> | |
73 | {% else %} |
|
73 | {% else %} | |
74 | <div class="post dead_post" id="{{ thread.op.id }}"> |
|
74 | <div class="post dead_post" id="{{ thread.op.id }}"> | |
75 | {% endif %} |
|
75 | {% endif %} | |
76 | {% if thread.op.image %} |
|
76 | {% if thread.op.image %} | |
77 | <div class="image"> |
|
77 | <div class="image"> | |
78 | <a class="thumb" |
|
78 | <a class="thumb" | |
79 | href="{{ thread.op.image.url }}"><img |
|
79 | href="{{ thread.op.image.url }}"><img | |
80 | src="{{ thread.op.image.url_200x150 }}" |
|
80 | src="{{ thread.op.image.url_200x150 }}" | |
81 | alt="{{ thread.op.id }}" |
|
81 | alt="{{ thread.op.id }}" | |
82 | data-width="{{ thread.op.image_width }}" |
|
82 | data-width="{{ thread.op.image_width }}" | |
83 | data-height="{{ thread.op.image_height }}"/> |
|
83 | data-height="{{ thread.op.image_height }}"/> | |
84 | </a> |
|
84 | </a> | |
85 | </div> |
|
85 | </div> | |
86 | {% endif %} |
|
86 | {% endif %} | |
87 | <div class="message"> |
|
87 | <div class="message"> | |
88 | <div class="post-info"> |
|
88 | <div class="post-info"> | |
89 | <span class="title">{{ thread.op.title }}</span> |
|
89 | <span class="title">{{ thread.op.title }}</span> | |
90 | <a class="post_id" href="{% url 'thread' thread.op.id %}" |
|
90 | <a class="post_id" href="{% url 'thread' thread.op.id %}" | |
91 | >({{ thread.op.id }})</a> |
|
91 | >({{ thread.op.id }})</a> | |
92 | [{{ thread.op.pub_time }}] |
|
92 | [{{ thread.op.pub_time }}] | |
93 | [<a class="link" href=" |
|
93 | [<a class="link" href=" | |
94 | {% url 'thread' thread.op.id %}#form" |
|
94 | {% url 'thread' thread.op.id %}#form" | |
95 | >{% trans "Reply" %}</a>] |
|
95 | >{% trans "Reply" %}</a>] | |
96 |
|
96 | |||
97 | {% if moderator %} |
|
97 | {% if moderator %} | |
98 | <span class="moderator_info"> |
|
98 | <span class="moderator_info"> | |
99 | [<a href=" |
|
99 | [<a href=" | |
100 | {% url 'delete' post_id=thread.op.id %}?next={{ request.path }}" |
|
100 | {% url 'delete' post_id=thread.op.id %}?next={{ request.path }}" | |
101 | >{% trans 'Delete' %}</a>] |
|
101 | >{% trans 'Delete' %}</a>] | |
102 | ({{ thread.thread.poster_ip }}) |
|
102 | ({{ thread.thread.poster_ip }}) | |
103 | [<a href=" |
|
103 | [<a href=" | |
104 | {% url 'ban' post_id=thread.op.id %}?next={{ request.path }}" |
|
104 | {% url 'ban' post_id=thread.op.id %}?next={{ request.path }}" | |
105 | >{% trans 'Ban IP' %}</a>] |
|
105 | >{% trans 'Ban IP' %}</a>] | |
106 | </span> |
|
106 | </span> | |
107 | {% endif %} |
|
107 | {% endif %} | |
108 | </div> |
|
108 | </div> | |
109 | {% autoescape off %} |
|
109 | {% autoescape off %} | |
110 | {{ thread.op.text.rendered|truncatewords_html:50 }} |
|
110 | {{ thread.op.text.rendered|truncatewords_html:50 }} | |
111 | {% endautoescape %} |
|
111 | {% endautoescape %} | |
112 | {% if thread.op.is_referenced %} |
|
112 | {% if thread.op.is_referenced %} | |
113 | <div class="refmap"> |
|
113 | <div class="refmap"> | |
114 | {% trans "Replies" %}: |
|
114 | {% trans "Replies" %}: | |
115 | {% for ref_post in thread.op.get_sorted_referenced_posts %} |
|
115 | {% for ref_post in thread.op.get_sorted_referenced_posts %} | |
116 | <a href="{% post_url ref_post.id %}">>>{{ ref_post.id }}</a |
|
116 | <a href="{% post_url ref_post.id %}">>>{{ ref_post.id }}</a | |
117 | >{% if not forloop.last %},{% endif %} |
|
117 | >{% if not forloop.last %},{% endif %} | |
118 | {% endfor %} |
|
118 | {% endfor %} | |
119 | </div> |
|
119 | </div> | |
120 | {% endif %} |
|
120 | {% endif %} | |
121 | </div> |
|
121 | </div> | |
122 | <div class="metadata"> |
|
122 | <div class="metadata"> | |
123 | {{ thread.thread.get_images_count }} {% trans 'images' %}. |
|
123 | {{ thread.thread.get_images_count }} {% trans 'images' %}. | |
124 | {% if thread.thread.tags %} |
|
124 | {% if thread.thread.tags %} | |
125 | <span class="tags"> |
|
125 | <span class="tags"> | |
126 | {% for tag in thread.thread.get_tags %} |
|
126 | {% for tag in thread.thread.get_tags %} | |
127 | <a class="tag" href=" |
|
127 | <a class="tag" href=" | |
128 | {% url 'tag' tag_name=tag.name %}"> |
|
128 | {% url 'tag' tag_name=tag.name %}"> | |
129 | #{{ tag.name }}</a |
|
129 | #{{ tag.name }}</a | |
130 | >{% if not forloop.last %},{% endif %} |
|
130 | >{% if not forloop.last %},{% endif %} | |
131 | {% endfor %} |
|
131 | {% endfor %} | |
132 | </span> |
|
132 | </span> | |
133 | {% endif %} |
|
133 | {% endif %} | |
134 | </div> |
|
134 | </div> | |
135 | </div> |
|
135 | </div> | |
136 | {% if thread.last_replies.exists %} |
|
136 | {% if thread.last_replies.exists %} | |
137 | {% if thread.skipped_replies %} |
|
137 | {% if thread.skipped_replies %} | |
138 | <div class="skipped_replies"> |
|
138 | <div class="skipped_replies"> | |
139 | <a href="{% url 'thread' thread.op.id %}"> |
|
139 | <a href="{% url 'thread' thread.op.id %}"> | |
140 | {% blocktrans with count=thread.skipped_replies %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %} |
|
140 | {% blocktrans with count=thread.skipped_replies %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %} | |
141 | </a> |
|
141 | </a> | |
142 | </div> |
|
142 | </div> | |
143 | {% endif %} |
|
143 | {% endif %} | |
144 | <div class="last-replies"> |
|
144 | <div class="last-replies"> | |
145 | {% for post in thread.last_replies %} |
|
145 | {% for post in thread.last_replies %} | |
146 | {% if thread.bumpable %} |
|
146 | {% if thread.bumpable %} | |
147 | <div class="post" id="{{ post.id }}"> |
|
147 | <div class="post" id="{{ post.id }}"> | |
148 | {% else %} |
|
148 | {% else %} | |
149 | <div class="post dead_post" id="{{ post.id }}"> |
|
149 | <div class="post dead_post" id="{{ post.id }}"> | |
150 | {% endif %} |
|
150 | {% endif %} | |
151 | {% if post.image %} |
|
151 | {% if post.image %} | |
152 | <div class="image"> |
|
152 | <div class="image"> | |
153 | <a class="thumb" |
|
153 | <a class="thumb" | |
154 | href="{{ post.image.url }}"><img |
|
154 | href="{{ post.image.url }}"><img | |
155 | src=" {{ post.image.url_200x150 }}" |
|
155 | src=" {{ post.image.url_200x150 }}" | |
156 | alt="{{ post.id }}" |
|
156 | alt="{{ post.id }}" | |
157 | data-width="{{ post.image_width }}" |
|
157 | data-width="{{ post.image_width }}" | |
158 | data-height="{{ post.image_height }}"/> |
|
158 | data-height="{{ post.image_height }}"/> | |
159 | </a> |
|
159 | </a> | |
160 | </div> |
|
160 | </div> | |
161 | {% endif %} |
|
161 | {% endif %} | |
162 | <div class="message"> |
|
162 | <div class="message"> | |
163 | <div class="post-info"> |
|
163 | <div class="post-info"> | |
164 | <span class="title">{{ post.title }}</span> |
|
164 | <span class="title">{{ post.title }}</span> | |
165 | <a class="post_id" href=" |
|
165 | <a class="post_id" href=" | |
166 | {% url 'thread' thread.op.id %}#{{ post.id }}"> |
|
166 | {% url 'thread' thread.op.id %}#{{ post.id }}"> | |
167 | ({{ post.id }})</a> |
|
167 | ({{ post.id }})</a> | |
168 | [{{ post.pub_time }}] |
|
168 | [{{ post.pub_time }}] | |
169 | </div> |
|
169 | </div> | |
170 | {% autoescape off %} |
|
170 | {% autoescape off %} | |
171 | {{ post.text.rendered|truncatewords_html:50 }} |
|
171 | {{ post.text.rendered|truncatewords_html:50 }} | |
172 | {% endautoescape %} |
|
172 | {% endautoescape %} | |
173 | </div> |
|
173 | </div> | |
174 | {% if post.is_referenced %} |
|
174 | {% if post.is_referenced %} | |
175 | <div class="refmap"> |
|
175 | <div class="refmap"> | |
176 | {% trans "Replies" %}: |
|
176 | {% trans "Replies" %}: | |
177 | {% for ref_post in post.get_sorted_referenced_posts %} |
|
177 | {% for ref_post in post.get_sorted_referenced_posts %} | |
178 | <a href="{% post_url ref_post.id %}">>>{{ ref_post.id }}</a |
|
178 | <a href="{% post_url ref_post.id %}">>>{{ ref_post.id }}</a | |
179 | >{% if not forloop.last %},{% endif %} |
|
179 | >{% if not forloop.last %},{% endif %} | |
180 | {% endfor %} |
|
180 | {% endfor %} | |
181 | </div> |
|
181 | </div> | |
182 | {% endif %} |
|
182 | {% endif %} | |
183 | </div> |
|
183 | </div> | |
184 | {% endfor %} |
|
184 | {% endfor %} | |
185 | </div> |
|
185 | </div> | |
186 | {% endif %} |
|
186 | {% endif %} | |
187 | </div> |
|
187 | </div> | |
188 | {% endcache %} |
|
188 | {% endcache %} | |
189 | {% endfor %} |
|
189 | {% endfor %} | |
190 |
|
190 | |||
191 | {% if next_page %} |
|
191 | {% if next_page %} | |
192 | <div class="page_link"> |
|
192 | <div class="page_link"> | |
193 | <a href=" |
|
193 | <a href=" | |
194 | {% if tag %} |
|
194 | {% if tag %} | |
195 | {% url "tag" tag_name=tag page=next_page %} |
|
195 | {% url "tag" tag_name=tag page=next_page %} | |
196 | {% else %} |
|
196 | {% else %} | |
197 | {% url "index" page=next_page %} |
|
197 | {% url "index" page=next_page %} | |
198 | {% endif %} |
|
198 | {% endif %} | |
199 | ">{% trans "Next page" %}</a> |
|
199 | ">{% trans "Next page" %}</a> | |
200 | </div> |
|
200 | </div> | |
201 | {% endif %} |
|
201 | {% endif %} | |
202 | {% else %} |
|
202 | {% else %} | |
203 | <div class="post"> |
|
203 | <div class="post"> | |
204 | {% trans 'No threads exist. Create the first one!' %}</div> |
|
204 | {% trans 'No threads exist. Create the first one!' %}</div> | |
205 | {% endif %} |
|
205 | {% endif %} | |
206 |
|
206 | |||
207 | <div class="post-form-w"> |
|
207 | <div class="post-form-w"> | |
208 | <script src="{% static 'js/panel.js' %}"></script> |
|
208 | <script src="{% static 'js/panel.js' %}"></script> | |
|
209 | <style type="text/css"> | |||
|
210 | form > :nth-child(4) { | |||
|
211 | display: none; | |||
|
212 | } | |||
|
213 | </style> | |||
209 | <div class="post-form"> |
|
214 | <div class="post-form"> | |
210 | <div class="form-title">{% trans "Create new thread" %}</div> |
|
215 | <div class="form-title">{% trans "Create new thread" %}</div> | |
211 | <form enctype="multipart/form-data" method="post">{% csrf_token %} |
|
216 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
212 | {{ form.as_div }} |
|
217 | {{ form.as_div }} | |
213 | <div class="form-submit"> |
|
218 | <div class="form-submit"> | |
214 | <input type="submit" value="{% trans "Post" %}"/> |
|
219 | <input type="submit" value="{% trans "Post" %}"/> | |
215 | </div> |
|
220 | </div> | |
216 | </form> |
|
221 | </form> | |
217 | <div> |
|
222 | <div> | |
218 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} |
|
223 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} | |
219 | </div> |
|
224 | </div> | |
220 | <div><a href="{% url "staticpage" name="help" %}"> |
|
225 | <div><a href="{% url "staticpage" name="help" %}"> | |
221 | {% trans 'Text syntax' %}</a></div> |
|
226 | {% trans 'Text syntax' %}</a></div> | |
222 | </div> |
|
227 | </div> | |
223 | </div> |
|
228 | </div> | |
224 |
|
229 | |||
225 | {% endblock %} |
|
230 | {% endblock %} | |
226 |
|
231 | |||
227 | {% block metapanel %} |
|
232 | {% block metapanel %} | |
228 |
|
233 | |||
229 | <span class="metapanel"> |
|
234 | <span class="metapanel"> | |
230 | <b><a href="{% url "authors" %}">Neboard</a> 1.4.1</b> |
|
235 | <b><a href="{% url "authors" %}">Neboard</a> 1.4.1</b> | |
231 | {% trans "Pages:" %} |
|
236 | {% trans "Pages:" %} | |
232 | {% for page in pages %} |
|
237 | {% for page in pages %} | |
233 | [<a href=" |
|
238 | [<a href=" | |
234 | {% if tag %} |
|
239 | {% if tag %} | |
235 | {% url "tag" tag_name=tag page=page %} |
|
240 | {% url "tag" tag_name=tag page=page %} | |
236 | {% else %} |
|
241 | {% else %} | |
237 | {% url "index" page=page %} |
|
242 | {% url "index" page=page %} | |
238 | {% endif %} |
|
243 | {% endif %} | |
239 | ">{{ page }}</a>] |
|
244 | ">{{ page }}</a>] | |
240 | {% endfor %} |
|
245 | {% endfor %} | |
241 | [<a href="rss/">RSS</a>] |
|
246 | [<a href="rss/">RSS</a>] | |
242 | </span> |
|
247 | </span> | |
243 |
|
248 | |||
244 | {% endblock %} |
|
249 | {% endblock %} |
@@ -1,128 +1,133 b'' | |||||
1 | {% extends "boards/base.html" %} |
|
1 | {% extends "boards/base.html" %} | |
2 |
|
2 | |||
3 | {% load i18n %} |
|
3 | {% load i18n %} | |
4 | {% load cache %} |
|
4 | {% load cache %} | |
5 | {% load static from staticfiles %} |
|
5 | {% load static from staticfiles %} | |
6 | {% load board %} |
|
6 | {% load board %} | |
7 |
|
7 | |||
8 | {% block head %} |
|
8 | {% block head %} | |
9 | <title>Neboard - {{ thread.get_replies.0.get_title }}</title> |
|
9 | <title>Neboard - {{ thread.get_replies.0.get_title }}</title> | |
10 | {% endblock %} |
|
10 | {% endblock %} | |
11 |
|
11 | |||
12 | {% block content %} |
|
12 | {% block content %} | |
13 | {% spaceless %} |
|
13 | {% spaceless %} | |
14 | {% get_current_language as LANGUAGE_CODE %} |
|
14 | {% get_current_language as LANGUAGE_CODE %} | |
15 |
|
15 | |||
16 | <script src="{% static 'js/thread_update.js' %}"></script> |
|
16 | <script src="{% static 'js/thread_update.js' %}"></script> | |
17 | <script src="{% static 'js/thread.js' %}"></script> |
|
17 | <script src="{% static 'js/thread.js' %}"></script> | |
18 |
|
18 | |||
19 | {% cache 600 thread_view thread.id thread.last_edit_time moderator LANGUAGE_CODE %} |
|
19 | {% cache 600 thread_view thread.id thread.last_edit_time moderator LANGUAGE_CODE %} | |
20 | {% if bumpable %} |
|
20 | {% if bumpable %} | |
21 | <div class="bar-bg"> |
|
21 | <div class="bar-bg"> | |
22 | <div class="bar-value" style="width:{{ bumplimit_progress }}%" id="bumplimit_progress"> |
|
22 | <div class="bar-value" style="width:{{ bumplimit_progress }}%" id="bumplimit_progress"> | |
23 | </div> |
|
23 | </div> | |
24 | <div class="bar-text"> |
|
24 | <div class="bar-text"> | |
25 | <span id="left_to_limit">{{ posts_left }}</span> {% trans 'posts to bumplimit' %} |
|
25 | <span id="left_to_limit">{{ posts_left }}</span> {% trans 'posts to bumplimit' %} | |
26 | </div> |
|
26 | </div> | |
27 | </div> |
|
27 | </div> | |
28 | {% endif %} |
|
28 | {% endif %} | |
29 | <div class="thread"> |
|
29 | <div class="thread"> | |
30 | {% for post in thread.get_replies %} |
|
30 | {% for post in thread.get_replies %} | |
31 | {% if bumpable %} |
|
31 | {% if bumpable %} | |
32 | <div class="post" id="{{ post.id }}"> |
|
32 | <div class="post" id="{{ post.id }}"> | |
33 | {% else %} |
|
33 | {% else %} | |
34 | <div class="post dead_post" id="{{ post.id }}"> |
|
34 | <div class="post dead_post" id="{{ post.id }}"> | |
35 | {% endif %} |
|
35 | {% endif %} | |
36 | {% if post.image %} |
|
36 | {% if post.image %} | |
37 | <div class="image"> |
|
37 | <div class="image"> | |
38 | <a |
|
38 | <a | |
39 | class="thumb" |
|
39 | class="thumb" | |
40 | href="{{ post.image.url }}"><img |
|
40 | href="{{ post.image.url }}"><img | |
41 | src="{{ post.image.url_200x150 }}" |
|
41 | src="{{ post.image.url_200x150 }}" | |
42 | alt="{{ post.id }}" |
|
42 | alt="{{ post.id }}" | |
43 | data-width="{{ post.image_width }}" |
|
43 | data-width="{{ post.image_width }}" | |
44 | data-height="{{ post.image_height }}"/> |
|
44 | data-height="{{ post.image_height }}"/> | |
45 | </a> |
|
45 | </a> | |
46 | </div> |
|
46 | </div> | |
47 | {% endif %} |
|
47 | {% endif %} | |
48 | <div class="message"> |
|
48 | <div class="message"> | |
49 | <div class="post-info"> |
|
49 | <div class="post-info"> | |
50 | <span class="title">{{ post.title }}</span> |
|
50 | <span class="title">{{ post.title }}</span> | |
51 | <a class="post_id" href="#{{ post.id }}"> |
|
51 | <a class="post_id" href="#{{ post.id }}"> | |
52 | ({{ post.id }})</a> |
|
52 | ({{ post.id }})</a> | |
53 | [{{ post.pub_time }}] |
|
53 | [{{ post.pub_time }}] | |
54 | [<a href="#" onclick="javascript:addQuickReply('{{ post.id }}') |
|
54 | [<a href="#" onclick="javascript:addQuickReply('{{ post.id }}') | |
55 | ; return false;">>></a>] |
|
55 | ; return false;">>></a>] | |
56 |
|
56 | |||
57 | {% if moderator %} |
|
57 | {% if moderator %} | |
58 | <span class="moderator_info"> |
|
58 | <span class="moderator_info"> | |
59 | [<a href="{% url 'delete' post_id=post.id %}" |
|
59 | [<a href="{% url 'delete' post_id=post.id %}" | |
60 | >{% trans 'Delete' %}</a>] |
|
60 | >{% trans 'Delete' %}</a>] | |
61 | ({{ post.poster_ip }}) |
|
61 | ({{ post.poster_ip }}) | |
62 | [<a href="{% url 'ban' post_id=post.id %}?next={{ request.path }}" |
|
62 | [<a href="{% url 'ban' post_id=post.id %}?next={{ request.path }}" | |
63 | >{% trans 'Ban IP' %}</a>] |
|
63 | >{% trans 'Ban IP' %}</a>] | |
64 | </span> |
|
64 | </span> | |
65 | {% endif %} |
|
65 | {% endif %} | |
66 | </div> |
|
66 | </div> | |
67 | {% autoescape off %} |
|
67 | {% autoescape off %} | |
68 | {{ post.text.rendered }} |
|
68 | {{ post.text.rendered }} | |
69 | {% endautoescape %} |
|
69 | {% endautoescape %} | |
70 | {% if post.is_referenced %} |
|
70 | {% if post.is_referenced %} | |
71 | <div class="refmap"> |
|
71 | <div class="refmap"> | |
72 | {% trans "Replies" %}: |
|
72 | {% trans "Replies" %}: | |
73 | {% for ref_post in post.get_sorted_referenced_posts %} |
|
73 | {% for ref_post in post.get_sorted_referenced_posts %} | |
74 | <a href="{% post_url ref_post.id %}">>>{{ ref_post.id }}</a |
|
74 | <a href="{% post_url ref_post.id %}">>>{{ ref_post.id }}</a | |
75 | >{% if not forloop.last %},{% endif %} |
|
75 | >{% if not forloop.last %},{% endif %} | |
76 | {% endfor %} |
|
76 | {% endfor %} | |
77 | </div> |
|
77 | </div> | |
78 | {% endif %} |
|
78 | {% endif %} | |
79 | </div> |
|
79 | </div> | |
80 | {% if forloop.first %} |
|
80 | {% if forloop.first %} | |
81 | <div class="metadata"> |
|
81 | <div class="metadata"> | |
82 | <span class="tags"> |
|
82 | <span class="tags"> | |
83 | {% for tag in thread.get_tags %} |
|
83 | {% for tag in thread.get_tags %} | |
84 | <a class="tag" href="{% url 'tag' tag.name %}"> |
|
84 | <a class="tag" href="{% url 'tag' tag.name %}"> | |
85 | #{{ tag.name }}</a |
|
85 | #{{ tag.name }}</a | |
86 | >{% if not forloop.last %},{% endif %} |
|
86 | >{% if not forloop.last %},{% endif %} | |
87 | {% endfor %} |
|
87 | {% endfor %} | |
88 | </span> |
|
88 | </span> | |
89 | </div> |
|
89 | </div> | |
90 | {% endif %} |
|
90 | {% endif %} | |
91 | </div> |
|
91 | </div> | |
92 | {% endfor %} |
|
92 | {% endfor %} | |
93 | </div> |
|
93 | </div> | |
94 | {% endcache %} |
|
94 | {% endcache %} | |
95 |
|
95 | |||
96 | <div class="post-form-w"> |
|
96 | <div class="post-form-w"> | |
97 | <script src="{% static 'js/panel.js' %}"></script> |
|
97 | <script src="{% static 'js/panel.js' %}"></script> | |
98 | <div class="form-title">{% trans "Reply to thread" %} #{{ thread.get_opening_post.id }}</div> |
|
98 | <style type="text/css"> | |
|
99 | form > :nth-child(4) { | |||
|
100 | display: none; | |||
|
101 | } | |||
|
102 | </style> | |||
|
103 | <div class="form-title">{% trans "Reply to thread" %} #{{ thread.get_opening_post.id }}</div> | |||
99 | <div class="post-form"> |
|
104 | <div class="post-form"> | |
100 | <form id="form" enctype="multipart/form-data" method="post" |
|
105 | <form id="form" enctype="multipart/form-data" method="post" | |
101 |
|
|
106 | >{% csrf_token %} | |
102 | {{ form.as_div }} |
|
107 | {{ form.as_div }} | |
103 | <div class="form-submit"> |
|
108 | <div class="form-submit"> | |
104 | <input type="submit" value="{% trans "Post" %}"/> |
|
109 | <input type="submit" value="{% trans "Post" %}"/> | |
105 | </div> |
|
110 | </div> | |
106 | </form> |
|
111 | </form> | |
107 | <div><a href="{% url "staticpage" name="help" %}"> |
|
112 | <div><a href="{% url "staticpage" name="help" %}"> | |
108 | {% trans 'Text syntax' %}</a></div> |
|
113 | {% trans 'Text syntax' %}</a></div> | |
109 | </div> |
|
114 | </div> | |
110 | </div> |
|
115 | </div> | |
111 |
|
116 | |||
112 | {% endspaceless %} |
|
117 | {% endspaceless %} | |
113 | {% endblock %} |
|
118 | {% endblock %} | |
114 |
|
119 | |||
115 | {% block metapanel %} |
|
120 | {% block metapanel %} | |
116 |
|
121 | |||
117 | {% get_current_language as LANGUAGE_CODE %} |
|
122 | {% get_current_language as LANGUAGE_CODE %} | |
118 |
|
123 | |||
119 | <span class="metapanel" data-last-update="{{ last_update }}"> |
|
124 | <span class="metapanel" data-last-update="{{ last_update }}"> | |
120 | {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %} |
|
125 | {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %} | |
121 | <span id="reply-count">{{ thread.get_reply_count }}</span> {% trans 'replies' %}, |
|
126 | <span id="reply-count">{{ thread.get_reply_count }}</span> {% trans 'replies' %}, | |
122 | <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}. |
|
127 | <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}. | |
123 | {% trans 'Last update: ' %}{{ thread.last_edit_time }} |
|
128 | {% trans 'Last update: ' %}{{ thread.last_edit_time }} | |
124 | [<a href="rss/">RSS</a>] |
|
129 | [<a href="rss/">RSS</a>] | |
125 | {% endcache %} |
|
130 | {% endcache %} | |
126 | </span> |
|
131 | </span> | |
127 |
|
132 | |||
128 | {% endblock %} |
|
133 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now