web/views/baseviews.py
changeset 3720 5376aaadd16b
parent 3451 6b46d73823f5
parent 3682 9b62c5887639
child 3890 d7a270f50f54
equal deleted inserted replaced
3678:29f74716fd70 3720:5376aaadd16b
   113 # XXX deprecated
   113 # XXX deprecated
   114 class SecondaryView(EntityView):
   114 class SecondaryView(EntityView):
   115     __regid__ = 'secondary'
   115     __regid__ = 'secondary'
   116     title = _('secondary')
   116     title = _('secondary')
   117 
   117 
   118     def cell_call(self, row, col):
   118     def cell_call(self, row, col, **kwargs):
   119         """the secondary view for an entity
   119         """the secondary view for an entity
   120         secondary = icon + view(oneline)
   120         secondary = icon + view(oneline)
   121         """
   121         """
   122         entity = self.cw_rset.get_entity(row, col)
   122         entity = self.cw_rset.get_entity(row, col)
   123         self.w(u' ')
   123         self.w(u' ')
   126 
   126 
   127 class OneLineView(EntityView):
   127 class OneLineView(EntityView):
   128     __regid__ = 'oneline'
   128     __regid__ = 'oneline'
   129     title = _('oneline')
   129     title = _('oneline')
   130 
   130 
   131     def cell_call(self, row, col):
   131     def cell_call(self, row, col, **kwargs):
   132         """the one line view for an entity: linked text view
   132         """the one line view for an entity: linked text view
   133         """
   133         """
   134         entity = self.cw_rset.get_entity(row, col)
   134         entity = self.cw_rset.get_entity(row, col)
   135         self.w(u'<a href="%s">' % xml_escape(entity.absolute_url()))
   135         self.w(u'<a href="%s">' % xml_escape(entity.absolute_url()))
   136         self.w(xml_escape(self._cw.view('text', self.cw_rset, row=row, col=col)))
   136         self.w(xml_escape(self._cw.view('text', self.cw_rset, row=row, col=col)))