From 2b0133aa64a6f979433fd3139e949d1fcd52ce46 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 26 May 2009 07:25:14 +0000 Subject: [PATCH] documentByLine added to the comments viewlet (to localized time is not working yet). svn path=/plone.app.discussion/trunk/; revision=27119 --- plone/app/discussion/browser/comments.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 6fd0870..eff5eb3 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -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 """