]> git.openstreetmap.org Git - osqa.git/blob - forum/settings/sidebar.py
Reintegrate merge cacheimp -> trunk.
[osqa.git] / forum / settings / sidebar.py
1 from base import Setting, SettingSet
2 from django.forms.widgets import Textarea, Select
3 from django.utils.translation import ugettext_lazy as _
4
5 from static import RENDER_CHOICES
6
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)
8
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."),
12 required=False))
13
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."),
17 widget=Textarea))
18
19 QUESTION_TITLE_TIPS = Setting('QUESTION_TITLE_TIPS',
20 u"""
21  - **ask a question relevant to the |APP_TITLE| community**
22  - the title must be in the form of a question
23  - provide enough details
24  - be clear and concise
25 """
26 , SIDEBAR_SET, dict(
27 label = "Question title tips",
28 help_text = "Tips visible on the ask or edit questions page about the question title.",
29 required=False,
30 widget=Textarea(attrs={'rows': '10'})))
31
32 QUESTION_TAG_TIPS = Setting('QUESTION_TAG_TIPS',
33 u"""
34  - Tags are words that will tell others what this question is about.
35  - They will help other find your question.
36  - A question can have up to |FORM_MAX_NUMBER_OF_TAGS| tags, but it must have at least |FORM_MIN_NUMBER_OF_TAGS|.
37 """
38 , SIDEBAR_SET, dict(
39 label = "Tagging tips",
40 help_text = "Tips visible on the ask or edit questions page about good tagging.",
41 required=False,
42 widget=Textarea(attrs={'rows': '10'})))
43
44
45 SIDEBAR_UPPER_SHOW = Setting('SIDEBAR_UPPER_SHOW', True, SIDEBAR_SET, dict(
46 label = "Show Upper Block",
47 help_text = "Check if your pages should display the upper sidebar block.",
48 required=False))
49
50 SIDEBAR_UPPER_DONT_WRAP = Setting('SIDEBAR_UPPER_DONT_WRAP', False, SIDEBAR_SET, dict(
51 label = "Don't Wrap Upper Block",
52 help_text = "Don't wrap upper block with the standard style.",
53 required=False))
54
55 SIDEBAR_UPPER_TEXT = Setting('SIDEBAR_UPPER_TEXT',
56 u"""
57 [![WebFaction logo][2]][1]
58 ## [Reliable OSQA Hosting][1]
59
60 We recommend [**WebFaction**][1] for OSQA hosting. For \
61 under $10/month their reliable servers get the job done. See our \
62 [**step-by-step setup guide**](http://wiki.osqa.net/display/docs/Installing+OSQA+on+WebFaction).
63
64 [1]: http://www.webfaction.com?affiliate=osqa
65 [2]: /m/default/media/images/webfaction.png""", SIDEBAR_SET, dict(
66 label = "Upper Block Content",
67 help_text = " The upper sidebar block. ",
68 widget=Textarea(attrs={'rows': '10'})))
69
70 SIDEBAR_UPPER_RENDER_MODE = Setting('SIDEBAR_UPPER_RENDER_MODE', 'markdown', SIDEBAR_SET, dict(
71 label = _("Upper block rendering mode"),
72 help_text = _("How to render your upper block code."),
73 widget=Select(choices=RENDER_CHOICES),
74 required=False))
75
76
77 SIDEBAR_LOWER_SHOW = Setting('SIDEBAR_LOWER_SHOW', True, SIDEBAR_SET, dict(
78 label = "Show Lower Block",
79 help_text = "Check if your pages should display the lower sidebar block.",
80 required=False))
81
82 SIDEBAR_LOWER_DONT_WRAP = Setting('SIDEBAR_LOWER_DONT_WRAP', False, SIDEBAR_SET, dict(
83 label = "Don't Wrap Lower Block",
84 help_text = "Don't wrap lower block with the standard style.",
85 required=False))
86
87 SIDEBAR_LOWER_TEXT = Setting('SIDEBAR_LOWER_TEXT',
88 u"""
89 ## Learn more about OSQA
90
91 The [**OSQA website**](http://www.osqa.net/) and [**OSQA wiki**](http://wiki.osqa.net/) \
92 are great resources to help you learn more about the OSQA open source Q&A system. \
93 [**Join the OSQA chat!**](http://meta.osqa.net/question/79/is-there-an-online-chat-room-or-irc-channel-for-osqa#302)
94 """, SIDEBAR_SET, dict(
95 label = "Lower Block Content",
96 help_text = " The lower sidebar block. ",
97 widget=Textarea(attrs={'rows': '10'})))
98
99 SIDEBAR_LOWER_RENDER_MODE = Setting('SIDEBAR_LOWER_RENDER_MODE', 'markdown', SIDEBAR_SET, dict(
100 label = _("Lower block rendering mode"),
101 help_text = _("How to render your lower block code."),
102 widget=Select(choices=RENDER_CHOICES),
103 required=False))