web/views/cwuser.py
changeset 5224 34e669b6fd95
parent 4719 aaed3f813ef8
child 5234 e2476d78b060
--- a/web/views/cwuser.py	Tue Apr 13 12:19:24 2010 +0200
+++ b/web/views/cwuser.py	Tue Apr 13 13:21:10 2010 +0200
@@ -71,3 +71,12 @@
         if emailaddr:
             self.w(u'<foaf:mbox>%s</foaf:mbox>\n' % xml_escape(emailaddr))
         self.w(u'</foaf:Person>\n')
+
+class CWGroupInContextView(EntityView):
+    __regid__ = 'incontext'
+    __select__ = implements('CWGroup')
+    def cell_call(self, row, col):
+        self._cw.add_css('cubicweb.acl.css')
+        entity = self.cw_rset.complete_entity(row, col)
+        self.w(u'<a href="%s" class="%s">%s</a>' % (
+            entity.absolute_url(), entity.name, entity.printable_value('name')))