##// END OF EJS Templates
Fixed hidden tags list in the settings
neko259 -
r733:f6ed285e 2.0-dev
parent child Browse files
Show More
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -1,368 +1,372 b''
1 # SOME DESCRIPTIVE TITLE.
1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
2 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 # This file is distributed under the same license as the PACKAGE package.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
5 #
6 msgid ""
6 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: 2014-07-05 18:10+0300\n"
10 "POT-Creation-Date: 2014-07-05 20:42+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"
14 "Language: ru\n"
14 "Language: ru\n"
15 "MIME-Version: 1.0\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
18 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
19 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
19 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
20
20
21 #: authors.py:9
21 #: authors.py:9
22 msgid "author"
22 msgid "author"
23 msgstr "автор"
23 msgstr "автор"
24
24
25 #: authors.py:10
25 #: authors.py:10
26 msgid "developer"
26 msgid "developer"
27 msgstr "разработчик"
27 msgstr "разработчик"
28
28
29 #: authors.py:11
29 #: authors.py:11
30 msgid "javascript developer"
30 msgid "javascript developer"
31 msgstr "разработчик javascript"
31 msgstr "разработчик javascript"
32
32
33 #: authors.py:12
33 #: authors.py:12
34 msgid "designer"
34 msgid "designer"
35 msgstr "дизайнер"
35 msgstr "дизайнер"
36
36
37 #: forms.py:23
37 #: forms.py:23
38 msgid ""
38 msgid ""
39 "Type message here. You can reply to message >>123 like\n"
39 "Type message here. You can reply to message >>123 like\n"
40 " this. 2 new lines are required to start new paragraph."
40 " this. 2 new lines are required to start new paragraph."
41 msgstr ""
41 msgstr ""
42 "Введите сообщение здесь. Вы можете ответить на сообщение >>123 вот так. 2 "
42 "Введите сообщение здесь. Вы можете ответить на сообщение >>123 вот так. 2 "
43 "переноса строки обязательны для создания нового абзаца."
43 "переноса строки обязательны для создания нового абзаца."
44
44
45 #: forms.py:25
45 #: forms.py:25
46 msgid "tag1 several_words_tag"
46 msgid "tag1 several_words_tag"
47 msgstr "тег1 тег_из_нескольких_слов"
47 msgstr "тег1 тег_из_нескольких_слов"
48
48
49 #: forms.py:27
49 #: forms.py:27
50 msgid "Such image was already posted"
50 msgid "Such image was already posted"
51 msgstr "Такое изображение уже было загружено"
51 msgstr "Такое изображение уже было загружено"
52
52
53 #: forms.py:29
53 #: forms.py:29
54 msgid "Title"
54 msgid "Title"
55 msgstr "Заголовок"
55 msgstr "Заголовок"
56
56
57 #: forms.py:30
57 #: forms.py:30
58 msgid "Text"
58 msgid "Text"
59 msgstr "Текст"
59 msgstr "Текст"
60
60
61 #: forms.py:31
61 #: forms.py:31
62 msgid "Tag"
62 msgid "Tag"
63 msgstr "Тег"
63 msgstr "Тег"
64
64
65 #: forms.py:32 templates/boards/base.html:54 templates/search/search.html:9
65 #: forms.py:32 templates/boards/base.html:54 templates/search/search.html:9
66 #: templates/search/search.html.py:13
66 #: templates/search/search.html.py:13
67 msgid "Search"
67 msgid "Search"
68 msgstr "Поиск"
68 msgstr "Поиск"
69
69
70 #: forms.py:109
70 #: forms.py:109
71 msgid "Image"
71 msgid "Image"
72 msgstr "Изображение"
72 msgstr "Изображение"
73
73
74 #: forms.py:114
74 #: forms.py:114
75 msgid "e-mail"
75 msgid "e-mail"
76 msgstr ""
76 msgstr ""
77
77
78 #: forms.py:125
78 #: forms.py:125
79 #, python-format
79 #, python-format
80 msgid "Title must have less than %s characters"
80 msgid "Title must have less than %s characters"
81 msgstr "Заголовок должен иметь меньше %s символов"
81 msgstr "Заголовок должен иметь меньше %s символов"
82
82
83 #: forms.py:134
83 #: forms.py:134
84 #, python-format
84 #, python-format
85 msgid "Text must have less than %s characters"
85 msgid "Text must have less than %s characters"
86 msgstr "Текст должен быть короче %s символов"
86 msgstr "Текст должен быть короче %s символов"
87
87
88 #: forms.py:145
88 #: forms.py:145
89 #, python-format
89 #, python-format
90 msgid "Image must be less than %s bytes"
90 msgid "Image must be less than %s bytes"
91 msgstr "Изображение должно быть менее %s байт"
91 msgstr "Изображение должно быть менее %s байт"
92
92
93 #: forms.py:180
93 #: forms.py:180
94 msgid "Either text or image must be entered."
94 msgid "Either text or image must be entered."
95 msgstr "Текст или картинка должны быть введены."
95 msgstr "Текст или картинка должны быть введены."
96
96
97 #: forms.py:200
97 #: forms.py:200
98 #, python-format
98 #, python-format
99 msgid "Wait %s seconds after last posting"
99 msgid "Wait %s seconds after last posting"
100 msgstr "Подождите %s секунд после последнего постинга"
100 msgstr "Подождите %s секунд после последнего постинга"
101
101
102 #: forms.py:216 templates/boards/tags.html:7 templates/boards/rss/post.html:10
102 #: forms.py:216 templates/boards/tags.html:7 templates/boards/rss/post.html:10
103 msgid "Tags"
103 msgid "Tags"
104 msgstr "Теги"
104 msgstr "Теги"
105
105
106 #: forms.py:223 forms.py:291
106 #: forms.py:223 forms.py:291
107 msgid "Inappropriate characters in tags."
107 msgid "Inappropriate characters in tags."
108 msgstr "Недопустимые символы в тегах."
108 msgstr "Недопустимые символы в тегах."
109
109
110 #: forms.py:251 forms.py:272
110 #: forms.py:251 forms.py:272
111 msgid "Captcha validation failed"
111 msgid "Captcha validation failed"
112 msgstr "Проверка капчи провалена"
112 msgstr "Проверка капчи провалена"
113
113
114 #: forms.py:278
114 #: forms.py:278
115 msgid "Theme"
115 msgid "Theme"
116 msgstr "Тема"
116 msgstr "Тема"
117
117
118 #: forms.py:314
118 #: forms.py:314
119 msgid "Invalid master password"
119 msgid "Invalid master password"
120 msgstr "Неверный мастер-пароль"
120 msgstr "Неверный мастер-пароль"
121
121
122 #: forms.py:328
122 #: forms.py:328
123 #, python-format
123 #, python-format
124 msgid "Wait %s minutes after last login"
124 msgid "Wait %s minutes after last login"
125 msgstr "Подождите %s минут после последнего входа"
125 msgstr "Подождите %s минут после последнего входа"
126
126
127 #: templates/boards/404.html:6
127 #: templates/boards/404.html:6
128 msgid "Not found"
128 msgid "Not found"
129 msgstr "Не найдено"
129 msgstr "Не найдено"
130
130
131 #: templates/boards/404.html:12
131 #: templates/boards/404.html:12
132 msgid "This page does not exist"
132 msgid "This page does not exist"
133 msgstr "Этой страницы не существует"
133 msgstr "Этой страницы не существует"
134
134
135 #: templates/boards/authors.html:6 templates/boards/authors.html.py:12
135 #: templates/boards/authors.html:6 templates/boards/authors.html.py:12
136 msgid "Authors"
136 msgid "Authors"
137 msgstr "Авторы"
137 msgstr "Авторы"
138
138
139 #: templates/boards/authors.html:26
139 #: templates/boards/authors.html:26
140 msgid "Distributed under the"
140 msgid "Distributed under the"
141 msgstr "Распространяется под"
141 msgstr "Распространяется под"
142
142
143 #: templates/boards/authors.html:28
143 #: templates/boards/authors.html:28
144 msgid "license"
144 msgid "license"
145 msgstr "лицензией"
145 msgstr "лицензией"
146
146
147 #: templates/boards/authors.html:30
147 #: templates/boards/authors.html:30
148 msgid "Repository"
148 msgid "Repository"
149 msgstr "Репозиторий"
149 msgstr "Репозиторий"
150
150
151 #: templates/boards/base.html:12
151 #: templates/boards/base.html:12
152 msgid "Feed"
152 msgid "Feed"
153 msgstr "Лента"
153 msgstr "Лента"
154
154
155 #: templates/boards/base.html:29
155 #: templates/boards/base.html:29
156 msgid "All threads"
156 msgid "All threads"
157 msgstr "Все темы"
157 msgstr "Все темы"
158
158
159 #: templates/boards/base.html:34
159 #: templates/boards/base.html:34
160 msgid "Tag management"
160 msgid "Tag management"
161 msgstr "Управление тегами"
161 msgstr "Управление тегами"
162
162
163 #: templates/boards/base.html:36 templates/boards/settings.html:7
163 #: templates/boards/base.html:36 templates/boards/settings.html:7
164 msgid "Settings"
164 msgid "Settings"
165 msgstr "Настройки"
165 msgstr "Настройки"
166
166
167 #: templates/boards/base.html:50
167 #: templates/boards/base.html:50
168 msgid "Logout"
168 msgid "Logout"
169 msgstr "Выход"
169 msgstr "Выход"
170
170
171 #: templates/boards/base.html:52 templates/boards/login.html:6
171 #: templates/boards/base.html:52 templates/boards/login.html:6
172 #: templates/boards/login.html.py:16
172 #: templates/boards/login.html.py:16
173 msgid "Login"
173 msgid "Login"
174 msgstr "Вход"
174 msgstr "Вход"
175
175
176 #: templates/boards/base.html:56
176 #: templates/boards/base.html:56
177 #, python-format
177 #, python-format
178 msgid "Speed: %(ppd)s posts per day"
178 msgid "Speed: %(ppd)s posts per day"
179 msgstr "Скорость: %(ppd)s сообщений в день"
179 msgstr "Скорость: %(ppd)s сообщений в день"
180
180
181 #: templates/boards/base.html:58
181 #: templates/boards/base.html:58
182 msgid "Up"
182 msgid "Up"
183 msgstr "Вверх"
183 msgstr "Вверх"
184
184
185 #: templates/boards/login.html:19
185 #: templates/boards/login.html:19
186 msgid "Insert your user id above"
186 msgid "Insert your user id above"
187 msgstr "Вставьте свой ID пользователя выше"
187 msgstr "Вставьте свой ID пользователя выше"
188
188
189 #: templates/boards/post.html:21 templates/boards/staticpages/help.html:19
189 #: templates/boards/post.html:21 templates/boards/staticpages/help.html:19
190 msgid "Quote"
190 msgid "Quote"
191 msgstr "Цитата"
191 msgstr "Цитата"
192
192
193 #: templates/boards/post.html:31
193 #: templates/boards/post.html:31
194 msgid "Open"
194 msgid "Open"
195 msgstr "Открыть"
195 msgstr "Открыть"
196
196
197 #: templates/boards/post.html:33
197 #: templates/boards/post.html:33
198 msgid "Reply"
198 msgid "Reply"
199 msgstr "Ответ"
199 msgstr "Ответ"
200
200
201 #: templates/boards/post.html:40
201 #: templates/boards/post.html:40
202 msgid "Edit"
202 msgid "Edit"
203 msgstr "Изменить"
203 msgstr "Изменить"
204
204
205 #: templates/boards/post.html:42
205 #: templates/boards/post.html:42
206 msgid "Delete"
206 msgid "Delete"
207 msgstr "Удалить"
207 msgstr "Удалить"
208
208
209 #: templates/boards/post.html:45
209 #: templates/boards/post.html:45
210 msgid "Ban IP"
210 msgid "Ban IP"
211 msgstr "Заблокировать IP"
211 msgstr "Заблокировать IP"
212
212
213 #: templates/boards/post.html:76
213 #: templates/boards/post.html:76
214 msgid "Replies"
214 msgid "Replies"
215 msgstr "Ответы"
215 msgstr "Ответы"
216
216
217 #: templates/boards/post.html:86 templates/boards/thread.html:88
217 #: templates/boards/post.html:86 templates/boards/thread.html:88
218 #: templates/boards/thread_gallery.html:61
218 #: templates/boards/thread_gallery.html:61
219 msgid "replies"
219 msgid "replies"
220 msgstr "ответов"
220 msgstr "ответов"
221
221
222 #: templates/boards/post.html:87 templates/boards/thread.html:89
222 #: templates/boards/post.html:87 templates/boards/thread.html:89
223 #: templates/boards/thread_gallery.html:62
223 #: templates/boards/thread_gallery.html:62
224 msgid "images"
224 msgid "images"
225 msgstr "изображений"
225 msgstr "изображений"
226
226
227 #: templates/boards/post_admin.html:19
227 #: templates/boards/post_admin.html:19
228 msgid "Tags:"
228 msgid "Tags:"
229 msgstr "Теги:"
229 msgstr "Теги:"
230
230
231 #: templates/boards/post_admin.html:30
231 #: templates/boards/post_admin.html:30
232 msgid "Add tag"
232 msgid "Add tag"
233 msgstr "Добавить тег"
233 msgstr "Добавить тег"
234
234
235 #: templates/boards/posting_general.html:56
235 #: templates/boards/posting_general.html:56
236 msgid "Show tag"
236 msgid "Show tag"
237 msgstr "Показывать тег"
237 msgstr "Показывать тег"
238
238
239 #: templates/boards/posting_general.html:60
239 #: templates/boards/posting_general.html:60
240 msgid "Hide tag"
240 msgid "Hide tag"
241 msgstr "Скрывать тег"
241 msgstr "Скрывать тег"
242
242
243 #: templates/boards/posting_general.html:79 templates/search/search.html:22
243 #: templates/boards/posting_general.html:79 templates/search/search.html:22
244 msgid "Previous page"
244 msgid "Previous page"
245 msgstr "Предыдущая страница"
245 msgstr "Предыдущая страница"
246
246
247 #: templates/boards/posting_general.html:94
247 #: templates/boards/posting_general.html:94
248 #, python-format
248 #, python-format
249 msgid "Skipped %(count)s replies. Open thread to see all replies."
249 msgid "Skipped %(count)s replies. Open thread to see all replies."
250 msgstr "Пропущено %(count)s ответов. Откройте тред, чтобы увидеть все ответы."
250 msgstr "Пропущено %(count)s ответов. Откройте тред, чтобы увидеть все ответы."
251
251
252 #: templates/boards/posting_general.html:121 templates/search/search.html:33
252 #: templates/boards/posting_general.html:121 templates/search/search.html:33
253 msgid "Next page"
253 msgid "Next page"
254 msgstr "Следующая страница"
254 msgstr "Следующая страница"
255
255
256 #: templates/boards/posting_general.html:126
256 #: templates/boards/posting_general.html:126
257 msgid "No threads exist. Create the first one!"
257 msgid "No threads exist. Create the first one!"
258 msgstr "Нет тем. Создайте первую!"
258 msgstr "Нет тем. Создайте первую!"
259
259
260 #: templates/boards/posting_general.html:132
260 #: templates/boards/posting_general.html:132
261 msgid "Create new thread"
261 msgid "Create new thread"
262 msgstr "Создать новую тему"
262 msgstr "Создать новую тему"
263
263
264 #: templates/boards/posting_general.html:137 templates/boards/thread.html:58
264 #: templates/boards/posting_general.html:137 templates/boards/thread.html:58
265 msgid "Post"
265 msgid "Post"
266 msgstr "Отправить"
266 msgstr "Отправить"
267
267
268 #: templates/boards/posting_general.html:142
268 #: templates/boards/posting_general.html:142
269 msgid "Tags must be delimited by spaces. Text or image is required."
269 msgid "Tags must be delimited by spaces. Text or image is required."
270 msgstr ""
270 msgstr ""
271 "Теги должны быть разделены пробелами. Текст или изображение обязательны."
271 "Теги должны быть разделены пробелами. Текст или изображение обязательны."
272
272
273 #: templates/boards/posting_general.html:145 templates/boards/thread.html:66
273 #: templates/boards/posting_general.html:145 templates/boards/thread.html:66
274 msgid "Text syntax"
274 msgid "Text syntax"
275 msgstr "Синтаксис текста"
275 msgstr "Синтаксис текста"
276
276
277 #: templates/boards/posting_general.html:157
277 #: templates/boards/posting_general.html:157
278 msgid "Pages:"
278 msgid "Pages:"
279 msgstr "Страницы: "
279 msgstr "Страницы: "
280
280
281 #: templates/boards/settings.html:15
281 #: templates/boards/settings.html:15
282 msgid "You are moderator."
282 msgid "You are moderator."
283 msgstr "Вы модератор."
283 msgstr "Вы модератор."
284
284
285 #: templates/boards/settings.html:20
285 #: templates/boards/settings.html:19
286 msgid "Hidden tags:"
286 msgid "Hidden tags:"
287 msgstr "Скрытые теги:"
287 msgstr "Скрытые теги:"
288
288
289 #: templates/boards/settings.html:26
290 msgid "No hidden tags."
291 msgstr "Нет скрытых тегов."
292
289 #: templates/boards/settings.html:35
293 #: templates/boards/settings.html:35
290 msgid "Save"
294 msgid "Save"
291 msgstr "Сохранить"
295 msgstr "Сохранить"
292
296
293 #: templates/boards/tags.html:22
297 #: templates/boards/tags.html:22
294 msgid "No tags found."
298 msgid "No tags found."
295 msgstr "Теги не найдены."
299 msgstr "Теги не найдены."
296
300
297 #: templates/boards/thread.html:20 templates/boards/thread_gallery.html:21
301 #: templates/boards/thread.html:20 templates/boards/thread_gallery.html:21
298 msgid "Normal mode"
302 msgid "Normal mode"
299 msgstr "Нормальный режим"
303 msgstr "Нормальный режим"
300
304
301 #: templates/boards/thread.html:21 templates/boards/thread_gallery.html:22
305 #: templates/boards/thread.html:21 templates/boards/thread_gallery.html:22
302 msgid "Gallery mode"
306 msgid "Gallery mode"
303 msgstr "Режим галереи"
307 msgstr "Режим галереи"
304
308
305 #: templates/boards/thread.html:29
309 #: templates/boards/thread.html:29
306 msgid "posts to bumplimit"
310 msgid "posts to bumplimit"
307 msgstr "сообщений до бамплимита"
311 msgstr "сообщений до бамплимита"
308
312
309 #: templates/boards/thread.html:50
313 #: templates/boards/thread.html:50
310 msgid "Reply to thread"
314 msgid "Reply to thread"
311 msgstr "Ответить в тему"
315 msgstr "Ответить в тему"
312
316
313 #: templates/boards/thread.html:63
317 #: templates/boards/thread.html:63
314 msgid "Switch mode"
318 msgid "Switch mode"
315 msgstr "Переключить режим"
319 msgstr "Переключить режим"
316
320
317 #: templates/boards/thread.html:90 templates/boards/thread_gallery.html:63
321 #: templates/boards/thread.html:90 templates/boards/thread_gallery.html:63
318 msgid "Last update: "
322 msgid "Last update: "
319 msgstr "Последнее обновление: "
323 msgstr "Последнее обновление: "
320
324
321 #: templates/boards/rss/post.html:5
325 #: templates/boards/rss/post.html:5
322 msgid "Post image"
326 msgid "Post image"
323 msgstr "Изображение сообщения"
327 msgstr "Изображение сообщения"
324
328
325 #: templates/boards/staticpages/banned.html:6
329 #: templates/boards/staticpages/banned.html:6
326 msgid "Banned"
330 msgid "Banned"
327 msgstr "Заблокирован"
331 msgstr "Заблокирован"
328
332
329 #: templates/boards/staticpages/banned.html:11
333 #: templates/boards/staticpages/banned.html:11
330 msgid "Your IP address has been banned. Contact the administrator"
334 msgid "Your IP address has been banned. Contact the administrator"
331 msgstr "Ваш IP адрес был заблокирован. Свяжитесь с администратором"
335 msgstr "Ваш IP адрес был заблокирован. Свяжитесь с администратором"
332
336
333 #: templates/boards/staticpages/help.html:6
337 #: templates/boards/staticpages/help.html:6
334 #: templates/boards/staticpages/help.html:10
338 #: templates/boards/staticpages/help.html:10
335 msgid "Syntax"
339 msgid "Syntax"
336 msgstr "Синтаксис"
340 msgstr "Синтаксис"
337
341
338 #: templates/boards/staticpages/help.html:11
342 #: templates/boards/staticpages/help.html:11
339 msgid "2 line breaks for a new line."
343 msgid "2 line breaks for a new line."
340 msgstr "2 перевода строки создают новый абзац."
344 msgstr "2 перевода строки создают новый абзац."
341
345
342 #: templates/boards/staticpages/help.html:12
346 #: templates/boards/staticpages/help.html:12
343 msgid "Italic text"
347 msgid "Italic text"
344 msgstr "Курсивный текст"
348 msgstr "Курсивный текст"
345
349
346 #: templates/boards/staticpages/help.html:13
350 #: templates/boards/staticpages/help.html:13
347 msgid "Bold text"
351 msgid "Bold text"
348 msgstr "Полужирный текст"
352 msgstr "Полужирный текст"
349
353
350 #: templates/boards/staticpages/help.html:14
354 #: templates/boards/staticpages/help.html:14
351 msgid "Spoiler"
355 msgid "Spoiler"
352 msgstr "Спойлер"
356 msgstr "Спойлер"
353
357
354 #: templates/boards/staticpages/help.html:15
358 #: templates/boards/staticpages/help.html:15
355 msgid "Link to a post"
359 msgid "Link to a post"
356 msgstr "Ссылка на сообщение"
360 msgstr "Ссылка на сообщение"
357
361
358 #: templates/boards/staticpages/help.html:16
362 #: templates/boards/staticpages/help.html:16
359 msgid "Strikethrough text"
363 msgid "Strikethrough text"
360 msgstr "Зачеркнутый текст"
364 msgstr "Зачеркнутый текст"
361
365
362 #: templates/boards/staticpages/help.html:17
366 #: templates/boards/staticpages/help.html:17
363 msgid "You need to new line before:"
367 msgid "You need to new line before:"
364 msgstr "Перед этими тегами нужна новая строка:"
368 msgstr "Перед этими тегами нужна новая строка:"
365
369
366 #: templates/boards/staticpages/help.html:18
370 #: templates/boards/staticpages/help.html:18
367 msgid "Comment"
371 msgid "Comment"
368 msgstr "Комментарий" No newline at end of file
372 msgstr "Комментарий"
@@ -1,41 +1,41 b''
1 {% extends "boards/base.html" %}
1 {% extends "boards/base.html" %}
2
2
3 {% load i18n %}
3 {% load i18n %}
4 {% load humanize %}
4 {% load humanize %}
5
5
6 {% block head %}
6 {% block head %}
7 <title>{% trans 'Settings' %} - {{ site_name }}</title>
7 <title>{% trans 'Settings' %} - {{ site_name }}</title>
8 {% endblock %}
8 {% endblock %}
9
9
10 {% block content %}
10 {% block content %}
11
11
12 <div class="post">
12 <div class="post">
13 <p>
13 <p>
14 {% if user.is_moderator %}
14 {% if moderator %}
15 {% trans 'You are moderator.' %}
15 {% trans 'You are moderator.' %}
16 {% endif %}
16 {% endif %}
17 </p>
17 </p>
18 {% with hidden_tags=hidden_tags %}
19 {% if hidden_tags %}
18 {% if hidden_tags %}
20 <p>{% trans 'Hidden tags:' %}
19 <p>{% trans 'Hidden tags:' %}
21 {% for tag in hidden_tags %}
20 {% for tag in hidden_tags %}
22 <a class="tag" href="{% url 'tag' tag.name %}">
21 <a class="tag" href="{% url 'tag' tag.name %}">
23 #{{ tag.name }}</a>{% if not forloop.last %},{% endif %}
22 #{{ tag.name }}</a>{% if not forloop.last %},{% endif %}
24 {% endfor %}
23 {% endfor %}
25 </p>
24 </p>
25 {% else %}
26 <p>{% trans 'No hidden tags.' %}</p>
26 {% endif %}
27 {% endif %}
27 {% endwith %}
28 </div>
28 </div>
29
29
30 <div class="post-form-w">
30 <div class="post-form-w">
31 <div class="post-form">
31 <div class="post-form">
32 <form method="post">{% csrf_token %}
32 <form method="post">{% csrf_token %}
33 {{ form.as_div }}
33 {{ form.as_div }}
34 <div class="form-submit">
34 <div class="form-submit">
35 <input type="submit" value="{% trans "Save" %}" />
35 <input type="submit" value="{% trans "Save" %}" />
36 </div>
36 </div>
37 </form>
37 </form>
38 </div>
38 </div>
39 </div>
39 </div>
40
40
41 {% endblock %}
41 {% endblock %}
@@ -1,35 +1,38 b''
1 from django.db import transaction
1 from django.db import transaction
2 from django.shortcuts import render, redirect
2 from django.shortcuts import render, redirect
3
3
4 from boards.abstracts.settingsmanager import get_settings_manager
4 from boards.abstracts.settingsmanager import get_settings_manager
5 from boards.views.base import BaseBoardView, CONTEXT_FORM
5 from boards.views.base import BaseBoardView, CONTEXT_FORM
6 from boards.forms import SettingsForm, PlainErrorList
6 from boards.forms import SettingsForm, PlainErrorList
7
7
8 CONTEXT_HIDDEN_TAGS = 'hidden_tags'
9
8
10
9 class SettingsView(BaseBoardView):
11 class SettingsView(BaseBoardView):
10
12
11 def get(self, request):
13 def get(self, request):
12 context = self.get_context_data(request=request)
14 context = self.get_context_data(request=request)
13 settings_manager = get_settings_manager(request)
15 settings_manager = get_settings_manager(request)
14
16
15 selected_theme = settings_manager.get_theme()
17 selected_theme = settings_manager.get_theme()
16
18
17 form = SettingsForm(initial={'theme': selected_theme},
19 form = SettingsForm(initial={'theme': selected_theme},
18 error_class=PlainErrorList)
20 error_class=PlainErrorList)
19
21
20 context[CONTEXT_FORM] = form
22 context[CONTEXT_FORM] = form
23 context[CONTEXT_HIDDEN_TAGS] = settings_manager.get_hidden_tags()
21
24
22 return render(request, 'boards/settings.html', context)
25 return render(request, 'boards/settings.html', context)
23
26
24 def post(self, request):
27 def post(self, request):
25 settings_manager = get_settings_manager(request)
28 settings_manager = get_settings_manager(request)
26
29
27 with transaction.atomic():
30 with transaction.atomic():
28 form = SettingsForm(request.POST, error_class=PlainErrorList)
31 form = SettingsForm(request.POST, error_class=PlainErrorList)
29
32
30 if form.is_valid():
33 if form.is_valid():
31 selected_theme = form.cleaned_data['theme']
34 selected_theme = form.cleaned_data['theme']
32
35
33 settings_manager.set_theme(selected_theme)
36 settings_manager.set_theme(selected_theme)
34
37
35 return redirect('settings')
38 return redirect('settings')
General Comments 0
You need to be logged in to leave comments. Login now