Show More
@@ -1,244 +1,244 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 | <div class="post-form"> |
|
209 | <div class="post-form"> | |
210 | <div class="form-title">{% trans "Create new thread" %}</div> |
|
210 | <div class="form-title">{% trans "Create new thread" %}</div> | |
211 | <form enctype="multipart/form-data" method="post">{% csrf_token %} |
|
211 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
212 | {{ form.as_div }} |
|
212 | {{ form.as_div }} | |
213 | <div class="form-submit"> |
|
213 | <div class="form-submit"> | |
214 | <input type="submit" value="{% trans "Post" %}"/> |
|
214 | <input type="submit" value="{% trans "Post" %}"/> | |
215 | </div> |
|
215 | </div> | |
216 | </form> |
|
216 | </form> | |
217 | <div> |
|
217 | <div> | |
218 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} |
|
218 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} | |
219 | </div> |
|
219 | </div> | |
220 | <div><a href="{% url "staticpage" name="help" %}"> |
|
220 | <div><a href="{% url "staticpage" name="help" %}"> | |
221 | {% trans 'Text syntax' %}</a></div> |
|
221 | {% trans 'Text syntax' %}</a></div> | |
222 | </div> |
|
222 | </div> | |
223 | </div> |
|
223 | </div> | |
224 |
|
224 | |||
225 | {% endblock %} |
|
225 | {% endblock %} | |
226 |
|
226 | |||
227 | {% block metapanel %} |
|
227 | {% block metapanel %} | |
228 |
|
228 | |||
229 | <span class="metapanel"> |
|
229 | <span class="metapanel"> | |
230 | <b><a href="{% url "authors" %}">Neboard</a> 1.4</b> |
|
230 | <b><a href="{% url "authors" %}">Neboard</a> 1.4.1</b> | |
231 | {% trans "Pages:" %} |
|
231 | {% trans "Pages:" %} | |
232 | {% for page in pages %} |
|
232 | {% for page in pages %} | |
233 | [<a href=" |
|
233 | [<a href=" | |
234 | {% if tag %} |
|
234 | {% if tag %} | |
235 | {% url "tag" tag_name=tag page=page %} |
|
235 | {% url "tag" tag_name=tag page=page %} | |
236 | {% else %} |
|
236 | {% else %} | |
237 | {% url "index" page=page %} |
|
237 | {% url "index" page=page %} | |
238 | {% endif %} |
|
238 | {% endif %} | |
239 | ">{{ page }}</a>] |
|
239 | ">{{ page }}</a>] | |
240 | {% endfor %} |
|
240 | {% endfor %} | |
241 | [<a href="rss/">RSS</a>] |
|
241 | [<a href="rss/">RSS</a>] | |
242 | </span> |
|
242 | </span> | |
243 |
|
243 | |||
244 | {% endblock %} |
|
244 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now