web/views/wfentities.py
branchtls-sprint
changeset 795 63f4f81e19f1
parent 728 a95b284150d1
child 822 e3d8db01f3f5
--- a/web/views/wfentities.py	Wed Feb 18 15:17:28 2009 +0100
+++ b/web/views/wfentities.py	Wed Feb 18 15:18:47 2009 +0100
@@ -1,7 +1,7 @@
 """html view for workflow related entities
 
 :organization: Logilab
-:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 __docformat__ = "restructuredtext en"
@@ -16,3 +16,14 @@
     def cell_call(self, row, col, cellvid=None):
         entity = self.entity(row, col)
         self.w(entity.printable_value('comment'))
+
+
+class StateInContextView(EntityView):
+    """convenience trick, State's incontext view should not be clickable"""
+    id = 'incontext'
+    __select__ = implements('State')
+    
+    def cell_call(self, row, col):
+        self.w(html_escape(self.view('textincontext', self.rset,
+                                     row=row, col=col)))
+