9 from logilab.mtconverter import html_escape |
9 from logilab.mtconverter import html_escape |
10 |
10 |
11 from cubicweb.selectors import one_line_rset, implements, match_user_groups |
11 from cubicweb.selectors import one_line_rset, implements, match_user_groups |
12 from cubicweb.view import EntityView |
12 from cubicweb.view import EntityView |
13 from cubicweb.web import uicfg, action |
13 from cubicweb.web import uicfg, action |
14 from cubicweb.web.views.baseviews import PrimaryView |
14 from cubicweb.web.views import primary |
15 |
15 |
16 |
16 |
17 uicfg.rcategories.tag_relation('secondary', ('CWUser', 'firstname', '*'), 'subject') |
17 uicfg.rcategories.tag_relation('secondary', ('CWUser', 'firstname', '*'), 'subject') |
18 uicfg.rcategories.tag_relation('secondary', ('CWUser', 'surname', '*'), 'subject') |
18 uicfg.rcategories.tag_relation('secondary', ('CWUser', 'surname', '*'), 'subject') |
19 uicfg.rcategories.tag_relation('metadata', ('CWUser', 'last_login_time', '*'), 'subject') |
19 uicfg.rcategories.tag_relation('metadata', ('CWUser', 'last_login_time', '*'), 'subject') |
40 def url(self): |
40 def url(self): |
41 login = self.rset.get_entity(self.row or 0, self.col or 0).login |
41 login = self.rset.get_entity(self.row or 0, self.col or 0).login |
42 return self.build_url('cwuser/%s'%login, vid='epropertiesform') |
42 return self.build_url('cwuser/%s'%login, vid='epropertiesform') |
43 |
43 |
44 |
44 |
45 class CWUserPrimaryView(PrimaryView): |
45 class CWUserPrimaryView(primary.PrimaryView): |
46 __select__ = implements('CWUser') |
46 __select__ = implements('CWUser') |
47 |
47 |
48 def content_title(self, entity): |
48 def content_title(self, entity): |
49 return entity.name() |
49 return entity.name() |
50 |
50 |