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