From 995e6714f63f8c11318019a8f63a6fdb2a664a41 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sat, 2 Jun 2012 21:30:05 -0400 Subject: added optional top banner to the question page --- askbot/conf/sidebar_question.py | 20 +++++++++++++++++--- askbot/doc/source/changelog.rst | 1 + askbot/skins/default/templates/question.html | 3 +++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/askbot/conf/sidebar_question.py b/askbot/conf/sidebar_question.py index 4416823d..bb71be7e 100644 --- a/askbot/conf/sidebar_question.py +++ b/askbot/conf/sidebar_question.py @@ -6,12 +6,26 @@ from askbot.deps.livesettings import ConfigurationGroup from askbot.deps.livesettings import values from django.utils.translation import ugettext as _ from askbot.conf.super_groups import CONTENT_AND_UI -SIDEBAR_QUESTION = ConfigurationGroup( +SIDEBAR_QUESTION = ConfigurationGroup(#shitty name - why sidebar? 'SIDEBAR_QUESTION', - _('Question page sidebar'), + _('Question page banners and sidebar'), super_group = CONTENT_AND_UI ) +settings.register( + values.LongStringValue( + SIDEBAR_QUESTION, + 'QUESTION_PAGE_TOP_BANNER', + description = _('Top banner'), + default = '', + help_text = _( + 'When using this option, please ' + 'use the HTML validation service to make sure that ' + 'your input is valid and works well in all browsers.' + ) + ) +) + settings.register( values.LongStringValue( SIDEBAR_QUESTION, @@ -20,7 +34,7 @@ settings.register( default = '', help_text = _( 'Use this area to enter content at the TOP of the sidebar' - 'in HTML format. When using this option ' + 'in HTML format. When using this option ' '(as well as the sidebar footer), please ' 'use the HTML validation service to make sure that ' 'your input is valid and works well in all browsers.' diff --git a/askbot/doc/source/changelog.rst b/askbot/doc/source/changelog.rst index 7d1a2fc0..f1fe22e2 100644 --- a/askbot/doc/source/changelog.rst +++ b/askbot/doc/source/changelog.rst @@ -7,6 +7,7 @@ In development to help prevent user profile spam (Evgeny) * Added a function to create a custom user profile tab, the feature requires access to the server (Evgeny) +* Added optional top banner to the question page (Evgeny) 0.7.43 (May 14, 2012) --------------------- diff --git a/askbot/skins/default/templates/question.html b/askbot/skins/default/templates/question.html index f22796db..741b4bf4 100644 --- a/askbot/skins/default/templates/question.html +++ b/askbot/skins/default/templates/question.html @@ -156,6 +156,9 @@ {% endblock %} {% block content %} +
+ {{ settings.QUESTION_PAGE_TOP_BANNER }} +
{% if is_cacheable %} {% cache long_time "thread-content-html" thread.id %} {% include "question/content.html" %} -- cgit v1.2.3-1-g7c22