# HG changeset patch # User neko259 # Date 2015-08-03 15:28:29 # Node ID 6b9c7236c1ad3cbc0be2fe42e1da910548868bfc # Parent be089b6c757242aef19e4c20d7ab046ed091d3e2 Required tags are now called sections and split up in the all tags list diff --git a/boards/locale/ru/LC_MESSAGES/django.mo b/boards/locale/ru/LC_MESSAGES/django.mo index fef6b3383e27e90f945fab09ea4c7f772026d648..2658e13e1165d63ae83f01110169b9fc48dbe85e GIT binary patch literal 7654 zc$|$_Yj9Q772dYgHZLRy1O)8H7Axw#B!Gw)q6P?%niqLsv90Mz?jbpH@444=&P8Ks ze!~_x&Lajg4ADuaO+D<#Q)2U8p+S-}+m(v-iuWzlj?;{Ud z@8q2CoW1v2dp*9j_Q~%T&ikIiuLsu(TpK>E)RVx*s}=v!pHpfc@IfH{)B)TU0v`o_ z26z%!27KP&4}qTr4gpEU7_bC*8CVK@*UbMCSPA?ca53<2W}kT_vQJ5g=vxR}4ZOZY z=C_xKd;_o?xVuE`xW7d9iQ}e$F7O)QAaE7%G;kU4O{4cc;Pt>infI$Wv(>!sDHD6*W?f+B51R2KM$gGI(R->)_IssF?0daT;`|0M z2AnLD{Qtw~TU0K2UQsS`Yk{DK+E^~}iIt1q2H+N8vw0r?-UxiUT>QLHE_S^ITuN~P z-Ua-iT)|koB)th+StZWZ$1wi2eVn5IZ-`7r*YB zFY9;B7kzE>W&U2^BI3(@@zXc!zX@Ckd~Ckxf5ogHH8^SXyal{)l~V7R_d^SmS`Iw6 zK=^P5cmwe51+veF3nU-^Ss;A9rc&atqEh&ETcz-_6SxGJsucOhDVzeqd;t_Su4zW{u3k<{1aMN&`i1MdJ*Q4_CYi$!lA5USL-7K>fqT`ckY z@nW(2>|%+_=&5?S}u5{dU~OC+v8H}k(WqP%^z}Cc9l(viy}(9btvJ*SIv8^65dnHsqV<8JI&lO zgWphvA93p|xW25!KI#S3Pbe2#an&f{1^w0;TyOAe2HSA$Q4)9h?Zy>V!WYWXW?U_1 z?lvX$vRz62k?+)pc9{8{2I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-Team: LANGUAGE \n" @@ -111,7 +111,7 @@ msgstr "Текст или картинка должны быть введены." msgid "Image must be less than %s bytes" msgstr "Изображение должно быть менее %s байт" -#: forms.py:338 templates/boards/all_threads.html:128 +#: forms.py:338 templates/boards/all_threads.html:136 #: templates/boards/rss/post.html:10 templates/boards/tags.html:6 msgid "Tags" msgstr "Метки" @@ -156,59 +156,59 @@ msgstr "Этой страницы не существует" msgid "Related message" msgstr "Связанное сообщение" -#: templates/boards/all_threads.html:60 +#: templates/boards/all_threads.html:68 msgid "Edit tag" msgstr "Изменить метку" -#: templates/boards/all_threads.html:63 +#: templates/boards/all_threads.html:71 #, python-format msgid "This tag has %(thread_count)s threads and %(post_count)s posts." msgstr "С этой меткой есть %(thread_count)s тем и %(post_count)s сообщений." -#: templates/boards/all_threads.html:70 templates/boards/feed.html:30 +#: templates/boards/all_threads.html:78 templates/boards/feed.html:30 #: templates/boards/notifications.html:17 templates/search/search.html:26 msgid "Previous page" msgstr "Предыдущая страница" -#: templates/boards/all_threads.html:84 +#: templates/boards/all_threads.html:92 #, python-format msgid "Skipped %(count)s replies. Open thread to see all replies." msgstr "Пропущено %(count)s ответов. Откройте тред, чтобы увидеть все ответы." -#: templates/boards/all_threads.html:102 templates/boards/feed.html:40 +#: templates/boards/all_threads.html:110 templates/boards/feed.html:40 #: templates/boards/notifications.html:27 templates/search/search.html:37 msgid "Next page" msgstr "Следующая страница" -#: templates/boards/all_threads.html:107 +#: templates/boards/all_threads.html:115 msgid "No threads exist. Create the first one!" msgstr "Нет тем. Создайте первую!" -#: templates/boards/all_threads.html:113 +#: templates/boards/all_threads.html:121 msgid "Create new thread" msgstr "Создать новую тему" -#: templates/boards/all_threads.html:118 templates/boards/preview.html:16 +#: templates/boards/all_threads.html:126 templates/boards/preview.html:16 #: templates/boards/thread_normal.html:38 msgid "Post" msgstr "Отправить" -#: templates/boards/all_threads.html:123 +#: templates/boards/all_threads.html:131 msgid "Tags must be delimited by spaces. Text or image is required." msgstr "" "Метки должны быть разделены пробелами. Текст или изображение обязательны." -#: templates/boards/all_threads.html:125 templates/boards/preview.html:6 +#: templates/boards/all_threads.html:133 templates/boards/preview.html:6 #: templates/boards/staticpages/help.html:21 #: templates/boards/thread_normal.html:42 msgid "Preview" msgstr "Предпросмотр" -#: templates/boards/all_threads.html:127 templates/boards/thread_normal.html:45 +#: templates/boards/all_threads.html:135 templates/boards/thread_normal.html:45 msgid "Text syntax" msgstr "Синтаксис текста" -#: templates/boards/all_threads.html:141 templates/boards/feed.html:53 +#: templates/boards/all_threads.html:149 templates/boards/feed.html:53 msgid "Pages:" msgstr "Страницы: " @@ -257,7 +257,6 @@ msgid "feed" msgstr "лента" #: templates/boards/base.html:42 templates/boards/random.html:6 -#| msgid "No images." msgid "Random images" msgstr "Случайные изображения" @@ -315,11 +314,11 @@ msgstr "Изменить тему" msgid "Replies" msgstr "Ответы" -#: templates/boards/post.html:97 templates/boards/thread.html:37 +#: templates/boards/post.html:97 templates/boards/thread.html:34 msgid "messages" msgstr "сообщений" -#: templates/boards/post.html:98 templates/boards/thread.html:38 +#: templates/boards/post.html:98 templates/boards/thread.html:35 msgid "images" msgstr "изображений" @@ -389,13 +388,19 @@ msgstr "Цитата" msgid "You can try pasting the text and previewing the result here:" msgstr "Вы можете попробовать вставить текст и проверить результат здесь:" -#: templates/boards/tags.html:21 -msgid "No tags found." -msgstr "Метки не найдены." +#: templates/boards/tags.html:14 +msgid "Sections:" +msgstr "Разделы:" -#: templates/boards/tags.html:24 -msgid "All tags" -msgstr "Все метки" +#: templates/boards/tags.html:26 +#| msgid "Hidden tags:" +msgid "Other tags:" +msgstr "Другие метки:" + +#: templates/boards/tags.html:38 +#| msgid "All tags" +msgid "All tags..." +msgstr "Все метки..." #: templates/boards/thread.html:15 msgid "Normal" @@ -409,7 +414,7 @@ msgstr "Галерея" msgid "Tree" msgstr "Дерево" -#: templates/boards/thread.html:39 +#: templates/boards/thread.html:36 msgid "Last update: " msgstr "Последнее обновление: " @@ -429,10 +434,7 @@ msgstr "Ответить в тему" msgid "Close form" msgstr "Закрыть форму" -#: templates/boards/thread_normal.html:60 -msgid "Update" -msgstr "Обновить" - #: templates/search/search.html:17 msgid "Ok" msgstr "Ок" + diff --git a/boards/templates/boards/tags.html b/boards/templates/boards/tags.html --- a/boards/templates/boards/tags.html +++ b/boards/templates/boards/tags.html @@ -9,7 +9,21 @@ {% block content %}
+ {% if section_tags %} +
+ {% trans 'Sections:' %} + {% for tag in section_tags %} +
+ {% autoescape off %} + {{ tag.get_view }} + {% endautoescape %} +
+ {% endfor %} +
+ {% endif %} {% if all_tags %} +
+ {% trans 'Other tags:' %} {% for tag in all_tags %}
{% autoescape off %} @@ -17,11 +31,11 @@ {% endautoescape %}
{% endfor %} - {% else %} - {% trans 'No tags found.' %} +
{% endif %} + {% if query %} - + {% endif %}
diff --git a/boards/views/all_tags.py b/boards/views/all_tags.py --- a/boards/views/all_tags.py +++ b/boards/views/all_tags.py @@ -4,6 +4,7 @@ from boards.views.base import BaseBoardV from boards.models.tag import Tag +PARAM_SECTION_TAGS = 'section_tags' PARAM_TAGS = 'all_tags' PARAM_QUERY = 'query' @@ -13,10 +14,10 @@ class AllTagsView(BaseBoardView): def get(self, request, query=None): params = dict() - if query == 'required': - params[PARAM_TAGS] = Tag.objects.filter(required=True) - else: - params[PARAM_TAGS] = Tag.objects.get_not_empty_tags() + params[PARAM_SECTION_TAGS] = Tag.objects.filter(required=True) + if query != 'required': + params[PARAM_TAGS] = Tag.objects.get_not_empty_tags().filter( + required=False) params[PARAM_QUERY] = query return render(request, 'boards/tags.html', params)