# HG changeset patch # User Adrien Di Mascio # Date 1234966727 -3600 # Node ID 63f4f81e19f12f459a0586d14941df6a2cee2e14 # Parent b2f962292dbfcc2f1d0f96577ab5ec7b28e95161 restore appropriate in State's incontext view, moved it into wfentities diff -r b2f962292dbf -r 63f4f81e19f1 web/views/baseviews.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'' % self.entity(row, col).absolute_url()) self.w(html_escape(self.view('textoutofcontext', self.rset, row=row, col=col))) self.w(u'') - -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 ################################################ diff -r b2f962292dbf -r 63f4f81e19f1 web/views/wfentities.py --- 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))) +