##// 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
@@ -7,7 +7,7 b' msgid ""'
7 7 msgstr ""
8 8 "Project-Id-Version: PACKAGE VERSION\n"
9 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 11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 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 255 msgid "Post"
256 256 msgstr "Отправить"
257 257
258 #: templates/boards/posting_general.html:143
258 #: templates/boards/posting_general.html:142
259 259 msgid "Tags must be delimited by spaces. Text or image is required."
260 260 msgstr ""
261 261 "Метки должны быть разделены пробелами. Текст или изображение обязательны."
262 262
263 #: templates/boards/posting_general.html:146
263 #: templates/boards/posting_general.html:145
264 264 #: templates/boards/thread_normal.html:51
265 265 msgid "Text syntax"
266 266 msgstr "Синтаксис текста"
267 267
268 #: templates/boards/posting_general.html:158
268 #: templates/boards/posting_general.html:157
269 269 msgid "Pages:"
270 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 273 msgid "Preview"
274 274 msgstr "Предпросмотр"
275 275
@@ -335,10 +335,11 b' msgid "Comment"'
335 335 msgstr "Комментарий"
336 336
337 337 #: templates/boards/staticpages/help.html:18
338 #: templates/boards/staticpages/help.html:19
338 339 msgid "Quote"
339 340 msgstr "Цитата"
340 341
341 #: templates/boards/staticpages/help.html:20
342 #: templates/boards/staticpages/help.html:21
342 343 msgid "You can try pasting the text and previewing the result here:"
343 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 347 msgid "No tags found."
347 348 msgstr "Метки не найдены."
348 349
350 #: templates/boards/tags.html:26
351 msgid "All tags"
352 msgstr "Все метки"
353
349 354 #: templates/boards/thread.html:32
350 355 msgid "Last update: "
351 356 msgstr "Последнее обновление: "
@@ -31,7 +31,7 b''
31 31 {% autoescape off %}
32 32 {{ tags_str }},
33 33 {% endautoescape %}
34 <a href="{% url 'tags' %}" title="{% trans 'Tag management' %}"
34 <a href="{% url 'tags' 'required'%}" title="{% trans 'Tag management' %}"
35 35 >[...]</a>,
36 36 <a href="{% url 'search' %}" title="{% trans 'Search' %}">[S]</a>.
37 37
@@ -9,7 +9,7 b''
9 9
10 10 {% block content %}
11 11
12 {% cache 600 all_tags_list %}
12 {% cache 600 all_tags_list query %}
13 13 <div class="post">
14 14 {% if all_tags %}
15 15 {% for tag in all_tags %}
@@ -22,6 +22,9 b''
22 22 {% else %}
23 23 {% trans 'No tags found.' %}
24 24 {% endif %}
25 {% if query %}
26 <div><a href="{% url 'tags' %}">{% trans 'All tags' %}</a></div>
27 {% endif %}
25 28 </div>
26 29 {% endcache %}
27 30
@@ -36,7 +36,7 b" urlpatterns = patterns('',"
36 36 name='thread_gallery'),
37 37
38 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 40 url(r'^authors/$', AuthorsView.as_view(), name='authors'),
41 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 4 from boards.models.tag import Tag
5 5
6 6
7 PARAM_TAGS = 'all_tags'
8 PARAM_QUERY = 'query'
9
10
7 11 class AllTagsView(BaseBoardView):
8 12
9 def get(self, request):
13 def get(self, request, query=None):
10 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 22 return render(request, 'boards/tags.html', params)
General Comments 0
You need to be logged in to leave comments. Login now