web/views/baseviews.py
branchstable
changeset 1882 ce662160bb46
parent 1760 6b97d286eb5a
child 1977 606923dff11b
--- a/web/views/baseviews.py	Wed May 20 14:19:48 2009 +0200
+++ b/web/views/baseviews.py	Wed May 20 14:19:53 2009 +0200
@@ -11,8 +11,8 @@
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 #from __future__ import with_statement
-
 __docformat__ = "restructuredtext en"
+_ = unicode
 
 from rql import nodes
 
@@ -23,7 +23,6 @@
 from cubicweb.view import EntityView, AnyRsetView, View
 from cubicweb.common.uilib import cut, printable_value
 
-_ = unicode
 
 class NullView(AnyRsetView):
     """default view when no result has been found"""
@@ -204,9 +203,10 @@
     def cell_call(self, row, col):
         entity = self.entity(row, col)
         desc = cut(entity.dc_description(), 50)
-        self.w(u'<a href="%s" title="%s">' % (html_escape(entity.absolute_url()),
-                                              html_escape(desc)))
-        self.w(html_escape(self.view('textincontext', self.rset, row=row, col=col)))
+        self.w(u'<a href="%s" title="%s">' % (
+            html_escape(entity.absolute_url()), html_escape(desc)))
+        self.w(html_escape(self.view('textincontext', self.rset,
+                                     row=row, col=col)))
         self.w(u'</a>')
 
 
@@ -214,8 +214,12 @@
     id = 'outofcontext'
 
     def cell_call(self, row, col):
-        self.w(u'<a href="%s">' % self.entity(row, col).absolute_url())
-        self.w(html_escape(self.view('textoutofcontext', self.rset, row=row, col=col)))
+        entity = self.entity(row, col)
+        desc = cut(entity.dc_description(), 50)
+        self.w(u'<a href="%s" title="%s">' % (
+            html_escape(entity.absolute_url()), html_escape(desc)))
+        self.w(html_escape(self.view('textoutofcontext', self.rset,
+                                     row=row, col=col)))
         self.w(u'</a>')