From 7d79304b33c96caa95304b4313c9f98e8a157596 Mon Sep 17 00:00:00 2001 From: Martin Aspeli Date: Mon, 18 May 2009 15:49:48 +0000 Subject: [PATCH] Update to-do and interface documentation svn path=/plone.app.discussion/trunk/; revision=27013 --- plone/app/discussion/TODO.txt | 23 ++++++++++++++++------- plone/app/discussion/interfaces.py | 15 ++++----------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/plone/app/discussion/TODO.txt b/plone/app/discussion/TODO.txt index 8202da5..2588159 100644 --- a/plone/app/discussion/TODO.txt +++ b/plone/app/discussion/TODO.txt @@ -7,11 +7,6 @@ plone.app.discussion to-do [ ] ++comments++ namespace traversal adapter - [ ] Acquisition wrapping - should it happen on: - - - Conversation retrieval methods (get, __getitem__, values etc)? - - IConversation adapter lookup? - [ ] Implement plone.indexer indexers for comments, filling standard metadata - Note discrepancy between Python datetime and indexing expecting a Zope 2 @@ -19,14 +14,28 @@ plone.app.discussion to-do [ ] Implement plone.indexer indexers for commented-upon content - - Unique set of commentators + - Unique set of commentators - Number of comments - Date/time of most recent comment - Needs to reindex when comment is added/removed (IContainerModifiedEvent) + These have to be reindexed when comment is added/removed + (IContainerModifiedEvent). They also need to be set up in catalog.xml. [ ] Add tests for conversation dict API [ ] Add tests for IReplies adapters + + [ ] Add UI + + - comment display should be a viewlet overriding the standard comments + viewlet + + - comment forms should use z3c.form subforms and plone.z3cform's + ExtensibleForm support + + [ ] Add control panel + + - install plone.registry records using registry.xml + - create control panel using helper class in plone.app.registry [ ] Make sure a catalog Clear & Rebuild doesn't lose all comments diff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py index d2bc859..a1053c9 100644 --- a/plone/app/discussion/interfaces.py +++ b/plone/app/discussion/interfaces.py @@ -15,13 +15,6 @@ class IDiscussionSettings(Interface): description=_(u"Use this setting to enable or disable comments globally"), default=True) - index_comments = schema.Bool(title=_(u"Index comments"), - description=_(u"Enable this option to ensure that comments are searchable. " - "Turning this off may improve performance for sites with large " - "volumes of comments that do not wish to make them searcahble using " - "the standard search tools."), - default=True) - class IConversation(IIterableMapping): """A conversation about a content object. @@ -49,16 +42,16 @@ class IConversation(IIterableMapping): last_comment_date = schema.Date(title=_(u"Date of the most recent comment"), readonly=True) commentators = schema.Set(title=_(u"The set of unique commentators (usernames)"), readonly=True) - def __delitem__(key): - """Delete the comment with the given key. The key is a long id. - """ - def addComment(comment): """Adds a new comment to the list of comments, and returns the comment id that was assigned. The comment_id property on the comment will be set accordingly. """ + def __delitem__(key): + """Delete the comment with the given key. The key is a long id. + """ + def getComments(start=0, size=None): """Return a batch of comment objects for rendering. The 'start' parameter is the id of the comment from which to start the batch.