##// END OF EJS Templates
Show only required tags in all tags list by default
neko259 -
r1069:389105b1 default
parent child Browse files
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: 2015-03-30 18:42+0300\n"
10 "POT-Creation-Date: 2015-04-01 18:05+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"
@@ -255,21 +255,21 b' msgstr "\xd0\xa1\xd0\xbe\xd0\xb7\xd0\xb4\xd0\xb0\xd1\x82\xd1\x8c \xd0\xbd\xd0\xbe\xd0\xb2\xd1\x83\xd1\x8e \xd1\x82\xd0\xb5\xd0\xbc\xd1\x83"'
255 msgid "Post"
255 msgid "Post"
256 msgstr "Отправить"
256 msgstr "Отправить"
257
257
258 #: templates/boards/posting_general.html:143
258 #: templates/boards/posting_general.html:142
259 msgid "Tags must be delimited by spaces. Text or image is required."
259 msgid "Tags must be delimited by spaces. Text or image is required."
260 msgstr ""
260 msgstr ""
261 "Метки должны быть разделены пробелами. Текст или изображение обязательны."
261 "Метки должны быть разделены пробелами. Текст или изображение обязательны."
262
262
263 #: templates/boards/posting_general.html:146
263 #: templates/boards/posting_general.html:145
264 #: templates/boards/thread_normal.html:51
264 #: templates/boards/thread_normal.html:51
265 msgid "Text syntax"
265 msgid "Text syntax"
266 msgstr "Синтаксис текста"
266 msgstr "Синтаксис текста"
267
267
268 #: templates/boards/posting_general.html:158
268 #: templates/boards/posting_general.html:157
269 msgid "Pages:"
269 msgid "Pages:"
270 msgstr "Страницы: "
270 msgstr "Страницы: "
271
271
272 #: templates/boards/preview.html:6 templates/boards/staticpages/help.html:20
272 #: templates/boards/preview.html:6 templates/boards/staticpages/help.html:21
273 msgid "Preview"
273 msgid "Preview"
274 msgstr "Предпросмотр"
274 msgstr "Предпросмотр"
275
275
@@ -335,10 +335,11 b' msgid "Comment"'
335 msgstr "Комментарий"
335 msgstr "Комментарий"
336
336
337 #: templates/boards/staticpages/help.html:18
337 #: templates/boards/staticpages/help.html:18
338 #: templates/boards/staticpages/help.html:19
338 msgid "Quote"
339 msgid "Quote"
339 msgstr "Цитата"
340 msgstr "Цитата"
340
341
341 #: templates/boards/staticpages/help.html:20
342 #: templates/boards/staticpages/help.html:21
342 msgid "You can try pasting the text and previewing the result here:"
343 msgid "You can try pasting the text and previewing the result here:"
343 msgstr "Вы можете попробовать вставить текст и проверить результат здесь:"
344 msgstr "Вы можете попробовать вставить текст и проверить результат здесь:"
344
345
@@ -346,6 +347,10 b' msgstr "\xd0\x92\xd1\x8b \xd0\xbc\xd0\xbe\xd0\xb6\xd0\xb5\xd1\x82\xd0\xb5 \xd0\xbf\xd0\xbe\xd0\xbf\xd1\x80\xd0\xbe\xd0\xb1\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x82\xd1\x8c \xd0\xb2\xd1\x81\xd1\x82\xd0\xb0\xd0\xb2\xd0\xb8\xd1\x82\xd1\x8c \xd1\x82\xd0\xb5\xd0\xba\xd1\x81\xd1\x82 \xd0\xb8 \xd0\xbf\xd1\x80\xd0\xbe\xd0\xb2\xd0\xb5\xd1\x80\xd0\xb8\xd1\x82\xd1\x8c \xd1\x80\xd0\xb5\xd0\xb7\xd1\x83\xd0\xbb\xd1\x8c\xd1\x82\xd0\xb0\xd1\x82 \xd0\xb7\xd0\xb4\xd0\xb5\xd1\x81\xd1\x8c:"'
346 msgid "No tags found."
347 msgid "No tags found."
347 msgstr "Метки не найдены."
348 msgstr "Метки не найдены."
348
349
350 #: templates/boards/tags.html:26
351 msgid "All tags"
352 msgstr "Все метки"
353
349 #: templates/boards/thread.html:32
354 #: templates/boards/thread.html:32
350 msgid "Last update: "
355 msgid "Last update: "
351 msgstr "Последнее обновление: "
356 msgstr "Последнее обновление: "
@@ -31,7 +31,7 b''
31 {% autoescape off %}
31 {% autoescape off %}
32 {{ tags_str }},
32 {{ tags_str }},
33 {% endautoescape %}
33 {% endautoescape %}
34 <a href="{% url 'tags' %}" title="{% trans 'Tag management' %}"
34 <a href="{% url 'tags' 'required'%}" title="{% trans 'Tag management' %}"
35 >[...]</a>,
35 >[...]</a>,
36 <a href="{% url 'search' %}" title="{% trans 'Search' %}">[S]</a>.
36 <a href="{% url 'search' %}" title="{% trans 'Search' %}">[S]</a>.
37
37
@@ -9,7 +9,7 b''
9
9
10 {% block content %}
10 {% block content %}
11
11
12 {% cache 600 all_tags_list %}
12 {% cache 600 all_tags_list query %}
13 <div class="post">
13 <div class="post">
14 {% if all_tags %}
14 {% if all_tags %}
15 {% for tag in all_tags %}
15 {% for tag in all_tags %}
@@ -22,6 +22,9 b''
22 {% else %}
22 {% else %}
23 {% trans 'No tags found.' %}
23 {% trans 'No tags found.' %}
24 {% endif %}
24 {% endif %}
25 {% if query %}
26 <div><a href="{% url 'tags' %}">{% trans 'All tags' %}</a></div>
27 {% endif %}
25 </div>
28 </div>
26 {% endcache %}
29 {% endcache %}
27
30
@@ -36,7 +36,7 b" urlpatterns = patterns('',"
36 name='thread_gallery'),
36 name='thread_gallery'),
37
37
38 url(r'^settings/$', settings.SettingsView.as_view(), name='settings'),
38 url(r'^settings/$', settings.SettingsView.as_view(), name='settings'),
39 url(r'^tags/$', all_tags.AllTagsView.as_view(), name='tags'),
39 url(r'^tags/(?P<query>\w+)?/?$', all_tags.AllTagsView.as_view(), name='tags'),
40 url(r'^authors/$', AuthorsView.as_view(), name='authors'),
40 url(r'^authors/$', AuthorsView.as_view(), name='authors'),
41 url(r'^ban/(?P<post_id>\w+)/$', BanUserView.as_view(), name='ban'),
41 url(r'^ban/(?P<post_id>\w+)/$', BanUserView.as_view(), name='ban'),
42
42
@@ -4,11 +4,19 b' from boards.views.base import BaseBoardV'
4 from boards.models.tag import Tag
4 from boards.models.tag import Tag
5
5
6
6
7 PARAM_TAGS = 'all_tags'
8 PARAM_QUERY = 'query'
9
10
7 class AllTagsView(BaseBoardView):
11 class AllTagsView(BaseBoardView):
8
12
9 def get(self, request):
13 def get(self, request, query=None):
10 params = dict()
14 params = dict()
11
15
12 params['all_tags'] = Tag.objects.get_not_empty_tags()
16 if query == 'required':
17 params[PARAM_TAGS] = Tag.objects.filter(required=True)
18 else:
19 params[PARAM_TAGS] = Tag.objects.get_not_empty_tags()
20 params[PARAM_QUERY] = query
13
21
14 return render(request, 'boards/tags.html', params)
22 return render(request, 'boards/tags.html', params)
General Comments 0
You need to be logged in to leave comments. Login now