Show More
@@ -1,193 +1,191 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>{% trans 'Tag: ' %}{{ tag.name }} |
|
19 | <h2>{% trans 'Tag: ' %}{{ tag.name }} | |
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 | </h2> |
|
27 | </h2> | |
28 | </div> |
|
28 | </div> | |
29 | {% endif %} |
|
29 | {% endif %} | |
30 |
|
30 | |||
31 | {% if threads %} |
|
31 | {% if threads %} | |
32 | {% cache 600 thread_cache threads.0.thread.last_edit_time moderator %} |
|
|||
33 | {% for thread in threads %} |
|
32 | {% for thread in threads %} | |
34 | <div class="thread"> |
|
33 | <div class="thread"> | |
35 | {% if thread.bumpable %} |
|
34 | {% if thread.bumpable %} | |
36 | <div class="post" id="{{ thread.thread.id }}"> |
|
35 | <div class="post" id="{{ thread.thread.id }}"> | |
37 | {% else %} |
|
36 | {% else %} | |
38 | <div class="post dead_post" id="{{ thread.thread.id }}"> |
|
37 | <div class="post dead_post" id="{{ thread.thread.id }}"> | |
39 | {% endif %} |
|
38 | {% endif %} | |
40 | {% if thread.thread.image %} |
|
39 | {% if thread.thread.image %} | |
41 | <div class="image"> |
|
40 | <div class="image"> | |
42 | <a class="fancy" |
|
41 | <a class="fancy" | |
43 | href="{{ thread.thread.image.url }}"><img |
|
42 | href="{{ thread.thread.image.url }}"><img | |
44 | src="{{ thread.thread.image.url_200x150 }}" |
|
43 | src="{{ thread.thread.image.url_200x150 }}" | |
45 | alt="{% trans 'Post image' %}" |
|
44 | alt="{% trans 'Post image' %}" | |
46 | data-width="{{ thread.thread.image_width }}" |
|
45 | data-width="{{ thread.thread.image_width }}" | |
47 | data-height="{{ thread.thread.image_height }}" /> |
|
46 | data-height="{{ thread.thread.image_height }}" /> | |
48 | </a> |
|
47 | </a> | |
49 | </div> |
|
48 | </div> | |
50 | {% endif %} |
|
49 | {% endif %} | |
51 | <div class="message"> |
|
50 | <div class="message"> | |
52 | <div class="post-info"> |
|
51 | <div class="post-info"> | |
53 | <span class="title">{{ thread.thread.title }}</span> |
|
52 | <span class="title">{{ thread.thread.title }}</span> | |
54 | <a class="post_id" href="{% url 'thread' thread.thread.id %}" |
|
53 | <a class="post_id" href="{% url 'thread' thread.thread.id %}" | |
55 | >(#{{ thread.thread.id }})</a> |
|
54 | >(#{{ thread.thread.id }})</a> | |
56 | [{{ thread.thread.pub_time }}] |
|
55 | [{{ thread.thread.pub_time }}] | |
57 | [<a class="link" href="{% url 'thread' thread.thread.id %}#form" |
|
56 | [<a class="link" href="{% url 'thread' thread.thread.id %}#form" | |
58 | >{% trans "Reply" %}</a>] |
|
57 | >{% trans "Reply" %}</a>] | |
59 |
|
58 | |||
60 | {% if moderator %} |
|
59 | {% if moderator %} | |
61 | <span class="moderator_info"> |
|
60 | <span class="moderator_info"> | |
62 | [<a href="{% url 'delete' post_id=thread.thread.id %}?next={{ request.path }}" |
|
61 | [<a href="{% url 'delete' post_id=thread.thread.id %}?next={{ request.path }}" | |
63 | >{% trans 'Delete' %}</a>] |
|
62 | >{% trans 'Delete' %}</a>] | |
64 | ({{ thread.thread.poster_ip }}) |
|
63 | ({{ thread.thread.poster_ip }}) | |
65 | [<a href="{% url 'ban' post_id=thread.thread.id %}?next={{ request.path }}" |
|
64 | [<a href="{% url 'ban' post_id=thread.thread.id %}?next={{ request.path }}" | |
66 | >{% trans 'Ban IP' %}</a>] |
|
65 | >{% trans 'Ban IP' %}</a>] | |
67 | </span> |
|
66 | </span> | |
68 | {% endif %} |
|
67 | {% endif %} | |
69 | </div> |
|
68 | </div> | |
70 | {% autoescape off %} |
|
69 | {% autoescape off %} | |
71 | {{ thread.thread.text.rendered|truncatewords_html:50 }} |
|
70 | {{ thread.thread.text.rendered|truncatewords_html:50 }} | |
72 | {% endautoescape %} |
|
71 | {% endautoescape %} | |
73 | </div> |
|
72 | </div> | |
74 | <div class="metadata"> |
|
73 | <div class="metadata"> | |
75 | {{ thread.thread.get_reply_count }} {% trans 'replies' %}, |
|
74 | {{ thread.thread.get_reply_count }} {% trans 'replies' %}, | |
76 | {{ thread.thread.get_images_count }} {% trans 'images' %}. |
|
75 | {{ thread.thread.get_images_count }} {% trans 'images' %}. | |
77 | {% if thread.thread.tags %} |
|
76 | {% if thread.thread.tags %} | |
78 | <span class="tags">{% trans 'Tags' %}: |
|
77 | <span class="tags">{% trans 'Tags' %}: | |
79 | {% for tag in thread.thread.tags.all %} |
|
78 | {% for tag in thread.thread.tags.all %} | |
80 | <a class="tag" href=" |
|
79 | <a class="tag" href=" | |
81 | {% url 'tag' tag_name=tag.name %}"> |
|
80 | {% url 'tag' tag_name=tag.name %}"> | |
82 | {{ tag.name }}</a> |
|
81 | {{ tag.name }}</a> | |
83 | {% endfor %} |
|
82 | {% endfor %} | |
84 | </span> |
|
83 | </span> | |
85 | {% endif %} |
|
84 | {% endif %} | |
86 | </div> |
|
85 | </div> | |
87 | </div> |
|
86 | </div> | |
88 | {% if thread.thread.get_last_replies.exists %} |
|
87 | {% if thread.thread.get_last_replies.exists %} | |
89 | <div class="last-replies"> |
|
88 | <div class="last-replies"> | |
90 | {% for post in thread.thread.get_last_replies %} |
|
89 | {% for post in thread.thread.get_last_replies %} | |
91 | {% if thread.bumpable %} |
|
90 | {% if thread.bumpable %} | |
92 | <div class="post" id="{{ post.id }}"> |
|
91 | <div class="post" id="{{ post.id }}"> | |
93 | {% else %} |
|
92 | {% else %} | |
94 | <div class="post dead_post" id="{{ post.id }}"> |
|
93 | <div class="post dead_post" id="{{ post.id }}"> | |
95 | {% endif %} |
|
94 | {% endif %} | |
96 | {% if post.image %} |
|
95 | {% if post.image %} | |
97 | <div class="image"> |
|
96 | <div class="image"> | |
98 | <a class="fancy" |
|
97 | <a class="fancy" | |
99 | href="{{ post.image.url }}"><img |
|
98 | href="{{ post.image.url }}"><img | |
100 | src=" {{ post.image.url_200x150 }}" |
|
99 | src=" {{ post.image.url_200x150 }}" | |
101 | alt="{% trans 'Post image' %}" |
|
100 | alt="{% trans 'Post image' %}" | |
102 | data-width="{{ post.image_width }}" |
|
101 | data-width="{{ post.image_width }}" | |
103 | data-height="{{ post.image_height }}"/> |
|
102 | data-height="{{ post.image_height }}"/> | |
104 | </a> |
|
103 | </a> | |
105 | </div> |
|
104 | </div> | |
106 | {% endif %} |
|
105 | {% endif %} | |
107 | <div class="message"> |
|
106 | <div class="message"> | |
108 | <div class="post-info"> |
|
107 | <div class="post-info"> | |
109 | <span class="title">{{ post.title }}</span> |
|
108 | <span class="title">{{ post.title }}</span> | |
110 | <a class="post_id" href=" |
|
109 | <a class="post_id" href=" | |
111 | {% url 'thread' thread.thread.id %}#{{ post.id }}"> |
|
110 | {% url 'thread' thread.thread.id %}#{{ post.id }}"> | |
112 | (#{{ post.id }})</a> |
|
111 | (#{{ post.id }})</a> | |
113 | [{{ post.pub_time }}] |
|
112 | [{{ post.pub_time }}] | |
114 | </div> |
|
113 | </div> | |
115 | {% autoescape off %} |
|
114 | {% autoescape off %} | |
116 | {{ post.text.rendered|truncatewords_html:50 }} |
|
115 | {{ post.text.rendered|truncatewords_html:50 }} | |
117 | {% endautoescape %} |
|
116 | {% endautoescape %} | |
118 | </div> |
|
117 | </div> | |
119 | </div> |
|
118 | </div> | |
120 | {% endfor %} |
|
119 | {% endfor %} | |
121 | </div> |
|
120 | </div> | |
122 | {% endif %} |
|
121 | {% endif %} | |
123 | </div> |
|
122 | </div> | |
124 | {% endfor %} |
|
123 | {% endfor %} | |
125 | {% endcache %} |
|
|||
126 | {% else %} |
|
124 | {% else %} | |
127 | <div class="post"> |
|
125 | <div class="post"> | |
128 | {% trans 'No threads exist. Create the first one!' %}</div> |
|
126 | {% trans 'No threads exist. Create the first one!' %}</div> | |
129 | {% endif %} |
|
127 | {% endif %} | |
130 |
|
128 | |||
131 | <form enctype="multipart/form-data" method="post">{% csrf_token %} |
|
129 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
132 | <div class="post-form-w"> |
|
130 | <div class="post-form-w"> | |
133 |
|
131 | |||
134 | <div class="form-title">{% trans "Create new thread" %}</div> |
|
132 | <div class="form-title">{% trans "Create new thread" %}</div> | |
135 | <div class="post-form"> |
|
133 | <div class="post-form"> | |
136 | <div class="form-row"> |
|
134 | <div class="form-row"> | |
137 | <div class="form-label">{% trans 'Title' %}</div> |
|
135 | <div class="form-label">{% trans 'Title' %}</div> | |
138 | <div class="form-input">{{ form.title }}</div> |
|
136 | <div class="form-input">{{ form.title }}</div> | |
139 | <div class="form-errors">{{ form.title.errors }}</div> |
|
137 | <div class="form-errors">{{ form.title.errors }}</div> | |
140 | </div> |
|
138 | </div> | |
141 | <div class="form-row"> |
|
139 | <div class="form-row"> | |
142 | <div class="form-label">{% trans 'Text' %}</div> |
|
140 | <div class="form-label">{% trans 'Text' %}</div> | |
143 | <div class="form-input">{{ form.text }}</div> |
|
141 | <div class="form-input">{{ form.text }}</div> | |
144 | <div class="form-errors">{{ form.text.errors }}</div> |
|
142 | <div class="form-errors">{{ form.text.errors }}</div> | |
145 | </div> |
|
143 | </div> | |
146 | <div class="form-row"> |
|
144 | <div class="form-row"> | |
147 | <div class="form-label">{% trans 'Image' %}</div> |
|
145 | <div class="form-label">{% trans 'Image' %}</div> | |
148 | <div class="form-input">{{ form.image }}</div> |
|
146 | <div class="form-input">{{ form.image }}</div> | |
149 | <div class="form-errors">{{ form.image.errors }}</div> |
|
147 | <div class="form-errors">{{ form.image.errors }}</div> | |
150 | </div> |
|
148 | </div> | |
151 | <div class="form-row"> |
|
149 | <div class="form-row"> | |
152 | <div class="form-label">{% trans 'Tags' %}</div> |
|
150 | <div class="form-label">{% trans 'Tags' %}</div> | |
153 | <div class="form-input">{{ form.tags }}</div> |
|
151 | <div class="form-input">{{ form.tags }}</div> | |
154 | <div class="form-errors">{{ form.tags.errors }}</div> |
|
152 | <div class="form-errors">{{ form.tags.errors }}</div> | |
155 | </div> |
|
153 | </div> | |
156 | <div class="form-row"> |
|
154 | <div class="form-row"> | |
157 | {{ form.captcha }} |
|
155 | {{ form.captcha }} | |
158 | <div class="form-errors">{{ form.captcha.errors }}</div> |
|
156 | <div class="form-errors">{{ form.captcha.errors }}</div> | |
159 | </div> |
|
157 | </div> | |
160 | <div class="form-row"> |
|
158 | <div class="form-row"> | |
161 | <div class="form-errors">{{ form.other.errors }}</div> |
|
159 | <div class="form-errors">{{ form.other.errors }}</div> | |
162 | </div> |
|
160 | </div> | |
163 | </div> |
|
161 | </div> | |
164 | <div class="form-submit"> |
|
162 | <div class="form-submit"> | |
165 | <input type="submit" value="{% trans "Post" %}"/></div> |
|
163 | <input type="submit" value="{% trans "Post" %}"/></div> | |
166 | <div> |
|
164 | <div> | |
167 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} |
|
165 | {% trans 'Tags must be delimited by spaces. Text or image is required.' %} | |
168 | </div> |
|
166 | </div> | |
169 | <div><a href="{% url "staticpage" name="help" %}"> |
|
167 | <div><a href="{% url "staticpage" name="help" %}"> | |
170 | {% trans 'Text syntax' %}</a></div> |
|
168 | {% trans 'Text syntax' %}</a></div> | |
171 | </div> |
|
169 | </div> | |
172 | </form> |
|
170 | </form> | |
173 |
|
171 | |||
174 | {% endblock %} |
|
172 | {% endblock %} | |
175 |
|
173 | |||
176 | {% block metapanel %} |
|
174 | {% block metapanel %} | |
177 |
|
175 | |||
178 | <span class="metapanel"> |
|
176 | <span class="metapanel"> | |
179 | <b><a href="{% url "authors" %}">Neboard</a> 1.1</b> |
|
177 | <b><a href="{% url "authors" %}">Neboard</a> 1.1</b> | |
180 | {% trans "Pages:" %} |
|
178 | {% trans "Pages:" %} | |
181 | {% for page in pages %} |
|
179 | {% for page in pages %} | |
182 | [<a href=" |
|
180 | [<a href=" | |
183 | {% if tag %} |
|
181 | {% if tag %} | |
184 | {% url "tag" tag_name=tag page=page %} |
|
182 | {% url "tag" tag_name=tag page=page %} | |
185 | {% else %} |
|
183 | {% else %} | |
186 | {% url "index" page=page %} |
|
184 | {% url "index" page=page %} | |
187 | {% endif %} |
|
185 | {% endif %} | |
188 | ">{{ page }}</a>] |
|
186 | ">{{ page }}</a>] | |
189 | {% endfor %} |
|
187 | {% endfor %} | |
190 | [<a href="rss/">RSS</a>] |
|
188 | [<a href="rss/">RSS</a>] | |
191 | </span> |
|
189 | </span> | |
192 |
|
190 | |||
193 | {% endblock %} |
|
191 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now