Show More
@@ -1,244 +1,244 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 | data-width="{{ thread.op.image_width }}" |
|
83 | 83 | data-height="{{ thread.op.image_height }}"/> |
|
84 | 84 | </a> |
|
85 | 85 | </div> |
|
86 | 86 | {% endif %} |
|
87 | 87 | <div class="message"> |
|
88 | 88 | <div class="post-info"> |
|
89 | 89 | <span class="title">{{ thread.op.title }}</span> |
|
90 | 90 | <a class="post_id" href="{% url 'thread' thread.op.id %}" |
|
91 | 91 | >({{ thread.op.id }})</a> |
|
92 | 92 | [{{ thread.op.pub_time }}] |
|
93 | 93 | [<a class="link" href=" |
|
94 | 94 | {% url 'thread' thread.op.id %}#form" |
|
95 | 95 | >{% trans "Reply" %}</a>] |
|
96 | 96 | |
|
97 | 97 | {% if moderator %} |
|
98 | 98 | <span class="moderator_info"> |
|
99 | 99 | [<a href=" |
|
100 | 100 | {% url 'delete' post_id=thread.op.id %}?next={{ request.path }}" |
|
101 | 101 | >{% trans 'Delete' %}</a>] |
|
102 | 102 | ({{ thread.thread.poster_ip }}) |
|
103 | 103 | [<a href=" |
|
104 | 104 | {% url 'ban' post_id=thread.op.id %}?next={{ request.path }}" |
|
105 | 105 | >{% trans 'Ban IP' %}</a>] |
|
106 | 106 | </span> |
|
107 | 107 | {% endif %} |
|
108 | 108 | </div> |
|
109 | 109 | {% autoescape off %} |
|
110 | 110 | {{ thread.op.text.rendered|truncatewords_html:50 }} |
|
111 | 111 | {% endautoescape %} |
|
112 | 112 | {% if thread.op.is_referenced %} |
|
113 | 113 | <div class="refmap"> |
|
114 | 114 | {% trans "Replies" %}: |
|
115 | 115 | {% for ref_post in thread.op.get_sorted_referenced_posts %} |
|
116 | 116 | <a href="{% post_url ref_post.id %}">>>{{ ref_post.id }}</a |
|
117 | 117 | >{% if not forloop.last %},{% endif %} |
|
118 | 118 | {% endfor %} |
|
119 | 119 | </div> |
|
120 | 120 | {% endif %} |
|
121 | 121 | </div> |
|
122 | 122 | <div class="metadata"> |
|
123 | 123 | {{ thread.thread.get_images_count }} {% trans 'images' %}. |
|
124 | 124 | {% if thread.thread.tags %} |
|
125 | 125 | <span class="tags"> |
|
126 | 126 | {% for tag in thread.thread.get_tags %} |
|
127 | 127 | <a class="tag" href=" |
|
128 | 128 | {% url 'tag' tag_name=tag.name %}"> |
|
129 | 129 | #{{ tag.name }}</a |
|
130 | 130 | >{% if not forloop.last %},{% endif %} |
|
131 | 131 | {% endfor %} |
|
132 | 132 | </span> |
|
133 | 133 | {% endif %} |
|
134 | 134 | </div> |
|
135 | 135 | </div> |
|
136 | 136 | {% if thread.last_replies.exists %} |
|
137 | 137 | {% if thread.skipped_replies %} |
|
138 | 138 | <div class="skipped_replies"> |
|
139 | 139 | <a href="{% url 'thread' thread.op.id %}"> |
|
140 | 140 | {% blocktrans with count=thread.skipped_replies %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %} |
|
141 | 141 | </a> |
|
142 | 142 | </div> |
|
143 | 143 | {% endif %} |
|
144 | 144 | <div class="last-replies"> |
|
145 | 145 | {% for post in thread.last_replies %} |
|
146 | 146 | {% if thread.bumpable %} |
|
147 | 147 | <div class="post" id="{{ post.id }}"> |
|
148 | 148 | {% else %} |
|
149 | 149 | <div class="post dead_post" id="{{ post.id }}"> |
|
150 | 150 | {% endif %} |
|
151 | 151 | {% if post.image %} |
|
152 | 152 | <div class="image"> |
|
153 | 153 | <a class="thumb" |
|
154 | 154 | href="{{ post.image.url }}"><img |
|
155 | 155 | src=" {{ post.image.url_200x150 }}" |
|
156 | 156 | alt="{{ post.id }}" |
|
157 | 157 | data-width="{{ post.image_width }}" |
|
158 | 158 | data-height="{{ post.image_height }}"/> |
|
159 | 159 | </a> |
|
160 | 160 | </div> |
|
161 | 161 | {% endif %} |
|
162 | 162 | <div class="message"> |
|
163 | 163 | <div class="post-info"> |
|
164 | 164 | <span class="title">{{ post.title }}</span> |
|
165 | 165 | <a class="post_id" href=" |
|
166 | 166 | {% url 'thread' thread.op.id %}#{{ post.id }}"> |
|
167 | 167 | ({{ post.id }})</a> |
|
168 | 168 | [{{ post.pub_time }}] |
|
169 | 169 | </div> |
|
170 | 170 | {% autoescape off %} |
|
171 | 171 | {{ post.text.rendered|truncatewords_html:50 }} |
|
172 | 172 | {% endautoescape %} |
|
173 | 173 | </div> |
|
174 | 174 | {% if post.is_referenced %} |
|
175 | 175 | <div class="refmap"> |
|
176 | 176 | {% trans "Replies" %}: |
|
177 | 177 | {% for ref_post in post.get_sorted_referenced_posts %} |
|
178 | 178 | <a href="{% post_url ref_post.id %}">>>{{ ref_post.id }}</a |
|
179 | 179 | >{% if not forloop.last %},{% endif %} |
|
180 | 180 | {% endfor %} |
|
181 | 181 | </div> |
|
182 | 182 | {% endif %} |
|
183 | 183 | </div> |
|
184 | 184 | {% endfor %} |
|
185 | 185 | </div> |
|
186 | 186 | {% endif %} |
|
187 | 187 | </div> |
|
188 | 188 | {% endcache %} |
|
189 | 189 | {% endfor %} |
|
190 | 190 | |
|
191 | 191 | {% if next_page %} |
|
192 | 192 | <div class="page_link"> |
|
193 | 193 | <a href=" |
|
194 | 194 | {% if tag %} |
|
195 | 195 | {% url "tag" tag_name=tag page=next_page %} |
|
196 | 196 | {% else %} |
|
197 | 197 | {% url "index" page=next_page %} |
|
198 | 198 | {% endif %} |
|
199 | 199 | ">{% trans "Next page" %}</a> |
|
200 | 200 | </div> |
|
201 | 201 | {% endif %} |
|
202 | 202 | {% else %} |
|
203 | 203 | <div class="post"> |
|
204 | 204 | {% trans 'No threads exist. Create the first one!' %}</div> |
|
205 | 205 | {% endif %} |
|
206 | 206 | |
|
207 | 207 | <div class="post-form-w"> |
|
208 | 208 | <script src="{% static 'js/panel.js' %}"></script> |
|
209 | 209 | <div class="post-form"> |
|
210 | 210 | <div class="form-title">{% trans "Create new thread" %}</div> |
|
211 | 211 | <form enctype="multipart/form-data" method="post">{% csrf_token %} |
|
212 | 212 | {{ form.as_div }} |
|
213 | 213 | <div class="form-submit"> |
|
214 | 214 | <input type="submit" value="{% trans "Post" %}"/> |
|
215 | 215 | </div> |
|
216 | 216 | </form> |
|
217 | 217 | <div> |
|
218 | 218 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} |
|
219 | 219 | </div> |
|
220 | 220 | <div><a href="{% url "staticpage" name="help" %}"> |
|
221 | 221 | {% trans 'Text syntax' %}</a></div> |
|
222 | 222 | </div> |
|
223 | 223 | </div> |
|
224 | 224 | |
|
225 | 225 | {% endblock %} |
|
226 | 226 | |
|
227 | 227 | {% block metapanel %} |
|
228 | 228 | |
|
229 | 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 | 231 | {% trans "Pages:" %} |
|
232 | 232 | {% for page in pages %} |
|
233 | 233 | [<a href=" |
|
234 | 234 | {% if tag %} |
|
235 | 235 | {% url "tag" tag_name=tag page=page %} |
|
236 | 236 | {% else %} |
|
237 | 237 | {% url "index" page=page %} |
|
238 | 238 | {% endif %} |
|
239 | 239 | ">{{ page }}</a>] |
|
240 | 240 | {% endfor %} |
|
241 | 241 | [<a href="rss/">RSS</a>] |
|
242 | 242 | </span> |
|
243 | 243 | |
|
244 | 244 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now