Move IDiscussionSettings to the bottom of the interfaces file.
This commit is contained in:
parent
943661cf42
commit
1920f1d4d5
@ -9,128 +9,6 @@ from zope import schema
|
||||
from plone.app.discussion import PloneAppDiscussionMessageFactory as _
|
||||
|
||||
|
||||
class IDiscussionSettings(Interface):
|
||||
"""Global discussion settings. This describes records stored in the
|
||||
configuration registry and obtainable via plone.registry.
|
||||
"""
|
||||
|
||||
# Todo: Write a short hint, that other discussion related options can
|
||||
# be found elsewhere in the Plone control panel:
|
||||
#
|
||||
# - Types control panel: Allow comments on content types
|
||||
# - Search control panel: Show comments in search results
|
||||
|
||||
globally_enabled = schema.Bool(
|
||||
title=_(u"label_globally_enabled",
|
||||
default=u"Globally enable comments"),
|
||||
description=_(u"help_globally_enabled",
|
||||
default=u"If selected, users are able to post comments on the "
|
||||
"site. Though, you have to enable comments for "
|
||||
"specific content types, folders or content objects "
|
||||
"before users will be able to post comments."),
|
||||
required=False,
|
||||
default=False,
|
||||
)
|
||||
|
||||
anonymous_comments = schema.Bool(
|
||||
title=_(u"label_anonymous_comments",
|
||||
default="Enable anonymous comments"),
|
||||
description=_(u"help_anonymous_comments",
|
||||
default=u"If selected, anonymous users are able to post "
|
||||
"comments without loggin in. It is highly "
|
||||
"recommended to use a captcha solution to prevent "
|
||||
"spam if this setting is enabled."),
|
||||
required=False,
|
||||
default=False,
|
||||
)
|
||||
|
||||
moderation_enabled = schema.Bool(
|
||||
title=_(u"label_moderation_enabled",
|
||||
default="Enable comment moderation"),
|
||||
description=_(u"help_moderation_enabled",
|
||||
default=u"If selected, comments will enter a 'Pending' state "
|
||||
"in which they are invisible to the public. A user "
|
||||
"with the 'Review comments' permission ('Reviewer' "
|
||||
"or 'Manager') can approve comments to make them "
|
||||
"visible to the public. If you want to enable a "
|
||||
"custom comment workflow, you have to go to the "
|
||||
"types control panel."),
|
||||
required=False,
|
||||
default=False,
|
||||
)
|
||||
|
||||
text_transform = schema.Choice(
|
||||
title=_(u"label_text_transform",
|
||||
default="Comment text transform"),
|
||||
description=_(u"help_text_transform",
|
||||
default=u"Use this setting to choose if the comment text " +
|
||||
"should be transformed in any way. You can choose "
|
||||
"between 'Plain text' and 'Intelligent text'. " +
|
||||
"'Intelligent text' converts plain text into HTML " +
|
||||
"where line breaks and indentation is preserved, " +
|
||||
"and web and email addresses are made into " +
|
||||
"clickable links."),
|
||||
required=True,
|
||||
default='text/plain',
|
||||
vocabulary='plone.app.discussion.vocabularies.TextTransformVocabulary',
|
||||
)
|
||||
|
||||
captcha = schema.Choice(
|
||||
title=_(u"label_captcha",
|
||||
default="Captcha"),
|
||||
description=_(u"help_captcha",
|
||||
default=u"Use this setting to enable or disable Captcha "
|
||||
"validation for comments. Install "
|
||||
"plone.formwidget.captcha, "
|
||||
"plone.formwidget.recaptcha, collective.akismet, or "
|
||||
"collective.z3cform.norobots if there are no options "
|
||||
"available."),
|
||||
required=True,
|
||||
default='disabled',
|
||||
vocabulary='plone.app.discussion.vocabularies.CaptchaVocabulary',
|
||||
)
|
||||
|
||||
show_commenter_image = schema.Bool(
|
||||
title=_(u"label_show_commenter_image",
|
||||
default=u"Show commenter image"),
|
||||
description=_(u"help_show_commenter_image",
|
||||
default=u"If selected, an image of the user is shown next to "
|
||||
"the comment."),
|
||||
required=False,
|
||||
default=True,
|
||||
)
|
||||
|
||||
moderator_notification_enabled = schema.Bool(
|
||||
title=_(u"label_moderator_notification_enabled",
|
||||
default=u"Enable moderator email notification"),
|
||||
description=_(u"help_moderator_notification_enabled",
|
||||
default=u"If selected, the moderator is notified if a comment "
|
||||
"needs attention. The moderator email address can " +
|
||||
"be found in the 'Mail settings' control panel "
|
||||
"(Site 'From' address)"),
|
||||
required=False,
|
||||
default=False,
|
||||
)
|
||||
|
||||
moderator_email = schema.ASCIILine(
|
||||
title=_(u'label_moderator_email',
|
||||
default=u'Moderator Email Address'),
|
||||
description=_(u'help_moderator_email',
|
||||
default=u"Address to which moderator notifications "
|
||||
u"will be sent."),
|
||||
required=False,
|
||||
)
|
||||
|
||||
user_notification_enabled = schema.Bool(
|
||||
title=_(u"label_user_notification_enabled",
|
||||
default=u"Enable user email notification"),
|
||||
description=_(u"help_user_notification_enabled",
|
||||
default=u"If selected, users can choose to be notified "
|
||||
"of new comments by email."),
|
||||
required=False,
|
||||
default=False)
|
||||
|
||||
|
||||
class IConversation(IIterableMapping):
|
||||
"""A conversation about a content object.
|
||||
|
||||
@ -323,6 +201,128 @@ class ICommentingTool(Interface):
|
||||
"""
|
||||
|
||||
|
||||
class IDiscussionSettings(Interface):
|
||||
"""Global discussion settings. This describes records stored in the
|
||||
configuration registry and obtainable via plone.registry.
|
||||
"""
|
||||
|
||||
# Todo: Write a short hint, that other discussion related options can
|
||||
# be found elsewhere in the Plone control panel:
|
||||
#
|
||||
# - Types control panel: Allow comments on content types
|
||||
# - Search control panel: Show comments in search results
|
||||
|
||||
globally_enabled = schema.Bool(
|
||||
title=_(u"label_globally_enabled",
|
||||
default=u"Globally enable comments"),
|
||||
description=_(u"help_globally_enabled",
|
||||
default=u"If selected, users are able to post comments on the "
|
||||
"site. Though, you have to enable comments for "
|
||||
"specific content types, folders or content objects "
|
||||
"before users will be able to post comments."),
|
||||
required=False,
|
||||
default=False,
|
||||
)
|
||||
|
||||
anonymous_comments = schema.Bool(
|
||||
title=_(u"label_anonymous_comments",
|
||||
default="Enable anonymous comments"),
|
||||
description=_(u"help_anonymous_comments",
|
||||
default=u"If selected, anonymous users are able to post "
|
||||
"comments without loggin in. It is highly "
|
||||
"recommended to use a captcha solution to prevent "
|
||||
"spam if this setting is enabled."),
|
||||
required=False,
|
||||
default=False,
|
||||
)
|
||||
|
||||
moderation_enabled = schema.Bool(
|
||||
title=_(u"label_moderation_enabled",
|
||||
default="Enable comment moderation"),
|
||||
description=_(u"help_moderation_enabled",
|
||||
default=u"If selected, comments will enter a 'Pending' state "
|
||||
"in which they are invisible to the public. A user "
|
||||
"with the 'Review comments' permission ('Reviewer' "
|
||||
"or 'Manager') can approve comments to make them "
|
||||
"visible to the public. If you want to enable a "
|
||||
"custom comment workflow, you have to go to the "
|
||||
"types control panel."),
|
||||
required=False,
|
||||
default=False,
|
||||
)
|
||||
|
||||
text_transform = schema.Choice(
|
||||
title=_(u"label_text_transform",
|
||||
default="Comment text transform"),
|
||||
description=_(u"help_text_transform",
|
||||
default=u"Use this setting to choose if the comment text " +
|
||||
"should be transformed in any way. You can choose "
|
||||
"between 'Plain text' and 'Intelligent text'. " +
|
||||
"'Intelligent text' converts plain text into HTML " +
|
||||
"where line breaks and indentation is preserved, " +
|
||||
"and web and email addresses are made into " +
|
||||
"clickable links."),
|
||||
required=True,
|
||||
default='text/plain',
|
||||
vocabulary='plone.app.discussion.vocabularies.TextTransformVocabulary',
|
||||
)
|
||||
|
||||
captcha = schema.Choice(
|
||||
title=_(u"label_captcha",
|
||||
default="Captcha"),
|
||||
description=_(u"help_captcha",
|
||||
default=u"Use this setting to enable or disable Captcha "
|
||||
"validation for comments. Install "
|
||||
"plone.formwidget.captcha, "
|
||||
"plone.formwidget.recaptcha, collective.akismet, or "
|
||||
"collective.z3cform.norobots if there are no options "
|
||||
"available."),
|
||||
required=True,
|
||||
default='disabled',
|
||||
vocabulary='plone.app.discussion.vocabularies.CaptchaVocabulary',
|
||||
)
|
||||
|
||||
show_commenter_image = schema.Bool(
|
||||
title=_(u"label_show_commenter_image",
|
||||
default=u"Show commenter image"),
|
||||
description=_(u"help_show_commenter_image",
|
||||
default=u"If selected, an image of the user is shown next to "
|
||||
"the comment."),
|
||||
required=False,
|
||||
default=True,
|
||||
)
|
||||
|
||||
moderator_notification_enabled = schema.Bool(
|
||||
title=_(u"label_moderator_notification_enabled",
|
||||
default=u"Enable moderator email notification"),
|
||||
description=_(u"help_moderator_notification_enabled",
|
||||
default=u"If selected, the moderator is notified if a comment "
|
||||
"needs attention. The moderator email address can " +
|
||||
"be found in the 'Mail settings' control panel "
|
||||
"(Site 'From' address)"),
|
||||
required=False,
|
||||
default=False,
|
||||
)
|
||||
|
||||
moderator_email = schema.ASCIILine(
|
||||
title=_(u'label_moderator_email',
|
||||
default=u'Moderator Email Address'),
|
||||
description=_(u'help_moderator_email',
|
||||
default=u"Address to which moderator notifications "
|
||||
u"will be sent."),
|
||||
required=False,
|
||||
)
|
||||
|
||||
user_notification_enabled = schema.Bool(
|
||||
title=_(u"label_user_notification_enabled",
|
||||
default=u"Enable user email notification"),
|
||||
description=_(u"help_user_notification_enabled",
|
||||
default=u"If selected, users can choose to be notified "
|
||||
"of new comments by email."),
|
||||
required=False,
|
||||
default=False)
|
||||
|
||||
|
||||
class IDiscussionLayer(Interface):
|
||||
"""Request marker installed via browserlayer.xml.
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user