diff options
-rw-r--r-- | askbot/conf/__init__.py | 1 | ||||
-rw-r--r-- | askbot/conf/leading_sidebar.py | 38 | ||||
-rw-r--r-- | askbot/skins/default/media/style/style.less | 4 | ||||
-rw-r--r-- | askbot/skins/default/templates/base.html | 5 |
4 files changed, 48 insertions, 0 deletions
diff --git a/askbot/conf/__init__.py b/askbot/conf/__init__.py index 026a6185..de1eeccc 100644 --- a/askbot/conf/__init__.py +++ b/askbot/conf/__init__.py @@ -13,6 +13,7 @@ import askbot.conf.skin_general_settings import askbot.conf.sidebar_main import askbot.conf.sidebar_question import askbot.conf.sidebar_profile +import askbot.conf.leading_sidebar import askbot.conf.spam_and_moderation import askbot.conf.user_settings import askbot.conf.markup diff --git a/askbot/conf/leading_sidebar.py b/askbot/conf/leading_sidebar.py new file mode 100644 index 00000000..b3909961 --- /dev/null +++ b/askbot/conf/leading_sidebar.py @@ -0,0 +1,38 @@ +""" +Sidebar settings +""" +from askbot.conf.settings_wrapper import settings +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 + +LEADING_SIDEBAR = ConfigurationGroup( + 'LEADING_SIDEBAR', + _('Common left sidebar'), + super_group = CONTENT_AND_UI + ) + +settings.register( + values.BooleanValue( + LEADING_SIDEBAR, + 'ENABLE_LEADING_SIDEBAR', + description = _('Enable left sidebar'), + default = False, + ) +) + +settings.register( + values.LongStringValue( + LEADING_SIDEBAR, + 'LEADING_SIDEBAR', + description = _('HTML for the left sidebar'), + default = '', + help_text = _( + 'Use this area to enter content at the LEFT sidebar' + 'in HTML format. When using this option, please ' + 'use the HTML validation service to make sure that ' + 'your input is valid and works well in all browsers.' + ) + ) +) diff --git a/askbot/skins/default/media/style/style.less b/askbot/skins/default/media/style/style.less index 389a0acc..7b564d8a 100644 --- a/askbot/skins/default/media/style/style.less +++ b/askbot/skins/default/media/style/style.less @@ -3347,3 +3347,7 @@ pre.prettyprint { clear:both;padding: 3px; border: 0px solid #888; } .atn { color: #404; } .atv { color: #060; } } + +#leading-sidebar { + float: left; +} diff --git a/askbot/skins/default/templates/base.html b/askbot/skins/default/templates/base.html index 39b89fe8..348ab23a 100644 --- a/askbot/skins/default/templates/base.html +++ b/askbot/skins/default/templates/base.html @@ -25,6 +25,11 @@ {% endif %} {% include "widgets/header.html" %} {# Logo, user tool navigation and meta navitation #} {% include "widgets/secondary_header.html" %} {# Scope selector, search input and ask button #} + {% if settings.ENABLE_LEADING_SIDEBAR %} + <div id="leading-sidebar"> + {{ settings.LEADING_SIDEBAR|safe }} + </div> + {% endif %} <div class="content-wrapper"> {% block body %} {% endblock %} |