diff options
-rw-r--r-- | askbot/skins/default/templates/static_page.html | 10 | ||||
-rw-r--r-- | askbot/views/meta.py | 27 |
2 files changed, 18 insertions, 19 deletions
diff --git a/askbot/skins/default/templates/static_page.html b/askbot/skins/default/templates/static_page.html new file mode 100644 index 00000000..c537e199 --- /dev/null +++ b/askbot/skins/default/templates/static_page.html @@ -0,0 +1,10 @@ +{% extends "two_column_body.html" %} +<!-- template static_page.html --> +{% block title %}{% spaceless %}{{title}}{% endspaceless %}{% endblock %} +{% block content %} +<div class="content"> + <h1 class="section-title">{{title}}</h1> + {{content}} +</div> +{% endblock %} +<!-- end template static_page.html --> diff --git a/askbot/views/meta.py b/askbot/views/meta.py index 493ab8ec..f8cbe8ae 100644 --- a/askbot/views/meta.py +++ b/askbot/views/meta.py @@ -42,30 +42,19 @@ def server_error(request, template='500.html'): return generic_view(request, template) def faq(request): - if getattr(askbot_settings, 'FORUM_FAQ',''): - text = _(getattr(askbot_settings, 'FORUM_FAQ','')) + if askbot_settings.FORUM_FAQ.strip() != '': + return render_into_skin( + 'static_page.html', + {'title': _('FAQ'), 'content': askbot_settings.FORUM_FAQ}, + request + ) + else: data = { 'gravatar_faq_url': reverse('faq') + '#gravatar', - #'send_email_key_url': reverse('send_email_key'), - 'ask_question_url': reverse('ask'), - 'page_class': 'meta', - } - forum_faq = render_text_into_skin(text, data, request) - data_out = { - 'gravatar_faq_url': reverse('faq') + '#gravatar', - #'send_email_key_url': reverse('send_email_key'), 'ask_question_url': reverse('ask'), 'page_class': 'meta', - 'forum_faq' : forum_faq, } - return render_into_skin('faq.html', data_out, request) - data = { - 'gravatar_faq_url': reverse('faq') + '#gravatar', - #'send_email_key_url': reverse('send_email_key'), - 'ask_question_url': reverse('ask'), - 'page_class': 'meta', - } - return render_into_skin('faq_static.html', data, request) + return render_into_skin('faq_static.html', data, request) @csrf.csrf_protect def feedback(request): |