1 from base import Setting, SettingSet
2 from django.forms.widgets import Textarea, Select
3 from django.utils.translation import ugettext_lazy as _
5 from static import RENDER_CHOICES
7 SIDEBAR_SET = SettingSet('sidebar', 'Sidebar content', "Enter contents to display in the sidebar. You can use markdown and some basic html tags.", 10, True)
9 SHOW_WELCOME_BOX = Setting('SHOW_WELCOME_BOX', True, SIDEBAR_SET, dict(
10 label = _("Show the Welcome box"),
11 help_text = _("Do you want to show the welcome box when a user first visits your site."),
14 APP_INTRO = Setting('APP_INTRO', u'<p>Ask and answer questions, make the world better!</p>', SIDEBAR_SET, dict(
15 label = _("Application intro"),
16 help_text = _("The introductory page that is visible in the sidebar for anonymous users."),
20 SIDEBAR_UPPER_SHOW = Setting('SIDEBAR_UPPER_SHOW', True, SIDEBAR_SET, dict(
21 label = "Show Upper Block",
22 help_text = "Check if your pages should display the upper sidebar block.",
25 SIDEBAR_UPPER_DONT_WRAP = Setting('SIDEBAR_UPPER_DONT_WRAP', False, SIDEBAR_SET, dict(
26 label = "Don't Wrap Upper Block",
27 help_text = "Don't wrap upper block with the standard style.",
30 SIDEBAR_UPPER_TEXT = Setting('SIDEBAR_UPPER_TEXT',
32 [![WebFaction logo][2]][1]
33 ## [Reliable OSQA Hosting][1]
35 We recommend [**WebFaction**][1] for OSQA hosting. For \
36 under $10/month their reliable servers get the job done. See our \
37 [**step-by-step setup guide**](http://wiki.osqa.net/display/docs/Installing+OSQA+on+WebFaction).
39 [1]: http://www.webfaction.com?affiliate=osqa
40 [2]: /m/default/media/images/webfaction.png""", SIDEBAR_SET, dict(
41 label = "Upper Block Content",
42 help_text = " The upper sidebar block. ",
43 widget=Textarea(attrs={'rows': '10'})))
45 SIDEBAR_UPPER_RENDER_MODE = Setting('SIDEBAR_UPPER_RENDER_MODE', 'markdown', SIDEBAR_SET, dict(
46 label = _("Upper block rendering mode"),
47 help_text = _("How to render your upper block code."),
48 widget=Select(choices=RENDER_CHOICES),
52 SIDEBAR_LOWER_SHOW = Setting('SIDEBAR_LOWER_SHOW', True, SIDEBAR_SET, dict(
53 label = "Show Lower Block",
54 help_text = "Check if your pages should display the lower sidebar block.",
57 SIDEBAR_LOWER_DONT_WRAP = Setting('SIDEBAR_LOWER_DONT_WRAP', False, SIDEBAR_SET, dict(
58 label = "Don't Wrap Lower Block",
59 help_text = "Don't wrap lower block with the standard style.",
62 SIDEBAR_LOWER_TEXT = Setting('SIDEBAR_LOWER_TEXT',
64 ## Learn more about OSQA
66 The [**OSQA website**](http://www.osqa.net/) and [**OSQA wiki**](http://wiki.osqa.net/) \
67 are great resources to help you learn more about the OSQA open source Q&A system. \
68 [**Join the OSQA chat!**](http://meta.osqa.net/question/79/is-there-an-online-chat-room-or-irc-channel-for-osqa#302)
69 """, SIDEBAR_SET, dict(
70 label = "Lower Block Content",
71 help_text = " The lower sidebar block. ",
72 widget=Textarea(attrs={'rows': '10'})))
74 SIDEBAR_LOWER_RENDER_MODE = Setting('SIDEBAR_LOWER_RENDER_MODE', 'markdown', SIDEBAR_SET, dict(
75 label = _("Lower block rendering mode"),
76 help_text = _("How to render your lower block code."),
77 widget=Select(choices=RENDER_CHOICES),