restore appropriate in State's incontext view, moved it into wfentities tls-sprint
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 18 Feb 2009 15:18:47 +0100
branchtls-sprint
changeset 795 63f4f81e19f1
parent 794 b2f962292dbf
child 796 62253c7fe5ba
restore appropriate in State's incontext view, moved it into wfentities
web/views/baseviews.py
web/views/wfentities.py
--- a/web/views/baseviews.py	Wed Feb 18 15:17:28 2009 +0100
+++ b/web/views/baseviews.py	Wed Feb 18 15:18:47 2009 +0100
@@ -443,19 +443,6 @@
         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)))
         self.w(u'</a>')
-
-class NotClickableInContextView(EntityView):
-    id = 'incontext'
-
-    def cell_call(self, row, col):
-        self.w(html_escape(self.view('textincontext', self.rset, row=row, col=col)))
-
-## class NotClickableOutOfContextView(EntityView):
-##     id = 'outofcontext'
-
-##     def cell_call(self, row, col):
-##         self.w(html_escape(self.view('textoutofcontext', self.rset, row=row)))
-
             
 # list and table related views ################################################
     
--- 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)))
+