up
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 04 Aug 2011 17:29:05 +0200
changeset 4 4f4263d09b01
parent 3 9c6f2d721ae5
child 5 df393d72f0d4
up
astreampart.diff
--- a/astreampart.diff	Thu Aug 04 17:13:25 2011 +0200
+++ b/astreampart.diff	Thu Aug 04 17:29:05 2011 +0200
@@ -117,7 +117,7 @@
 diff --git a/views.py b/views.py
 --- a/views.py
 +++ b/views.py
-@@ -2,18 +2,20 @@ from cubicweb.selectors import is_instan
+@@ -2,30 +2,30 @@ from cubicweb.selectors import is_instan
  from cubicweb.view import EntityView
  
  class AStreamView(EntityView):
@@ -138,11 +138,18 @@
      __select__ = EntityView.__select__ & adaptable('IActivityStreamItem')
  
      def cell_call(self, row, col):
-@@ -25,7 +27,5 @@ class AStreamItemView(EntityView):
+         self._cw.add_css('cubes.astream.css')
+         entity = self.cw_rset.get_entity(row, col)
+-        ablock = entity.dc_creator()
+         activity = entity.cw_adapt_to('IActivityStreamItem')
+         self.w(u'<div class="activitystream">'
                 u'<span class="author">%s</span>'
                 u'<span class="msgtxt">%s</span>'
                 u'<span class="meta"><a href="%s">%s</a></span>'
-                u'</div>' % (ablock, activity.content,
-                             entity.absolute_url(), activity.date))
+-               u'</div>' % (ablock, activity.content,
+-                            entity.absolute_url(), activity.date))
 -
 -
++               u'</div>' % (activity.actor, activity.content,
++                            entity.absolute_url(),
++                            self._cw.format_date(activity.date, time=True)))