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