From dada11c43c7dd001a8f58674890523ce09cf3d78 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sun, 7 Jun 2009 08:47:14 +0000 Subject: [PATCH] show_commenter_image record added to the discussion control panel. svn path=/plone.app.discussion/trunk/; revision=27335 --- plone/app/discussion/interfaces.py | 5 ++++- plone/app/discussion/tests/test_controlpanel.py | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py index f86a43f..f516925 100644 --- a/plone/app/discussion/interfaces.py +++ b/plone/app/discussion/interfaces.py @@ -21,10 +21,13 @@ class IDiscussionSettings(Interface): description=_(u"Use this setting to enable or disable comments globally."), default=True) - anonymous_comments = schema.Bool(title=_(u"Anonymous Comments"), + anonymous_comments = schema.Bool(title=_(u"Anonymous comments"), description=_(u"Use this setting to enable or disable posting comments as anonymous visitor."), default=False) + show_commenter_image = schema.Bool(title=_(u"Show commenter image"), + description=_(u"Use this setting to enable or disable showing the commenter's image next to his/her comments."), + default=True) class IConversation(IIterableMapping): """A conversation about a content object. diff --git a/plone/app/discussion/tests/test_controlpanel.py b/plone/app/discussion/tests/test_controlpanel.py index f2c2961..b9908f9 100644 --- a/plone/app/discussion/tests/test_controlpanel.py +++ b/plone/app/discussion/tests/test_controlpanel.py @@ -38,5 +38,12 @@ class RegistryTest(PloneTestCase): self.failUnless('anonymous_comments' in IDiscussionSettings) self.assertEquals(self.registry['plone.app.discussion.interfaces.IDiscussionSettings.anonymous_comments'], False) + def test_show_commenter_image(self): + # Check show_commenter_image record + show_commenter_image = self.registry.records['plone.app.discussion.interfaces.IDiscussionSettings.show_commenter_image'] + + self.failUnless('show_commenter_image' in IDiscussionSettings) + self.assertEquals(self.registry['plone.app.discussion.interfaces.IDiscussionSettings.show_commenter_image'], True) + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) \ No newline at end of file