Show More
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -7,7 +7,7 b' msgid ""' | |||||
7 | msgstr "" |
|
7 | msgstr "" | |
8 | "Project-Id-Version: PACKAGE VERSION\n" |
|
8 | "Project-Id-Version: PACKAGE VERSION\n" | |
9 | "Report-Msgid-Bugs-To: \n" |
|
9 | "Report-Msgid-Bugs-To: \n" | |
10 |
"POT-Creation-Date: 2013-09-09 21: |
|
10 | "POT-Creation-Date: 2013-09-09 21:52+0300\n" | |
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
|
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
|
12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
13 | "Language-Team: LANGUAGE <LL@li.org>\n" |
|
13 | "Language-Team: LANGUAGE <LL@li.org>\n" | |
@@ -89,21 +89,21 b' msgstr "\xd0\x98\xd0\xb7\xd0\xbe\xd0\xb1\xd1\x80\xd0\xb0\xd0\xb6\xd0\xb5\xd0\xbd\xd0\xb8\xd0\xb5 \xd1\x81\xd0\xbe\xd0\xbe\xd0\xb1\xd1\x89\xd0\xb5\xd0\xbd\xd0\xb8\xd1\x8f"' | |||||
89 | msgid "Reply" |
|
89 | msgid "Reply" | |
90 | msgstr "Ответ" |
|
90 | msgstr "Ответ" | |
91 |
|
91 | |||
92 |
#: templates/boards/posting_general.html:54 templates/boards/thread.html:4 |
|
92 | #: templates/boards/posting_general.html:54 templates/boards/thread.html:45 | |
93 | msgid "Delete" |
|
93 | msgid "Delete" | |
94 | msgstr "Удалить" |
|
94 | msgstr "Удалить" | |
95 |
|
95 | |||
96 |
#: templates/boards/posting_general.html:63 templates/boards/thread.html:1 |
|
96 | #: templates/boards/posting_general.html:63 templates/boards/thread.html:112 | |
97 | msgid "replies" |
|
97 | msgid "replies" | |
98 | msgstr "ответов" |
|
98 | msgstr "ответов" | |
99 |
|
99 | |||
100 |
#: templates/boards/posting_general.html:64 templates/boards/thread.html:1 |
|
100 | #: templates/boards/posting_general.html:64 templates/boards/thread.html:113 | |
101 | msgid "images" |
|
101 | msgid "images" | |
102 | msgstr "изображений" |
|
102 | msgstr "изображений" | |
103 |
|
103 | |||
104 | #: templates/boards/posting_general.html:66 |
|
104 | #: templates/boards/posting_general.html:66 | |
105 | #: templates/boards/posting_general.html:139 templates/boards/tags.html:7 |
|
105 | #: templates/boards/posting_general.html:139 templates/boards/tags.html:7 | |
106 |
#: templates/boards/thread.html:5 |
|
106 | #: templates/boards/thread.html:58 templates/boards/rss/post.html:10 | |
107 | msgid "Tags" |
|
107 | msgid "Tags" | |
108 | msgstr "Теги" |
|
108 | msgstr "Теги" | |
109 |
|
109 | |||
@@ -115,32 +115,32 b' msgstr "\xd0\x9d\xd0\xb5\xd1\x82 \xd1\x82\xd0\xb5\xd0\xbc. \xd0\xa1\xd0\xbe\xd0\xb7\xd0\xb4\xd0\xb0\xd0\xb9\xd1\x82\xd0\xb5 \xd0\xbf\xd0\xb5\xd1\x80\xd0\xb2\xd1\x83\xd1\x8e!"' | |||||
115 | msgid "Create new thread" |
|
115 | msgid "Create new thread" | |
116 | msgstr "Создать новую тему" |
|
116 | msgstr "Создать новую тему" | |
117 |
|
117 | |||
118 |
#: templates/boards/posting_general.html:124 templates/boards/thread.html:7 |
|
118 | #: templates/boards/posting_general.html:124 templates/boards/thread.html:77 | |
119 | msgid "Title" |
|
119 | msgid "Title" | |
120 | msgstr "Заголовок" |
|
120 | msgstr "Заголовок" | |
121 |
|
121 | |||
122 |
#: templates/boards/posting_general.html:129 templates/boards/thread.html:8 |
|
122 | #: templates/boards/posting_general.html:129 templates/boards/thread.html:82 | |
123 | msgid "Text" |
|
123 | msgid "Text" | |
124 | msgstr "Текст" |
|
124 | msgstr "Текст" | |
125 |
|
125 | |||
126 |
#: templates/boards/posting_general.html:134 templates/boards/thread.html:8 |
|
126 | #: templates/boards/posting_general.html:134 templates/boards/thread.html:87 | |
127 | msgid "Image" |
|
127 | msgid "Image" | |
128 | msgstr "Изображение" |
|
128 | msgstr "Изображение" | |
129 |
|
129 | |||
130 |
#: templates/boards/posting_general.html:1 |
|
130 | #: templates/boards/posting_general.html:152 templates/boards/thread.html:101 | |
131 | msgid "Post" |
|
131 | msgid "Post" | |
132 | msgstr "Отправить" |
|
132 | msgstr "Отправить" | |
133 |
|
133 | |||
134 |
#: templates/boards/posting_general.html:15 |
|
134 | #: templates/boards/posting_general.html:154 | |
135 | msgid "Tags must be delimited by spaces. Text or image is required." |
|
135 | msgid "Tags must be delimited by spaces. Text or image is required." | |
136 | msgstr "" |
|
136 | msgstr "" | |
137 | "Теги должны быть разделены пробелами. Текст или изображение обязательны." |
|
137 | "Теги должны быть разделены пробелами. Текст или изображение обязательны." | |
138 |
|
138 | |||
139 |
#: templates/boards/posting_general.html:15 |
|
139 | #: templates/boards/posting_general.html:157 templates/boards/thread.html:103 | |
140 | msgid "Text syntax" |
|
140 | msgid "Text syntax" | |
141 | msgstr "Синтаксис текста" |
|
141 | msgstr "Синтаксис текста" | |
142 |
|
142 | |||
143 |
#: templates/boards/posting_general.html:16 |
|
143 | #: templates/boards/posting_general.html:167 | |
144 | msgid "Pages:" |
|
144 | msgid "Pages:" | |
145 | msgstr "Страницы: " |
|
145 | msgstr "Страницы: " | |
146 |
|
146 | |||
@@ -176,16 +176,19 b' msgstr "\xd0\x94\xd0\xbe\xd0\xb1\xd0\xb0\xd0\xb2\xd0\xb8\xd1\x82\xd1\x8c"' | |||||
176 | msgid "No tags found." |
|
176 | msgid "No tags found." | |
177 | msgstr "Теги не найдены." |
|
177 | msgstr "Теги не найдены." | |
178 |
|
178 | |||
179 |
#: templates/boards/thread.html: |
|
179 | #: templates/boards/thread.html:48 | |
|
180 | msgid "Ban IP" | |||
|
181 | msgstr "Заблокировать IP" | |||
|
182 | ||||
|
183 | #: templates/boards/thread.html:74 | |||
180 | msgid "Reply to thread" |
|
184 | msgid "Reply to thread" | |
181 | msgstr "Ответить в тему" |
|
185 | msgstr "Ответить в тему" | |
182 |
|
186 | |||
183 |
#: templates/boards/thread.html:1 |
|
187 | #: templates/boards/thread.html:114 | |
184 | msgid "Last update: " |
|
188 | msgid "Last update: " | |
185 | msgstr "Последнее обновление: " |
|
189 | msgstr "Последнее обновление: " | |
186 |
|
190 | |||
187 | #: templates/boards/staticpages/banned.html:6 |
|
191 | #: templates/boards/staticpages/banned.html:6 | |
188 | #: templates/boards/staticpages/help.html:6 |
|
|||
189 | msgid "Banned" |
|
192 | msgid "Banned" | |
190 | msgstr "Заблокирован" |
|
193 | msgstr "Заблокирован" | |
191 |
|
194 | |||
@@ -193,6 +196,7 b' msgstr "\xd0\x97\xd0\xb0\xd0\xb1\xd0\xbb\xd0\xbe\xd0\xba\xd0\xb8\xd1\x80\xd0\xbe\xd0\xb2\xd0\xb0\xd0\xbd"' | |||||
193 | msgid "Your IP address has been banned. Contact the administrator" |
|
196 | msgid "Your IP address has been banned. Contact the administrator" | |
194 | msgstr "Ваш IP адрес был заблокирован. Свяжитесь с администратором" |
|
197 | msgstr "Ваш IP адрес был заблокирован. Свяжитесь с администратором" | |
195 |
|
198 | |||
|
199 | #: templates/boards/staticpages/help.html:6 | |||
196 | #: templates/boards/staticpages/help.html:10 |
|
200 | #: templates/boards/staticpages/help.html:10 | |
197 | msgid "Syntax" |
|
201 | msgid "Syntax" | |
198 | msgstr "Синтаксис" |
|
202 | msgstr "Синтаксис" |
@@ -312,7 +312,7 b' class User(models.Model):' | |||||
312 | return self.fav_tags.order_by('name') |
|
312 | return self.fav_tags.order_by('name') | |
313 |
|
313 | |||
314 | def __unicode__(self): |
|
314 | def __unicode__(self): | |
315 | return self.user_id + '(' + self.rank + ')' |
|
315 | return self.user_id + '(' + str(self.rank) + ')' | |
316 |
|
316 | |||
317 |
|
317 | |||
318 | class Setting(models.Model): |
|
318 | class Setting(models.Model): |
@@ -41,9 +41,11 b'' | |||||
41 |
|
41 | |||
42 | {% if user.is_moderator %} |
|
42 | {% if user.is_moderator %} | |
43 | <span class="moderator_info"> |
|
43 | <span class="moderator_info"> | |
44 | ({{ post.poster_ip }}) |
|
|||
45 | [<a href="{% url 'delete' post_id=post.id %}" |
|
44 | [<a href="{% url 'delete' post_id=post.id %}" | |
46 | >{% trans 'Delete' %}</a>] |
|
45 | >{% trans 'Delete' %}</a>] | |
|
46 | ({{ post.poster_ip }}) | |||
|
47 | [<a href="{% url 'ban' post_id=post.id %}?next={{ request.path }}" | |||
|
48 | >{% trans 'Ban IP' %}</a>] | |||
47 | </span> |
|
49 | </span> | |
48 | {% endif %} |
|
50 | {% endif %} | |
49 | </div> |
|
51 | </div> |
@@ -37,6 +37,8 b" urlpatterns = patterns(''," | |||||
37 | url(r'^jump/(?P<post_id>\w+)/$', views.jump_to_post, name='jumper'), |
|
37 | url(r'^jump/(?P<post_id>\w+)/$', views.jump_to_post, name='jumper'), | |
38 | url(r'^authors/$', views.authors, name='authors'), |
|
38 | url(r'^authors/$', views.authors, name='authors'), | |
39 | url(r'^delete/(?P<post_id>\w+)/$', views.delete, name='delete'), |
|
39 | url(r'^delete/(?P<post_id>\w+)/$', views.delete, name='delete'), | |
|
40 | url(r'^ban/(?P<post_id>\w+)/$', views.ban, name='ban'), | |||
|
41 | ||||
40 | url(r'^banned/$', views.you_are_banned, name='banned'), |
|
42 | url(r'^banned/$', views.you_are_banned, name='banned'), | |
41 | url(r'^staticpage/(?P<name>\w+)/$', views.static_page, name='staticpage'), |
|
43 | url(r'^staticpage/(?P<name>\w+)/$', views.static_page, name='staticpage'), | |
42 |
|
44 |
@@ -238,6 +238,17 b' def delete(request, post_id):' | |||||
238 | return redirect(thread, post_id=post.parent) |
|
238 | return redirect(thread, post_id=post.parent) | |
239 |
|
239 | |||
240 |
|
240 | |||
|
241 | def ban(request, post_id): | |||
|
242 | user = _get_user(request) | |||
|
243 | post = get_object_or_404(Post, id=post_id) | |||
|
244 | ||||
|
245 | if user.is_moderator(): | |||
|
246 | # TODO Show confirmation page before ban | |||
|
247 | Ban.objects.get_or_create(ip=post.poster_ip) | |||
|
248 | ||||
|
249 | return _redirect_to_next(request) | |||
|
250 | ||||
|
251 | ||||
241 | def you_are_banned(request): |
|
252 | def you_are_banned(request): | |
242 | context = _init_default_context(request) |
|
253 | context = _init_default_context(request) | |
243 | return render(request, 'boards/staticpages/banned.html', context) |
|
254 | return render(request, 'boards/staticpages/banned.html', context) | |
@@ -333,5 +344,8 b' def _get_user(request):' | |||||
333 |
|
344 | |||
334 |
|
345 | |||
335 | def _redirect_to_next(request): |
|
346 | def _redirect_to_next(request): | |
336 |
|
|
347 | if 'next' in request.GET: | |
337 | return HttpResponseRedirect(next_page) |
|
348 | next_page = request.GET['next'] | |
|
349 | return HttpResponseRedirect(next_page) | |||
|
350 | else: | |||
|
351 | return redirect(index) |
General Comments 0
You need to be logged in to leave comments.
Login now