From ac3ade24f62f030be357381442992460cdc3b9ef Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 22 Jan 2010 19:17:46 +0000 Subject: [PATCH] Redo the controlpanel UI. svn path=/plone.app.discussion/trunk/; revision=33284 --- plone/app/discussion/browser/controlpanel.py | 18 ++++++------ plone/app/discussion/interfaces.py | 31 ++++++++++++++------ 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/plone/app/discussion/browser/controlpanel.py b/plone/app/discussion/browser/controlpanel.py index 708f30d..59cf4b8 100644 --- a/plone/app/discussion/browser/controlpanel.py +++ b/plone/app/discussion/browser/controlpanel.py @@ -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): diff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py index 2b02f19..31a0e38 100644 --- a/plone/app/discussion/interfaces.py +++ b/plone/app/discussion/interfaces.py @@ -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.