Maj fichiers de traductions.
[Plinn.git] / skins / generic / makeGrufTree.py
1 ##parameters=
2 aclu = context.acl_users
3 groupPrefix = aclu.getGroupPrefix()
4 gtool = context.portal_groups
5 from ZTUtils import SimpleTreeMaker
6
7 def getGroups(object) :
8 """ return children groups """
9 if object is aclu :
10 return gtool.getGroups(gtool.getRootGroups())
11 else :
12 return gtool.getGroups(gtool.getGroupsOfGroup(object.id))
13
14 stm = SimpleTreeMaker("group_tree")
15 stm.setChildAccess(function = getGroups)
16 stm.setIdAttr('id')
17
18 tree, rows = stm.cookieTree(aclu)
19 return {'tree' : tree, 'rows' : rows}