]> git.openstreetmap.org Git - osqa.git/commitdiff
An initial settings group to support user-defined upper and lower sidebar content...
authorrick <rick@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 11 May 2010 00:23:08 +0000 (00:23 +0000)
committerrick <rick@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 11 May 2010 00:23:08 +0000 (00:23 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@208 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/settings/__init__.py
forum/settings/sidebar.py [new file with mode: 0644]

index 9ab0c6bf44554aeaedc3ec53ec8bc0f058148e48..6351ecee015369767addc448b9b669f1b223801a 100644 (file)
@@ -13,6 +13,7 @@ FORUM_SCRIPT_ALIAS = djsettings.FORUM_SCRIPT_ALIAS
 
 
 from basic import *
+from sidebar import *
 from email import *
 from extkeys import *
 from minrep import *
diff --git a/forum/settings/sidebar.py b/forum/settings/sidebar.py
new file mode 100644 (file)
index 0000000..179229f
--- /dev/null
@@ -0,0 +1,39 @@
+from base import Setting, SettingSet
+from django.forms.widgets import Textarea
+
+SIDEBAR_SET = SettingSet('sidebar', 'Sidebar content', "Enter contents to display in the sidebar. You can use markdown and some basic html tags.", 1000, True)
+
+SIDEBAR_UPPER_SHOW = Setting('SIDEBAR_UPPER_SHOW', False, SIDEBAR_SET, dict(
+label = "Include Upper Sidebar Block",
+help_text = "Check if your pages should include the upper sidebar block.",
+required=False))
+
+
+SIDEBAR_UPPER_TEXT = Setting('SIDEBAR_UPPER_TEXT',
+u"""
+## Host your own OSQA at WebFaction
+
+We recommend WebFaction for hosting OSQA. Their affordable,
+reliable servers have everything you need!
+""", SIDEBAR_SET, dict(
+label = "Sidebar (Upper)",
+help_text = " The upper sidebar block. ",
+widget=Textarea(attrs={'rows': '10'})))
+
+
+SIDEBAR_LOWER_SHOW = Setting('SIDEBAR_LOWER_SHOW', False, SIDEBAR_SET, dict(
+label = "Include Lower Sidebar Block",
+help_text = "Check if your pages should include the lower sidebar block.",
+required=False))
+
+
+SIDEBAR_LOWER_TEXT = Setting('SIDEBAR_LOWER_TEXT',
+u"""
+## Learn more about OSQA
+
+The OSQA website and wiki are also great resources to help you
+learn more about the OSQA open source Q&A system!
+""", SIDEBAR_SET, dict(
+label = "Sidebar (Lower)",
+help_text = " The lower sidebar block. ",
+widget=Textarea(attrs={'rows': '10'})))
\ No newline at end of file