documentByLine added to the comments viewlet (to localized time is not working yet).

svn path=/plone.app.discussion/trunk/; revision=27119
This commit is contained in:
Timo Stollenwerk 2009-05-26 07:25:14 +00:00
parent 9b73aa76c5
commit 2b0133aa64

View File

@ -1,3 +1,5 @@
from datetime import datetime
from zope.interface import implements
from zope.component import getMultiAdapter
from zope.viewlet.interfaces import IViewlet
@ -36,6 +38,12 @@ class CommentsViewlet(BrowserView):
conversation = conversationAdapterFactory(self.context)
return conversation.items()
def format_time(self, time):
# TODO: to localized time not working!!!
#util = getToolByName(self.context, 'translation_service')
#return util.ulocalized_time(time, 1, self.context, domain='plonelocales')
return time
class AddComment(BrowserView):
"""Add a comment to a conversation
"""