]> git.openstreetmap.org Git - osqa.git/blob - forum/settings/moderation.py
d6f1b3ddb5a8ffdaae3262a2bfcabf75341950cc
[osqa.git] / forum / settings / moderation.py
1 from base import Setting, SettingSet
2 from forms import StringListWidget
3
4 from django.utils.encoding import smart_unicode
5 from django.utils.translation import ugettext_lazy as _
6 from django.forms.widgets import Textarea
7
8 MODERATION_SET = SettingSet('moderation', _('Moderation settings'), _("Define the moderation workflow of your site"), 100)
9
10 USE_CANNED_COMMENTS = Setting('USE_CANNED_COMMENTS', True, MODERATION_SET, dict(
11 label = _("Use canned comments"),
12 help_text = _("If you check, the canned comments feature will be activated, allowing moderators to use canned patterns for their comments."),
13 required=False))
14
15 CANNED_COMMENTS = Setting('CANNED_COMMENTS',
16 [
17 "We require all postings to have a clear, specific QUESTION in the title field. Please edit this right away to rephrase the title as a proper question.",
18 ],
19 MODERATION_SET, dict(
20 label = _("Canned comments"),
21 help_text = _("""
22 <p>Create some canned comments to be used for easier moderation. You can access the {{ post }} and {{ settings }} variables.</p>
23 <p>If you want to access the current post author username you can use {{ post.author }}, for the question title use {{ post.title }}.</p>
24 <p>To get the application title use {{ settings.APP_TITLE }}. All settings are accessible through the settings object.</p>
25 """),
26 widget=StringListWidget))
27
28 FLAG_TYPES = Setting('FLAG_TYPES',
29 ["Spam", "Advertising", "Offensive, Abusive, or Inappropriate", "Content violates terms of use", "Copyright Violation",
30  "Misleading", "Someone is not being nice", "Not relevant/off-topic", "Other"],
31 MODERATION_SET, dict(
32 label = _("Flag Reasons"),
33 help_text = _("Create some flag reasons to use in the flag post popup."),
34 widget=StringListWidget))
35
36
37 CLOSE_TYPES = Setting('CLOSE_TYPES',
38 ["Duplicate Question", "Question is off-topic or not relevant", "Too subjective and argumentative",
39  "The question is answered, right answer was accepted", "Problem is not reproducible or outdated", "Other"],
40 MODERATION_SET, dict(
41 label = _("Close Reasons"),
42 help_text = _("Create some close reasons to use in the close question popup."),
43 widget=StringListWidget))