Redo the controlpanel UI.

svn path=/plone.app.discussion/trunk/; revision=33284
This commit is contained in:
Timo Stollenwerk 2010-01-22 19:17:46 +00:00
parent ebf12022eb
commit ac3ade24f6
2 changed files with 31 additions and 18 deletions

View File

@ -17,13 +17,13 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
description = _(u"""Some discussion related settings are not located
in the Discussion Control Panel.
To enable moderation for content types, go to the
Types Control Panel, and enable moderation for a
specific content type.
To enable comments for a specific content type,
go to the Types Control Panel of this type and
choose 'enable moderation'.
To enable comment moderation, go to the Types
Control Panel, choose "Comment", and set the
workflow to "Comment Review Workflow".
To enable the moderation workflow for comments,
go to the Types Control Panel, choose "Comment"
and set workflow to "Comment Review Workflow".
""")
def updateFields(self):
@ -34,9 +34,9 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
def updateWidgets(self):
super(DiscussionSettingsEditForm, self).updateWidgets()
self.widgets['globally_enabled'].label = u""
self.widgets['anonymous_comments'].label = u""
self.widgets['show_commenter_image'].label = u""
self.widgets['globally_enabled'].label = u"Enable Comments"
self.widgets['anonymous_comments'].label = u"Anonymous Comments"
self.widgets['show_commenter_image'].label = u"Commenter Image"
class DiscussionSettingsControlPanel(controlpanel.ControlPanelFormWrapper):

View File

@ -18,24 +18,37 @@ class IDiscussionSettings(Interface):
# - Search control panel: Show comments in search results
globally_enabled = schema.Bool(title=_(u"Globally enable comments"),
default=True,
required=False)
description=_(u"""If selected, user can post
comments."""),
required=False,
default=True)
anonymous_comments = schema.Bool(title=_(u"Enable anonymous comments"),
default=False,
required=False)
description=_(u"""If selected, anonymous users are
able to post comments without
logging in. It is highly
recommended to use a captcha
solution to prevent spam if
this setting is enabled."""),
required=False,
default=False)
captcha = schema.Choice(title=_(u"Captcha"),
description=_(u"""Use this setting to enable or disable captcha validation for comments.
If no captcha options are available, install captcha solutions like
plone.formwidget.captcha or plone.formwidget.recaptcha."""),
description=_(u"""Use this setting to enable or disable
captcha validation for comments. If no
captcha options are currently available,
install plone.formwidget.captcha or
plone.formwidget.recaptcha."""),
required=True,
default='disabled',
vocabulary='plone.app.discussion.vocabularies.CaptchaVocabulary',)
show_commenter_image = schema.Bool(title=_(u"Show commenter image"),
default=True,
required=False)
description=_(u"""If selected, an image of the
user is shown next to the
comment."""),
required=False,
default=True)
class IConversation(IIterableMapping):
"""A conversation about a content object.