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

View File

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