Show More
@@ -1,222 +1,223 b'' | |||||
1 | {% extends "boards/base.html" %} |
|
1 | {% extends "boards/base.html" %} | |
2 |
|
2 | |||
3 | {% load i18n %} |
|
3 | {% load i18n %} | |
4 | {% load markup %} |
|
4 | {% load markup %} | |
5 | {% load cache %} |
|
5 | {% load cache %} | |
6 |
|
6 | |||
7 | {% block head %} |
|
7 | {% block head %} | |
8 | {% if tag %} |
|
8 | {% if tag %} | |
9 | <title>Neboard - {{ tag.name }}</title> |
|
9 | <title>Neboard - {{ tag.name }}</title> | |
10 | {% else %} |
|
10 | {% else %} | |
11 | <title>Neboard</title> |
|
11 | <title>Neboard</title> | |
12 | {% endif %} |
|
12 | {% endif %} | |
13 | {% endblock %} |
|
13 | {% endblock %} | |
14 |
|
14 | |||
15 | {% block content %} |
|
15 | {% block content %} | |
16 |
|
16 | |||
17 | {% if tag %} |
|
17 | {% if tag %} | |
18 | <div class="tag_info"> |
|
18 | <div class="tag_info"> | |
19 |
<h2> |
|
19 | <h2> | |
20 | {% if tag in user.fav_tags.all %} |
|
20 | {% if tag in user.fav_tags.all %} | |
21 | <a href="{% url 'tag_unsubscribe' tag.name %}?next={{ request.path }}" |
|
21 | <a href="{% url 'tag_unsubscribe' tag.name %}?next={{ request.path }}" | |
22 | class="fav">β </a> |
|
22 | class="fav">β </a> | |
23 | {% else %} |
|
23 | {% else %} | |
24 | <a href="{% url 'tag_subscribe' tag.name %}?next={{ request.path }}" |
|
24 | <a href="{% url 'tag_subscribe' tag.name %}?next={{ request.path }}" | |
25 | class="not_fav">β </a> |
|
25 | class="not_fav">β </a> | |
26 | {% endif %} |
|
26 | {% endif %} | |
|
27 | #{{ tag.name }} | |||
27 | </h2> |
|
28 | </h2> | |
28 | </div> |
|
29 | </div> | |
29 | {% endif %} |
|
30 | {% endif %} | |
30 |
|
31 | |||
31 | {% if threads %} |
|
32 | {% if threads %} | |
32 | {% for thread in threads %} |
|
33 | {% for thread in threads %} | |
33 | <div class="thread"> |
|
34 | <div class="thread"> | |
34 | {% if thread.bumpable %} |
|
35 | {% if thread.bumpable %} | |
35 | <div class="post" id="{{ thread.thread.id }}"> |
|
36 | <div class="post" id="{{ thread.thread.id }}"> | |
36 | {% else %} |
|
37 | {% else %} | |
37 | <div class="post dead_post" id="{{ thread.thread.id }}"> |
|
38 | <div class="post dead_post" id="{{ thread.thread.id }}"> | |
38 | {% endif %} |
|
39 | {% endif %} | |
39 | {% if thread.thread.image %} |
|
40 | {% if thread.thread.image %} | |
40 | <div class="image"> |
|
41 | <div class="image"> | |
41 | <a class="thumb" |
|
42 | <a class="thumb" | |
42 | href="{{ thread.thread.image.url }}"><img |
|
43 | href="{{ thread.thread.image.url }}"><img | |
43 | src="{{ thread.thread.image.url_200x150 }}" |
|
44 | src="{{ thread.thread.image.url_200x150 }}" | |
44 | alt="{{ thread.thread.id }}" |
|
45 | alt="{{ thread.thread.id }}" | |
45 | data-width="{{ thread.thread.image_width }}" |
|
46 | data-width="{{ thread.thread.image_width }}" | |
46 | data-height="{{ thread.thread.image_height }}" /> |
|
47 | data-height="{{ thread.thread.image_height }}" /> | |
47 | </a> |
|
48 | </a> | |
48 | </div> |
|
49 | </div> | |
49 | {% endif %} |
|
50 | {% endif %} | |
50 | <div class="message"> |
|
51 | <div class="message"> | |
51 | <div class="post-info"> |
|
52 | <div class="post-info"> | |
52 | <span class="title">{{ thread.thread.title }}</span> |
|
53 | <span class="title">{{ thread.thread.title }}</span> | |
53 | <a class="post_id" href="{% url 'thread' thread.thread.id %}" |
|
54 | <a class="post_id" href="{% url 'thread' thread.thread.id %}" | |
54 | >(#{{ thread.thread.id }})</a> |
|
55 | >(#{{ thread.thread.id }})</a> | |
55 | [{{ thread.thread.pub_time }}] |
|
56 | [{{ thread.thread.pub_time }}] | |
56 | [<a class="link" href="{% url 'thread' thread.thread.id %}#form" |
|
57 | [<a class="link" href="{% url 'thread' thread.thread.id %}#form" | |
57 | >{% trans "Reply" %}</a>] |
|
58 | >{% trans "Reply" %}</a>] | |
58 |
|
59 | |||
59 | {% if moderator %} |
|
60 | {% if moderator %} | |
60 | <span class="moderator_info"> |
|
61 | <span class="moderator_info"> | |
61 | [<a href="{% url 'delete' post_id=thread.thread.id %}?next={{ request.path }}" |
|
62 | [<a href="{% url 'delete' post_id=thread.thread.id %}?next={{ request.path }}" | |
62 | >{% trans 'Delete' %}</a>] |
|
63 | >{% trans 'Delete' %}</a>] | |
63 | ({{ thread.thread.poster_ip }}) |
|
64 | ({{ thread.thread.poster_ip }}) | |
64 | [<a href="{% url 'ban' post_id=thread.thread.id %}?next={{ request.path }}" |
|
65 | [<a href="{% url 'ban' post_id=thread.thread.id %}?next={{ request.path }}" | |
65 | >{% trans 'Ban IP' %}</a>] |
|
66 | >{% trans 'Ban IP' %}</a>] | |
66 | </span> |
|
67 | </span> | |
67 | {% endif %} |
|
68 | {% endif %} | |
68 | </div> |
|
69 | </div> | |
69 | {% autoescape off %} |
|
70 | {% autoescape off %} | |
70 | {{ thread.thread.text.rendered|truncatewords_html:50 }} |
|
71 | {{ thread.thread.text.rendered|truncatewords_html:50 }} | |
71 | {% endautoescape %} |
|
72 | {% endautoescape %} | |
72 | </div> |
|
73 | </div> | |
73 | <div class="metadata"> |
|
74 | <div class="metadata"> | |
74 | {{ thread.thread.get_reply_count }} {% trans 'replies' %}, |
|
75 | {{ thread.thread.get_reply_count }} {% trans 'replies' %}, | |
75 | {{ thread.thread.get_images_count }} {% trans 'images' %}. |
|
76 | {{ thread.thread.get_images_count }} {% trans 'images' %}. | |
76 | {% if thread.thread.tags %} |
|
77 | {% if thread.thread.tags %} | |
77 | <span class="tags"> |
|
78 | <span class="tags"> | |
78 | {% for tag in thread.thread.tags.all %} |
|
79 | {% for tag in thread.thread.tags.all %} | |
79 | <a class="tag" href=" |
|
80 | <a class="tag" href=" | |
80 | {% url 'tag' tag_name=tag.name %}"> |
|
81 | {% url 'tag' tag_name=tag.name %}"> | |
81 | #{{ tag.name }}</a> |
|
82 | #{{ tag.name }}</a> | |
82 | {% endfor %} |
|
83 | {% endfor %} | |
83 | </span> |
|
84 | </span> | |
84 | {% endif %} |
|
85 | {% endif %} | |
85 | </div> |
|
86 | </div> | |
86 | {% if thread.thread.referenced_posts.all %} |
|
87 | {% if thread.thread.referenced_posts.all %} | |
87 | <div class="refmap"> |
|
88 | <div class="refmap"> | |
88 | {% trans "Replies" %}: |
|
89 | {% trans "Replies" %}: | |
89 | {% for ref_post in thread.thread.referenced_posts.all %} |
|
90 | {% for ref_post in thread.thread.referenced_posts.all %} | |
90 | <a href="{% url 'jumper' ref_post.id %}">>>{{ ref_post.id }}</a> |
|
91 | <a href="{% url 'jumper' ref_post.id %}">>>{{ ref_post.id }}</a> | |
91 | {% endfor %} |
|
92 | {% endfor %} | |
92 | </div> |
|
93 | </div> | |
93 | {% endif %} |
|
94 | {% endif %} | |
94 | </div> |
|
95 | </div> | |
95 | {% if thread.thread.get_last_replies.exists %} |
|
96 | {% if thread.thread.get_last_replies.exists %} | |
96 | <div class="last-replies"> |
|
97 | <div class="last-replies"> | |
97 | {% for post in thread.thread.get_last_replies %} |
|
98 | {% for post in thread.thread.get_last_replies %} | |
98 | {% if thread.bumpable %} |
|
99 | {% if thread.bumpable %} | |
99 | <div class="post" id="{{ post.id }}"> |
|
100 | <div class="post" id="{{ post.id }}"> | |
100 | {% else %} |
|
101 | {% else %} | |
101 | <div class="post dead_post" id="{{ post.id }}"> |
|
102 | <div class="post dead_post" id="{{ post.id }}"> | |
102 | {% endif %} |
|
103 | {% endif %} | |
103 | {% if post.image %} |
|
104 | {% if post.image %} | |
104 | <div class="image"> |
|
105 | <div class="image"> | |
105 | <a class="thumb" |
|
106 | <a class="thumb" | |
106 | href="{{ post.image.url }}"><img |
|
107 | href="{{ post.image.url }}"><img | |
107 | src=" {{ post.image.url_200x150 }}" |
|
108 | src=" {{ post.image.url_200x150 }}" | |
108 | alt="{{ post.id }}" |
|
109 | alt="{{ post.id }}" | |
109 | data-width="{{ post.image_width }}" |
|
110 | data-width="{{ post.image_width }}" | |
110 | data-height="{{ post.image_height }}"/> |
|
111 | data-height="{{ post.image_height }}"/> | |
111 | </a> |
|
112 | </a> | |
112 | </div> |
|
113 | </div> | |
113 | {% endif %} |
|
114 | {% endif %} | |
114 | <div class="message"> |
|
115 | <div class="message"> | |
115 | <div class="post-info"> |
|
116 | <div class="post-info"> | |
116 | <span class="title">{{ post.title }}</span> |
|
117 | <span class="title">{{ post.title }}</span> | |
117 | <a class="post_id" href=" |
|
118 | <a class="post_id" href=" | |
118 | {% url 'thread' thread.thread.id %}#{{ post.id }}"> |
|
119 | {% url 'thread' thread.thread.id %}#{{ post.id }}"> | |
119 | (#{{ post.id }})</a> |
|
120 | (#{{ post.id }})</a> | |
120 | [{{ post.pub_time }}] |
|
121 | [{{ post.pub_time }}] | |
121 | </div> |
|
122 | </div> | |
122 | {% autoescape off %} |
|
123 | {% autoescape off %} | |
123 | {{ post.text.rendered|truncatewords_html:50 }} |
|
124 | {{ post.text.rendered|truncatewords_html:50 }} | |
124 | {% endautoescape %} |
|
125 | {% endautoescape %} | |
125 | </div> |
|
126 | </div> | |
126 | {% if post.referenced_posts.all %} |
|
127 | {% if post.referenced_posts.all %} | |
127 | <div class="refmap"> |
|
128 | <div class="refmap"> | |
128 | {% trans "Replies" %}: |
|
129 | {% trans "Replies" %}: | |
129 | {% for ref_post in post.referenced_posts.all %} |
|
130 | {% for ref_post in post.referenced_posts.all %} | |
130 | <a href="{% url 'jumper' ref_post.id %}">>>{{ ref_post.id }}</a> |
|
131 | <a href="{% url 'jumper' ref_post.id %}">>>{{ ref_post.id }}</a> | |
131 | {% endfor %} |
|
132 | {% endfor %} | |
132 | </div> |
|
133 | </div> | |
133 | {% endif %} |
|
134 | {% endif %} | |
134 | </div> |
|
135 | </div> | |
135 | {% endfor %} |
|
136 | {% endfor %} | |
136 | </div> |
|
137 | </div> | |
137 | {% endif %} |
|
138 | {% endif %} | |
138 | </div> |
|
139 | </div> | |
139 | {% endfor %} |
|
140 | {% endfor %} | |
140 | {% else %} |
|
141 | {% else %} | |
141 | <div class="post"> |
|
142 | <div class="post"> | |
142 | {% trans 'No threads exist. Create the first one!' %}</div> |
|
143 | {% trans 'No threads exist. Create the first one!' %}</div> | |
143 | {% endif %} |
|
144 | {% endif %} | |
144 |
|
145 | |||
145 | <form enctype="multipart/form-data" method="post">{% csrf_token %} |
|
146 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
146 | <div class="post-form-w"> |
|
147 | <div class="post-form-w"> | |
147 |
|
148 | |||
148 | <div class="form-title">{% trans "Create new thread" %}</div> |
|
149 | <div class="form-title">{% trans "Create new thread" %}</div> | |
149 | <div class="post-form"> |
|
150 | <div class="post-form"> | |
150 | <div class="form-row"> |
|
151 | <div class="form-row"> | |
151 | <div class="form-label">{% trans 'Title' %}</div> |
|
152 | <div class="form-label">{% trans 'Title' %}</div> | |
152 | <div class="form-input">{{ form.title }}</div> |
|
153 | <div class="form-input">{{ form.title }}</div> | |
153 | <div class="form-errors">{{ form.title.errors }}</div> |
|
154 | <div class="form-errors">{{ form.title.errors }}</div> | |
154 | </div> |
|
155 | </div> | |
155 | <div class="form-row"> |
|
156 | <div class="form-row"> | |
156 | <div class="form-label">{% trans 'Formatting' %}</div> |
|
157 | <div class="form-label">{% trans 'Formatting' %}</div> | |
157 | <div class="form-input" id="mark_panel"> |
|
158 | <div class="form-input" id="mark_panel"> | |
158 | <span class="mark_btn" id="quote"><span class="quote">>{% trans 'quote' %}</span></span> |
|
159 | <span class="mark_btn" id="quote"><span class="quote">>{% trans 'quote' %}</span></span> | |
159 | <span class="mark_btn" id="italic"><i>{% trans 'italic' %}</i></span> |
|
160 | <span class="mark_btn" id="italic"><i>{% trans 'italic' %}</i></span> | |
160 | <span class="mark_btn" id="bold"><b>{% trans 'bold' %}</b></span> |
|
161 | <span class="mark_btn" id="bold"><b>{% trans 'bold' %}</b></span> | |
161 | <span class="mark_btn" id="spoiler"><span class="spoiler">{% trans 'spoiler' %}</span></span> |
|
162 | <span class="mark_btn" id="spoiler"><span class="spoiler">{% trans 'spoiler' %}</span></span> | |
162 | <span class="mark_btn" id="comment"><span class="comment">// {% trans 'comment' %}</span></span> |
|
163 | <span class="mark_btn" id="comment"><span class="comment">// {% trans 'comment' %}</span></span> | |
163 | </div> |
|
164 | </div> | |
164 | </div> |
|
165 | </div> | |
165 | <div class="form-row"> |
|
166 | <div class="form-row"> | |
166 | <div class="form-label">{% trans 'Text' %}</div> |
|
167 | <div class="form-label">{% trans 'Text' %}</div> | |
167 | <div class="form-input">{{ form.text }}</div> |
|
168 | <div class="form-input">{{ form.text }}</div> | |
168 | <div class="form-errors">{{ form.text.errors }}</div> |
|
169 | <div class="form-errors">{{ form.text.errors }}</div> | |
169 | </div> |
|
170 | </div> | |
170 | <div class="form-row"> |
|
171 | <div class="form-row"> | |
171 | <div class="form-label">{% trans 'Image' %}</div> |
|
172 | <div class="form-label">{% trans 'Image' %}</div> | |
172 | <div class="form-input">{{ form.image }}</div> |
|
173 | <div class="form-input">{{ form.image }}</div> | |
173 | <div class="form-errors">{{ form.image.errors }}</div> |
|
174 | <div class="form-errors">{{ form.image.errors }}</div> | |
174 | </div> |
|
175 | </div> | |
175 | <div class="form-row"> |
|
176 | <div class="form-row"> | |
176 | <div class="form-label">{% trans 'Tags' %}</div> |
|
177 | <div class="form-label">{% trans 'Tags' %}</div> | |
177 | <div class="form-input">{{ form.tags }}</div> |
|
178 | <div class="form-input">{{ form.tags }}</div> | |
178 | <div class="form-errors">{{ form.tags.errors }}</div> |
|
179 | <div class="form-errors">{{ form.tags.errors }}</div> | |
179 | </div> |
|
180 | </div> | |
180 | <div class="form-row form-email"> |
|
181 | <div class="form-row form-email"> | |
181 | <div class="form-label">{% trans 'e-mail' %}</div> |
|
182 | <div class="form-label">{% trans 'e-mail' %}</div> | |
182 | <div class="form-input">{{ form.email }}</div> |
|
183 | <div class="form-input">{{ form.email }}</div> | |
183 | <div class="form-errors">{{ form.email.errors }}</div> |
|
184 | <div class="form-errors">{{ form.email.errors }}</div> | |
184 | </div> |
|
185 | </div> | |
185 | <div class="form-row"> |
|
186 | <div class="form-row"> | |
186 | {{ form.captcha }} |
|
187 | {{ form.captcha }} | |
187 | <div class="form-errors">{{ form.captcha.errors }}</div> |
|
188 | <div class="form-errors">{{ form.captcha.errors }}</div> | |
188 | </div> |
|
189 | </div> | |
189 | <div class="form-row"> |
|
190 | <div class="form-row"> | |
190 | <div class="form-errors">{{ form.other.errors }}</div> |
|
191 | <div class="form-errors">{{ form.other.errors }}</div> | |
191 | </div> |
|
192 | </div> | |
192 | </div> |
|
193 | </div> | |
193 | <div class="form-submit"> |
|
194 | <div class="form-submit"> | |
194 | <input type="submit" value="{% trans "Post" %}"/></div> |
|
195 | <input type="submit" value="{% trans "Post" %}"/></div> | |
195 | <div> |
|
196 | <div> | |
196 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} |
|
197 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} | |
197 | </div> |
|
198 | </div> | |
198 | <div><a href="{% url "staticpage" name="help" %}"> |
|
199 | <div><a href="{% url "staticpage" name="help" %}"> | |
199 | {% trans 'Text syntax' %}</a></div> |
|
200 | {% trans 'Text syntax' %}</a></div> | |
200 | </div> |
|
201 | </div> | |
201 | </form> |
|
202 | </form> | |
202 |
|
203 | |||
203 | {% endblock %} |
|
204 | {% endblock %} | |
204 |
|
205 | |||
205 | {% block metapanel %} |
|
206 | {% block metapanel %} | |
206 |
|
207 | |||
207 | <span class="metapanel"> |
|
208 | <span class="metapanel"> | |
208 | <b><a href="{% url "authors" %}">Neboard</a> 1.3</b> |
|
209 | <b><a href="{% url "authors" %}">Neboard</a> 1.3</b> | |
209 | {% trans "Pages:" %} |
|
210 | {% trans "Pages:" %} | |
210 | {% for page in pages %} |
|
211 | {% for page in pages %} | |
211 | [<a href=" |
|
212 | [<a href=" | |
212 | {% if tag %} |
|
213 | {% if tag %} | |
213 | {% url "tag" tag_name=tag page=page %} |
|
214 | {% url "tag" tag_name=tag page=page %} | |
214 | {% else %} |
|
215 | {% else %} | |
215 | {% url "index" page=page %} |
|
216 | {% url "index" page=page %} | |
216 | {% endif %} |
|
217 | {% endif %} | |
217 | ">{{ page }}</a>] |
|
218 | ">{{ page }}</a>] | |
218 | {% endfor %} |
|
219 | {% endfor %} | |
219 | [<a href="rss/">RSS</a>] |
|
220 | [<a href="rss/">RSS</a>] | |
220 | </span> |
|
221 | </span> | |
221 |
|
222 | |||
222 | {% endblock %} |
|
223 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now