summaryrefslogtreecommitdiffstats
path: root/askbot
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-25 23:36:39 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-01-25 23:36:39 -0300
commit4beb956905d6094a7ffd0d5a50797904f9aec943 (patch)
tree90cb04a523708159bf0a2fe8de48d2dadf341bda /askbot
parented69ce4f1a4c2f5a35f6aeefcae92b1e0889864e (diff)
downloadaskbot-4beb956905d6094a7ffd0d5a50797904f9aec943.tar.gz
askbot-4beb956905d6094a7ffd0d5a50797904f9aec943.tar.bz2
askbot-4beb956905d6094a7ffd0d5a50797904f9aec943.zip
added "left" sidebar option
Diffstat (limited to 'askbot')
-rw-r--r--askbot/conf/__init__.py1
-rw-r--r--askbot/conf/leading_sidebar.py38
-rw-r--r--askbot/skins/default/media/style/style.less4
-rw-r--r--askbot/skins/default/templates/base.html5
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 %}