Show More
@@ -27,6 +27,12 b'' | |||
|
27 | 27 | </div> |
|
28 | 28 | </div> |
|
29 | 29 | |
|
30 | {% if tags %} | |
|
31 | <div id="posts-table">{% trans "Tags" %}: | |
|
32 | {{ tags|safe }} | |
|
33 | </div> | |
|
34 | {% endif %} | |
|
35 | ||
|
30 | 36 | {% if current_page %} |
|
31 | 37 | {% if prev_page_link %} |
|
32 | 38 | <div class="page_link"> |
@@ -5,7 +5,7 b' from django.core.urlresolvers import rev' | |||
|
5 | 5 | |
|
6 | 6 | from boards.abstracts.paginator import get_paginator |
|
7 | 7 | from boards.forms import SearchForm, PlainErrorList |
|
8 | from boards.models import Post | |
|
8 | from boards.models import Post, Tag | |
|
9 | 9 | from boards.views.mixins import PaginatedMixin |
|
10 | 10 | |
|
11 | 11 | |
@@ -17,6 +17,7 b" FORM_QUERY = 'query'" | |||
|
17 | 17 | CONTEXT_QUERY = 'query' |
|
18 | 18 | CONTEXT_FORM = 'form' |
|
19 | 19 | CONTEXT_PAGE = 'page' |
|
20 | CONTEXT_TAGS = 'tags' | |
|
20 | 21 | |
|
21 | 22 | REQUEST_PAGE = 'page' |
|
22 | 23 | |
@@ -46,4 +47,7 b' class BoardSearchView(View, PaginatedMix' | |||
|
46 | 47 | params[CONTEXT_QUERY] = query |
|
47 | 48 | params.update(self.get_page_context(paginator, page)) |
|
48 | 49 | |
|
50 | tags = Tag.objects.get_tag_url_list(Tag.objects.filter(aliases__name__icontains=query)) | |
|
51 | params[CONTEXT_TAGS] = tags | |
|
52 | ||
|
49 | 53 | return render(request, TEMPLATE, params) |
General Comments 0
You need to be logged in to leave comments.
Login now