From: rick Date: Tue, 11 May 2010 00:23:08 +0000 (+0000) Subject: An initial settings group to support user-defined upper and lower sidebar content... X-Git-Tag: live~921 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/5806688fd0986ae297d9c500382585cecbaa72d3?ds=sidebyside An initial settings group to support user-defined upper and lower sidebar content blocks. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@208 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/settings/__init__.py b/forum/settings/__init__.py index 9ab0c6b..6351ece 100644 --- a/forum/settings/__init__.py +++ b/forum/settings/__init__.py @@ -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 index 0000000..179229f --- /dev/null +++ b/forum/settings/sidebar.py @@ -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