16 # You should have received a copy of the GNU Lesser General Public License along |
16 # You should have received a copy of the GNU Lesser General Public License along |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
18 """Specific views for users and groups""" |
18 """Specific views for users and groups""" |
19 |
19 |
20 __docformat__ = "restructuredtext en" |
20 __docformat__ = "restructuredtext en" |
|
21 _ = unicode |
21 |
22 |
22 import hashlib |
23 import hashlib |
23 |
24 |
24 from logilab.mtconverter import xml_escape |
25 from logilab.mtconverter import xml_escape |
25 |
26 |
105 class CWGroupMainTab(tabs.PrimaryTab): |
106 class CWGroupMainTab(tabs.PrimaryTab): |
106 __regid__ = 'cwgroup-main' |
107 __regid__ = 'cwgroup-main' |
107 __select__ = tabs.PrimaryTab.__select__ & is_instance('CWGroup') |
108 __select__ = tabs.PrimaryTab.__select__ & is_instance('CWGroup') |
108 |
109 |
109 def render_entity_attributes(self, entity): |
110 def render_entity_attributes(self, entity): |
|
111 _ = self._cw._ |
110 rql = 'Any U, FN, LN, CD, LL ORDERBY L WHERE U in_group G, ' \ |
112 rql = 'Any U, FN, LN, CD, LL ORDERBY L WHERE U in_group G, ' \ |
111 'U login L, U firstname FN, U surname LN, U creation_date CD, ' \ |
113 'U login L, U firstname FN, U surname LN, U creation_date CD, ' \ |
112 'U last_login_time LL, G eid %(x)s' |
114 'U last_login_time LL, G eid %(x)s' |
113 rset = self._cw.execute(rql, {'x': entity.eid}) |
115 rset = self._cw.execute(rql, {'x': entity.eid}) |
114 headers = (_(u'user'), _(u'first name'), _(u'last name'), |
116 headers = (_(u'user'), _(u'first name'), _(u'last name'), |