show_commenter_image record added to the discussion control panel.

svn path=/plone.app.discussion/trunk/; revision=27335
This commit is contained in:
Timo Stollenwerk 2009-06-07 08:47:14 +00:00
parent 8bfa2cfa3f
commit dada11c43c
2 changed files with 11 additions and 1 deletions

View File

@ -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.

View File

@ -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__)