X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/07fe485fb0a119fb87f8ec948185b5acdd65300e..f241c71f15e002848cf9527c7141063c6c5e5bf8:/forum/views/readers.py
diff --git a/forum/views/readers.py b/forum/views/readers.py
index 7f201aa..bac3c0c 100644
--- a/forum/views/readers.py
+++ b/forum/views/readers.py
@@ -48,19 +48,21 @@ def index(request):
@decorators.render('questions.html', 'unanswered')
def unanswered(request):
return question_list(request, Question.objects.filter(extra_ref=None),
- _('Open questions without an accepted answer'))
+ _('Open questions without an accepted answer'),
+ 'active', None, _("Unanswered questions"))
@decorators.render('questions.html', 'questions')
def questions(request):
- return question_list(request, Question.objects.all())
+ return question_list(request, Question.objects.all(), _('questions'), 'active')
@decorators.render('questions.html')
def tag(request, tag):
return question_list(request, Question.objects.filter(tags__name=unquote(tag)),
- mark_safe(_('Questions tagged %(tag)s') % {'tag': tag}))
+ mark_safe(_('Questions tagged %(tag)s') % {'tag': tag}),
+ 'active', None, mark_safe(_('Questions tagged %(tag)s') % {'tag': tag}))
@decorators.list('questions', QUESTIONS_PAGE_SIZE)
-def question_list(request, initial, list_description=_('questions'), sort=None, base_path=None):
+def question_list(request, initial, list_description=_('questions'), sort=None, base_path=None, page_title=None):
questions = initial.filter(deleted=None, in_moderation=None)
if request.user.is_authenticated():
@@ -77,12 +79,16 @@ def question_list(request, initial, list_description=_('questions'), sort=None,
questions=questions.order_by(view_dic.get(sort, '-added_at'))
+ if page_title is None:
+ page_title = _("Questions")
+
return {
"questions" : questions,
"questions_count" : questions.count(),
#"tags_autocomplete" : _get_tags_cache_json(),
"list_description": list_description,
"base_path" : base_path,
+ "page_title" : page_title,
}