~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/team.py

[rs=buildbot-poller] automatic merge from stable. Revisions: 14451,
        14452, 14453, 14454, 14455 included.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
    'TeamContactAddressView',
14
14
    'TeamEditMenu',
15
15
    'TeamEditView',
16
 
    'TeamHierarchyView',
17
16
    'TeamIndexMenu',
18
17
    'TeamJoinView',
19
18
    'TeamLeaveView',
1254
1253
    """An XML dump of the locations of limited number of team members."""
1255
1254
 
1256
1255
 
1257
 
class TeamHierarchyView(LaunchpadView):
1258
 
    """View for ~team/+teamhierarchy page."""
1259
 
 
1260
 
    @property
1261
 
    def label(self):
1262
 
        return 'Team relationships for ' + self.context.displayname
1263
 
 
1264
 
    @property
1265
 
    def has_sub_teams(self):
1266
 
        return self.context.sub_teams.count() > 0
1267
 
 
1268
 
    @property
1269
 
    def has_super_teams(self):
1270
 
        return self.context.super_teams.count() > 0
1271
 
 
1272
 
    @property
1273
 
    def has_only_super_teams(self):
1274
 
        return self.has_super_teams and not self.has_sub_teams
1275
 
 
1276
 
    @property
1277
 
    def has_only_sub_teams(self):
1278
 
        return not self.has_super_teams and self.has_sub_teams
1279
 
 
1280
 
    @property
1281
 
    def has_relationships(self):
1282
 
        return self.has_sub_teams or self.has_super_teams
1283
 
 
1284
 
 
1285
1256
class TeamNavigation(PersonNavigation):
1286
1257
 
1287
1258
    usedfor = ITeam