# HG changeset patch # User neko259 # Date 2014-08-23 18:45:00 # Node ID cfa74d10a6c81b9227337fa77dfa26719bf3cd84 # Parent 5301b1d8d79c9ecc4023634ab0d79d93da3e3237 # Parent 69b70cd046a4b789f65c44f8a72d03baa37849b1 Merged with default diff --git a/boards/forms.py b/boards/forms.py --- a/boards/forms.py +++ b/boards/forms.py @@ -181,10 +181,6 @@ class PostForm(NeboardForm): def _validate_posting_speed(self): can_post = True - # TODO Remove this, it's only for test - if not 'user_id' in self.session: - return - posting_delay = settings.POSTING_DELAY if board_settings.LIMIT_POSTING_SPEED and LAST_POST_TIME in \ diff --git a/boards/locale/ru/LC_MESSAGES/django.mo b/boards/locale/ru/LC_MESSAGES/django.mo index 1f70c1ff6647291211289c5624ab67fe2bfbb633..77d9ef1d015f8ed800b750afb4ab31bcb9ca7eea GIT binary patch literal 6522 zc$|$_Yit}>6~3h}KT@Z0oiwEnZh)jo+ug3yw4@t5trOdcsbBRvMMV|Scz0q?vYuIH zW}O;}6x$?evDH+eRZB|=2~ZF!Vq<#~JANTS`NfYJfhr^lLZYHSkWc{utw4hB+;eAl z(>Q{)cD|YWIQN|IeCN#iclFo3B=G6O_YQpD{Fo5Kz^3bk`n-RG5H|w<0;~mosGqOL z1-IfRjSawR;O#f^{AOI%0b_dp5#V}YJMcQ-Q^3tYLqDGct^rPI{06WJ_y&+%`7uxe zi@;65w}H0-KLFketgmAK?g8EedQbpPe;4z8km&xVMJw z9IoN{5#UDPGy3_Z8s_IU;G@8w0wED`T`lM1M&KubTWi_B$7=b!FVu1zuhp`DZ`X2s zzpZ6{|ER~`2Q~ozS<7**S;OlZ*08-hfg6Ac;Kgf%*tdrB{hynd*IVmYFL&25FFWek z|32U+fJf?h|70Eed9IH6d8>}&`W5hI;J<zJ3nX}qDH?cY| z{oKZ3)q999!8)c7@!zWNNn2Excj)IG8hi2W!S{asOg(T<#d!}4 zey30kk&dX>5Wn{du7hsDbrOB32T6P%5xQ>*uJ1U$9Tn@S$B_={-9q)#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ript" msgid "designer" msgstr "дизайнер" -#: forms.py:23 +#: forms.py:22 msgid "Type message here. Use formatting panel for more advanced usage." msgstr "" "Вводите сообщение сюда. Используйте панель для более сложного форматирования." -#: forms.py:24 +#: forms.py:23 msgid "tag1 several_words_tag" msgstr "тег1 тег_из_нескольких_слов" -#: forms.py:26 +#: forms.py:25 msgid "Such image was already posted" msgstr "Такое изображение уже было загружено" -#: forms.py:28 +#: forms.py:27 msgid "Title" msgstr "Заголовок" -#: forms.py:29 +#: forms.py:28 msgid "Text" msgstr "Текст" -#: forms.py:30 +#: forms.py:29 msgid "Tag" msgstr "Тег" -#: forms.py:31 templates/boards/base.html:54 templates/search/search.html:9 +#: forms.py:30 templates/boards/base.html:36 templates/search/search.html:9 #: templates/search/search.html.py:13 msgid "Search" msgstr "Поиск" -#: forms.py:108 +#: forms.py:107 msgid "Image" msgstr "Изображение" -#: forms.py:113 +#: forms.py:112 msgid "e-mail" msgstr "" -#: forms.py:124 +#: forms.py:123 #, python-format msgid "Title must have less than %s characters" msgstr "Заголовок должен иметь меньше %s символов" -#: forms.py:133 +#: forms.py:132 #, python-format msgid "Text must have less than %s characters" msgstr "Текст должен быть короче %s символов" -#: forms.py:144 +#: forms.py:143 #, python-format msgid "Image must be less than %s bytes" msgstr "Изображение должно быть менее %s байт" -#: forms.py:179 +#: forms.py:178 msgid "Either text or image must be entered." msgstr "Текст или картинка должны быть введены." -#: forms.py:199 +#: forms.py:198 #, python-format msgid "Wait %s seconds after last posting" msgstr "Подождите %s секунд после последнего постинга" -#: forms.py:215 templates/boards/tags.html:7 templates/boards/rss/post.html:10 +#: forms.py:214 templates/boards/tags.html:7 templates/boards/rss/post.html:10 msgid "Tags" msgstr "Теги" -#: forms.py:222 forms.py:290 +#: forms.py:221 forms.py:247 msgid "Inappropriate characters in tags." msgstr "Недопустимые символы в тегах." -#: forms.py:250 forms.py:271 -msgid "Captcha validation failed" -msgstr "Проверка капчи провалена" - -#: forms.py:277 +#: forms.py:234 msgid "Theme" msgstr "Тема" -#: forms.py:313 +#: forms.py:270 msgid "Invalid master password" msgstr "Неверный мастер-пароль" -#: forms.py:327 +#: forms.py:284 #, python-format msgid "Wait %s minutes after last login" msgstr "Подождите %s минут после последнего входа" @@ -157,28 +153,27 @@ msgstr "Все темы" msgid "Tag management" msgstr "Управление тегами" -#: templates/boards/base.html:36 templates/boards/settings.html:7 +#: templates/boards/base.html:37 templates/boards/settings.html:7 msgid "Settings" msgstr "Настройки" #: templates/boards/base.html:50 -msgid "Logout" -msgstr "Выход" +msgid "Admin" +msgstr "" -#: templates/boards/base.html:52 templates/boards/login.html:6 -#: templates/boards/login.html.py:16 -msgid "Login" -msgstr "Вход" - -#: templates/boards/base.html:56 +#: templates/boards/base.html:52 #, python-format msgid "Speed: %(ppd)s posts per day" msgstr "Скорость: %(ppd)s сообщений в день" -#: templates/boards/base.html:58 +#: templates/boards/base.html:54 msgid "Up" msgstr "Вверх" +#: templates/boards/login.html:6 templates/boards/login.html.py:16 +msgid "Login" +msgstr "Вход" + #: templates/boards/login.html:19 msgid "Insert your user id above" msgstr "Вставьте свой ID пользователя выше" @@ -212,12 +207,12 @@ msgid "Replies" msgstr "Ответы" #: templates/boards/post.html:86 templates/boards/thread.html:88 -#: templates/boards/thread_gallery.html:61 +#: templates/boards/thread_gallery.html:59 msgid "messages" msgstr "сообщений" #: templates/boards/post.html:87 templates/boards/thread.html:89 -#: templates/boards/thread_gallery.html:62 +#: templates/boards/thread_gallery.html:60 msgid "images" msgstr "изображений" @@ -258,7 +253,8 @@ msgstr "Нет тем. Создайте первую!" msgid "Create new thread" msgstr "Создать новую тему" -#: templates/boards/posting_general.html:137 templates/boards/thread.html:58 +#: templates/boards/posting_general.html:137 templates/boards/preview.html:16 +#: templates/boards/thread.html:58 msgid "Post" msgstr "Отправить" @@ -275,6 +271,10 @@ msgstr "Синтаксис текста" msgid "Pages:" msgstr "Страницы: " +#: templates/boards/preview.html:6 templates/boards/staticpages/help.html:19 +msgid "Preview" +msgstr "Предпросмотр" + #: templates/boards/settings.html:15 msgid "You are moderator." msgstr "Вы модератор." @@ -295,11 +295,11 @@ msgstr "Сохранить" msgid "No tags found." msgstr "Теги не найдены." -#: templates/boards/thread.html:20 templates/boards/thread_gallery.html:21 +#: templates/boards/thread.html:20 templates/boards/thread_gallery.html:19 msgid "Normal mode" msgstr "Нормальный режим" -#: templates/boards/thread.html:21 templates/boards/thread_gallery.html:22 +#: templates/boards/thread.html:21 templates/boards/thread_gallery.html:20 msgid "Gallery mode" msgstr "Режим галереи" @@ -315,7 +315,7 @@ msgstr "Ответить в тему" msgid "Switch mode" msgstr "Переключить режим" -#: templates/boards/thread.html:90 templates/boards/thread_gallery.html:63 +#: templates/boards/thread.html:90 templates/boards/thread_gallery.html:61 msgid "Last update: " msgstr "Последнее обновление: " @@ -359,3 +359,7 @@ msgstr "Зачеркнутый текст" #: templates/boards/staticpages/help.html:16 msgid "Comment" msgstr "Комментарий" + +#: templates/boards/staticpages/help.html:19 +msgid "You can try pasting the text and previewing the result here:" +msgstr "Вы можете попробовать вставить текст и проверить результат здесь:" diff --git a/boards/mdx_neboard.py b/boards/mdx_neboard.py --- a/boards/mdx_neboard.py +++ b/boards/mdx_neboard.py @@ -116,7 +116,7 @@ class CodePattern(TextFormatter): def render_reflink(tag_name, value, options, parent, context): if not REFLINK_PATTERN.match(value): - return u'>>%s' % value + return '>>%s' % value post_id = int(value) @@ -124,21 +124,21 @@ def render_reflink(tag_name, value, opti if posts.exists(): post = posts[0] - return u'>>%s' % (post.get_url(), post_id) + return '>>%s' % (post.get_url(), post_id) else: - return u'>>%s' % value + return '>>%s' % value def render_quote(tag_name, value, options, parent, context): - source = u'' + source = '' if 'source' in options: source = options['source'] - result = u'' + result = '' if source: - result = u'
%s
%s
' % (source, value) + result = '
%s
%s
' % (source, value) else: - result = u'
%s
' % value + result = '
%s
' % value return result @@ -152,7 +152,9 @@ def preparse_text(text): def bbcode_extended(markup): - parser = bbcode.Parser() + # The newline hack is added because br's margin does not work in all + # browsers except firefox, when the div's does. + parser = bbcode.Parser(newline='
') parser.add_formatter('post', render_reflink, strip=True) parser.add_formatter('quote', render_quote, strip=True) parser.add_simple_formatter('comment', diff --git a/boards/settings.py b/boards/settings.py --- a/boards/settings.py +++ b/boards/settings.py @@ -18,6 +18,3 @@ LAST_REPLIES_COUNT = 3 ARCHIVE_THREADS = True # Limit posting speed LIMIT_POSTING_SPEED = False - -# This password is used to add admin permissions to the user -MASTER_PASSWORD = u'password' diff --git a/boards/static/css/md/base_page.css b/boards/static/css/md/base_page.css --- a/boards/static/css/md/base_page.css +++ b/boards/static/css/md/base_page.css @@ -101,15 +101,11 @@ body { visibility: hidden; } -p { +p, .br { margin-top: .5em; margin-bottom: .5em; } -br { - margin-bottom: .5em; -} - .post-form-w { background: #333344; border-top: solid 1px #888; @@ -254,6 +250,10 @@ a:hover { border-right: solid 1px #777; } +.last-replies > .post:first-child { + border-top: none; +} + .thread { margin-bottom: 3ex; margin-top: 1ex; @@ -381,6 +381,7 @@ li { margin-right: 3ex; border-left: solid 1px #888; border-right: solid 1px #888; + border-bottom: solid 1px #888; background: #000; } diff --git a/boards/static/css/pg/base_page.css b/boards/static/css/pg/base_page.css --- a/boards/static/css/pg/base_page.css +++ b/boards/static/css/pg/base_page.css @@ -133,7 +133,7 @@ p { vertical-align: middle; } -.post-form input, .post-form textarea { +.post-form input:not([name="image"]), .post-form textarea { background: #fff; color: #000; border: solid 1px; @@ -352,3 +352,13 @@ input[type="submit"]:hover { margin: 0.3ex; padding: 0.2ex; } + +.multiquote { + padding: 3px; + display: inline-block; + background: #ddd; + border-style: solid; + border-width: 1px 1px 1px 4px; + border-color: #222; + font-size: 0.9em; +} diff --git a/boards/templates/boards/base.html b/boards/templates/boards/base.html --- a/boards/templates/boards/base.html +++ b/boards/templates/boards/base.html @@ -32,7 +32,8 @@ >#{{ tag.name }}, {% endfor %} [...] + >[...], + [S] {% trans 'Settings' %} @@ -47,7 +48,6 @@