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