~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2010-08-28 23:35:29 UTC
  • mfrom: (11462.1.4 disable-gmaps-0)
  • Revision ID: launchpad@pqm.canonical.com-20100828233529-7l4saytfk906c1vm
[r=lifeless][ui=none][bug 624981] Add a rudimentary feature flag to
        disable Google maps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
    LaunchpadRadioWidget,
70
70
    )
71
71
from lp.app.errors import UnexpectedFormData
 
72
from lp.registry.browser import MapMixin
72
73
from lp.registry.browser.branding import BrandingChangeView
73
74
from lp.registry.interfaces.mailinglist import (
74
75
    IMailingList,
1031
1032
        self.request.response.addInfoNotification(msg)
1032
1033
 
1033
1034
 
1034
 
class TeamMapView(LaunchpadView):
 
1035
class TeamMapView(MapMixin, LaunchpadView):
1035
1036
    """Show all people with known locations on a map.
1036
1037
 
1037
1038
    Also provides links to edit the locations of people in the team without
1044
1045
    def initialize(self):
1045
1046
        # Tell our base-layout to include Google's gmap2 javascript so that
1046
1047
        # we can render the map.
1047
 
        if self.mapped_participants_count > 0:
 
1048
        if self.gmap2_enabled and self.mapped_participants_count > 0:
1048
1049
            self.request.needs_gmap2 = True
1049
1050
 
1050
1051
    @cachedproperty