Merge lp:~edwin-grubbs/launchpad/bug-412519-team-page into lp:launchpad

Proposed by Edwin Grubbs
Status: Merged
Merged at revision: not available
Proposed branch: lp:~edwin-grubbs/launchpad/bug-412519-team-page
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~edwin-grubbs/launchpad/bug-412519-team-page
Reviewer Review Type Date Requested Status
Martin Albisetti (community) ui Approve
Guilherme Salgado (community) code Approve
Review via email: mp+10536@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (3.5 KiB)

Summary
-------

Convert the $team/+index page to LP3.0.

I've uploaded before and after screenshots here:
  https://dev.launchpad.net/TeamIndexPage

This branch does not address the following feedback items, which will be
taken care of in a followup branch:
 * List all members.
 * Show members' timezones.
 * Recently approved query shouldn't show users approved a long time ago
 * even if they are the most recent.
 * "Contact this team" link should be moved into the action menu.
 * Add portlet with info from the karmacache.

Implementation details
----------------------

Moved the contact-details and subteam-of portlets into macros
and moved the mailinglist and membership portlets into separate
templates to make reorganizing the portlets easier. I started off
making new templates, but then switched to macros which were quicker
to edit.
    lib/lp/registry/templates/person-macros.pt
    lib/lp/registry/templates/team-portlet-mailinglist.pt
    lib/lp/registry/templates/team-portlet-membership.pt
    lib/lp/registry/templates/team-index.pt

The map wouldn't load because the base layout wouldn't include the js
even when needs_gmap2 was set to True.
    lib/lp/app/templates/base-layout.pt

The $team/+index page now uses a subclass of PersonIndexView instead
of PersonIndexView directly, since that makes it possible to customize
the menu items in it. Also separated two portlets into their own files.
    lib/lp/registry/browser/configure.zcml

Moved a bunch of menu items up to CommonMenuLinks or TeamMenuMixin.
Added the 'team' attribute to the TeamMenuMixin, since some of the
menus have the view as the context object. Added TeamIndexView and
the TeamIndexMenu.
    lib/lp/registry/browser/person.py

Fixed tests.
    lib/lp/registry/browser/tests/team-views.txt
    lib/lp/registry/stories/foaf/xx-reassign-team.txt
    lib/lp/registry/stories/foaf/xx-team-claim.txt
    lib/lp/registry/stories/foaf/xx-team-home.txt
    lib/lp/registry/stories/teammembership/private-team.txt
    lib/lp/registry/stories/teammembership/xx-private-membership.txt
    lib/lp/soyuz/stories/ppa/xx-ppa-private-teams.txt

Removed the header for the map. I can't remember who wanted that.
    lib/lp/registry/templates/team-portlet-map.pt

Added info icon to link.
    lib/lp/registry/templates/person-portlet-related-projects.pt

Added maintained-packages link and reformatted.
    lib/lp/soyuz/templates/person-portlet-ppas.pt

Fixed font size of ppa names.
    lib/lp/soyuz/templates/person-ppas.pt

Tests
-----

./bin/test -vv -t 'team-views.txt|xx-reassign-team.txt|xx-team-claim.txt|xx-team-home.txt|private-team.txt|xx-private-membership.txt|xx-ppa-private-teams.txt'

Demo and Q/A
------------

SQL to insert test data for the ~guadalinux user on launchpad.dev:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /* For homepage content and description at the top of the page. */
    UPDATE Person
    SET homepage_content = 'Homepage content. Testing.',
        teamdescription = 'Team description. Testing.'
    WHERE id = 32;

    /* For related projects portlet. */
    UPDATE Product SET owner = 32;

Q/A
~~~
* Open http://launchpad.dev/~guadamen
    * Verify al...

Read more...

Revision history for this message
Guilherme Salgado (salgado) wrote :

Hi Edwin,

This looks really nice and it's great to see team-index.pt shrinking. r=me with those few changes we discussed on IRC

review: Approve (code)
Revision history for this message
Martin Albisetti (beuno) wrote :

Hi Edwin,

This looks great, and I'm looking forward to seeing this land.

I have a few comments which I'd like to see if we can address:

- I feel the "Team details" portlet should always be on the top right. The related projects portlet is pushing it down when it exists
- All the "show all *" links should be on the top-right of each portlet (I can spot "view all members" and view all X related packages)
- Maybe in the same spirit, you should move the "view map and time zones" to the top right as well
- If the team is not a sub-team, can we just not expose that information?
- How about not mentioning the projects' name again in the polls area and just say "No polls created"? And maybe not offer the show link if there aren't any?
- The "created on" date and by whom should be on the top-right, like in bugs and every other object (see with Curtis for this)
- If there aren't any packages, maybe we shouldn't offer the "Maintained packages" link?

review: Needs Fixing (ui)
Revision history for this message
Martin Albisetti (beuno) wrote :

One more comment, the "Join team" is probably the most important action, so maybe it could be on the top, with the same format as the downloads for projects?

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

I want to clarify a couple of the suggested changes.

On Mon, Aug 24, 2009 at 2:33 PM, Martin Albisetti<email address hidden> wrote:
> Review: Needs Fixing ui
> Hi Edwin,
>
> This looks great, and I'm looking forward to seeing this land.
>
> I have a few comments which I'd like to see if we can address:
>
> - I feel the "Team details" portlet should always be on the top right. The related projects portlet is pushing it down when it exists

I think I will move the Related Projects portlet to the top on the
left side, since there was a bug to make sure this is very prominent.

> - All the "show all *" links should be on the top-right of each portlet (I can spot "view all members" and view all X related packages)

I'm confused, since we discussed Martin Pool's complaint about the
"Show all" links being black and not being in the body with the other
links. Should it be blue in the top right corner or still black?

> - Maybe in the same spirit, you should move the "view map and time zones" to the top right as well
> - If the team is not a sub-team, can we just not expose that information?
> - How about not mentioning the projects' name again in the polls area and just say "No polls created"?  And maybe not offer the show link if there aren't any?
> - The "created on" date and by whom should be on the top-right, like in bugs and every other object (see with Curtis for this)
> - If there aren't any packages, maybe we shouldn't offer the "Maintained packages" link?
> --
> https://code.edge.launchpad.net/~edwin-grubbs/launchpad/bug-412519-team-page/+merge/10536
> You are the owner of lp:~edwin-grubbs/launchpad/bug-412519-team-page.
>

Revision history for this message
Martin Albisetti (beuno) wrote :

On Mon, Aug 24, 2009 at 4:57 PM, Edwin Grubbs<email address hidden> wrote:
> I think I will move the Related Projects portlet to the top on the
> left side, since there was a bug to make sure this is very prominent.

I think the team's information is more important.

> I'm confused, since we discussed Martin Pool's complaint about the
> "Show all" links being black and not being in the body with the other
> links. Should it be blue in the top right corner or still black?

Blue and on the top right, without the arrow, I'd say.

--
Martin

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

New screenshots are available at https://dev.launchpad.net/TeamIndexPage#preview
One important comment below.

> Hi Edwin,
>
> This looks great, and I'm looking forward to seeing this land.
>
> I have a few comments which I'd like to see if we can address:
>
> - I feel the "Team details" portlet should always be on the top right. The
> related projects portlet is pushing it down when it exists

Fixed.

> - All the "show all *" links should be on the top-right of each portlet (I can
> spot "view all members" and view all X related packages)

Fixed.

> - Maybe in the same spirit, you should move the "view map and time zones" to
> the top right as well

Fixed.

> - If the team is not a sub-team, can we just not expose that information?

Fixed.

> - How about not mentioning the projects' name again in the polls area and just
> say "No polls created"? And maybe not offer the show link if there aren't
> any?

Fixed.

> - The "created on" date and by whom should be on the top-right, like in bugs
> and every other object (see with Curtis for this)

Curtis will work on this bug regarding the base template.

> - If there aren't any packages, maybe we shouldn't offer the "Maintained
> packages" link?

Fixed.

Revision history for this message
Martin Albisetti (beuno) wrote :

Thank you for your changes, the page is looking much better. Great job.

Fixing the major problems it had has, however, brought some of the "polish" issues to my attention I would like to solve on this page, so, if you can still invest a bit of time on this page, please try and address them.

- I'd drop mentoring from that page. The feature is broken.
- How about s/Recently applied/Pending approval?
- If there's no email set, we should probably say "set contact email" instead of edit
- If there is an email set, just have an edit icon next to it, no text
- The "join team" should be placed before the actions portlet, just like downloads
- If there's no mailing list, it should say "create a mailing list", with an add icon
- I'd move the "show members photos" link into +members, uncluttering that section
- "You are not a member of this team" should probably be preceded by "(+) Join it". I'd also add some spacing between this text and the rest (0.5-1em, see what feels right)
- s/Mailing list archive/View archive
- s/Mailing list subscribers/View subscribers
- s/You are not subscribed to the team mailing list. (Subscribe)/(+) Subscribe to mailing list

review: Needs Fixing (ui)
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Hi Martin,

Screenshots for revision 3 are available at
https://dev.launchpad.net/TeamIndexPage

-Edwin

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Also, be sure to look at the screenshot of the project page whose black portlet links changed to blue because that change was done in the stylesheet.

> Hi Martin,
>
> Screenshots for revision 3 are available at
> https://dev.launchpad.net/TeamIndexPage
>
> -Edwin

Revision history for this message
Martin Albisetti (beuno) wrote :

Perfect.
Thank you :)

review: Approve (ui)
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (17.3 KiB)

Hi Salgado,

Can you do a followup review on the changes I made for Martin? BTW, it is understood that the changes to the see-all css also affect the project page and any other portlets.

-Edwin

{{{
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-08-23 01:55:48 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-08-28 02:04:01 +0000
@@ -369,9 +369,8 @@
     }
 .see-all a {
     padding-left: 8px;
- background: url(/@@/link-grey-arrow.png) left center no-repeat;
+ background: inherit;
     font-size: 72%;
- color: #484848;
     text-decoration: underline;
     }
 .rss-right {
@@ -576,6 +575,30 @@
     text-align: right;
     }

+ul.super-add-action {
+ margin: 0 auto 1em;
+}
+
+ul.super-add-action li {
+ padding: 0;
+}
+
+ul.super-add-action li a {
+ display: block;
+ border: 1px solid black;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ -khtml-border-radius: 3px;
+ background: #4f843c url(/@@/bg-action-add) center left no-repeat;
+ border-radius: 3px;
+ padding: 6%;
+ padding-left: 45px;
+ color: #fff;
+ font-size: 108%;
+ font-weight: bold;
+ text-decoration: underline;
+ }
+
 .involvement ul {
     border-top: 1px solid #d0d0d0;
     }

=== added file 'lib/canonical/launchpad/images/bg-action-add.png'
Binary files lib/canonical/launchpad/images/bg-action-add.png 1970-01-01 00:00:00 +0000 and lib/canonical/launchpad/images/bg-action-add.png 2009-08-26 19:07:10 +0000 differ
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py 2009-08-24 19:14:38 +0000
+++ lib/lp/registry/browser/person.py 2009-08-27 22:12:31 +0000
@@ -877,7 +877,8 @@
     def maintained(self):
         target = '+maintained-packages'
         text = 'Maintained Packages'
- return Link(target, text, icon='info')
+ enabled = bool(self.team.getLatestMaintainedPackages())
+ return Link(target, text, enabled=enabled, icon='info')

     def uploaded(self):
         target = '+uploaded-packages'
@@ -1078,7 +1079,7 @@
         return Link(target, text)

-class PersonRelatedSoftwareNavigationMenu(NavigationMenu):
+class PersonRelatedSoftwareNavigationMenu(NavigationMenu, CommonMenuLinks):

     usedfor = IPersonRelatedSoftwareMenu
     facet = 'overview'
@@ -1226,7 +1227,7 @@
     @enabled_with_permission('launchpad.Edit')
     def editemail(self):
         target = '+contactaddress'
- text = 'Change contact address'
+ text = 'Set contact address'
         summary = (
             'The address Launchpad uses to contact %s' %
             self.team.displayname)
@@ -1235,10 +1236,16 @@
     @enabled_with_permission('launchpad.MailingListManager')
     def configure_mailing_list(self):
         target = '+mailinglist'
- text = 'Configure mailing list'
+ mailing_list = self.team.mailing_list
+ if mailing_list is not None and mailing_list.is_usable:
+ text = 'Configure mailing list'
+ icon = 'edit'
+ else:
+ text = 'Create a mailing list'
+ icon = 'add'
         summary = (
             'The mail...

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (11.2 KiB)

Hi Salgado,

Here are the tests that you asked me to add. I will add another comment with a diff of all the boring test fixes needed for the changing names of links.

-Edwin

{{{
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py 2009-08-31 12:01:46 +0000
+++ lib/lp/registry/browser/person.py 2009-09-01 00:11:08 +0000
@@ -3126,6 +3126,21 @@
     """

     @property
+ def can_show_subteam_portlet(self):
+ """Only show the subteam portlet if there is info to display.
+
+ Either the team is a member of another team, or there are
+ invitations to join a team, and the owner needs to see the
+ link so that the invitation can be accepted.
+ """
+ try:
+ return (self.context.super_teams.count() > 0
+ or (self.context.open_membership_invitations
+ and check_permission('launchpad.Edit', self.context)))
+ except AttributeError, e:
+ raise AssertionError(e)
+
+ @property
     def visibility(self):
         return self.context.visibility.title + ' Team'

=== modified file 'lib/lp/registry/stories/foaf/xx-team-home.txt'
--- lib/lp/registry/stories/foaf/xx-team-home.txt 2009-08-29 03:14:48 +0000
+++ lib/lp/registry/stories/foaf/xx-team-home.txt 2009-09-01 00:48:09 +0000
@@ -51,11 +51,41 @@
     English
     Set preferred languages

+The polls portlet only shows a link to view all polls if current
+polls exist.
+
+ >>> print extract_text(find_tag_by_id(browser.contents, 'polls'))
+ Polls
+ A random poll that never closes...
+ Show polls
+
+ >>> browser.open('http://launchpad.dev/~launchpad')
+ >>> print extract_text(find_tag_by_id(browser.contents, 'polls'))
+ Polls
+ No polls created.
+
+The subteam-of portlet is not shown if the team is not a subteam.
+
+ >>> browser.open('http://launchpad.dev/~ubuntu-team')
     >>> print extract_text(
     ... find_tag_by_id(browser.contents, 'subteam-of'))
     Subteam of
     &#8220;Ubuntu Team&#8221; is a member of these teams: GuadaMen...

+ >>> browser.open('http://launchpad.dev/~launchpad')
+ >>> print find_tag_by_id(browser.contents, 'subteam-of')
+ None
+
+Unless the user is the owner of the team and there are invitations to
+join a team.
+
+ >>> admin_browser.open('http://launchpad.dev/~launchpad')
+ >>> print extract_text(
+ ... find_tag_by_id(admin_browser.contents, 'subteam-of'))
+ Subteam of...
+ itself is not a member of any other team.
+ Show received invitations
+
 If the team does not have any recently approved or proposed members,
 the recent members sections are not displayed:

=== modified file 'lib/lp/registry/templates/person-macros.pt'
--- lib/lp/registry/templates/person-macros.pt 2009-08-28 00:57:32 +0000
+++ lib/lp/registry/templates/person-macros.pt 2009-09-01 00:06:13 +0000
@@ -79,8 +79,8 @@
 <metal:macro define-macro="subteam-of">
   <div class="portlet"
        id="subteam-of"
- tal:condition="
- python: context.super_teams or context.open_membership_invitations">
+ tal:condition="view/can_show_subteam_portlet"
+ >
     <h2>Subteam of</h2>

     <...

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (20.6 KiB)

Incremental diff of boring test fixes.

{{{
=== modified file 'lib/lp/registry/browser/tests/person-views.txt'
--- lib/lp/registry/browser/tests/person-views.txt 2009-08-13 19:03:36 +0000
+++ lib/lp/registry/browser/tests/person-views.txt 2009-08-29 03:14:48 +0000
@@ -587,7 +587,7 @@
     >>> login('<email address hidden>')
     >>> view = create_initialized_view(landscape_developers, '+index')
     >>> print view.contact_link_title
- Send an email to your team through Launchpad
+ Send an email to your team's members through Launchpad

 The EmailToPersonView can be used by members to contact their team.

=== modified file 'lib/lp/registry/stories/foaf/xx-person-projects.txt'
--- lib/lp/registry/stories/foaf/xx-person-projects.txt 2009-08-13 15:12:16 +0000
+++ lib/lp/registry/stories/foaf/xx-person-projects.txt 2009-08-29 03:14:48 +0000
@@ -11,7 +11,6 @@
     Ubuntu Linux
     Ubuntu Test
     Tomcat
- &raquo; Show related projects

 The +related-software page displays a table with links to open bugs,
 unimplemented specs and open questions.

=== modified file 'lib/lp/registry/stories/foaf/xx-team-add-my-teams.txt'
--- lib/lp/registry/stories/foaf/xx-team-add-my-teams.txt 2009-06-16 20:17:00 +0000
+++ lib/lp/registry/stories/foaf/xx-team-add-my-teams.txt 2009-08-29 03:14:48 +0000
@@ -33,7 +33,7 @@
     [u'Launchpad Administrators has been proposed to this team.']
     >>> print extract_text(
     ... find_tag_by_id(browser.contents, 'recently-applied'))
- Recently applied
+ Pending approval
     Launchpad Administrators
     ...

=== modified file 'lib/lp/registry/stories/foaf/xx-team-contactemail.txt'
--- lib/lp/registry/stories/foaf/xx-team-contactemail.txt 2009-05-12 01:39:29 +0000
+++ lib/lp/registry/stories/foaf/xx-team-contactemail.txt 2009-08-29 03:14:48 +0000
@@ -17,7 +17,7 @@

     >>> browser = setupBrowser(auth='Basic <email address hidden>:test')
     >>> browser.open('http://launchpad.dev/~landscape-developers')
- >>> browser.getLink('Change contact address').click()
+ >>> browser.getLink(url='+contactaddress').click()
     >>> browser.title
     'Landscape Developers contact address'

@@ -73,7 +73,7 @@
     ... print msg
     Email address successfully confirmed.

- >>> browser.getLink('Change contact address').click()
+ >>> browser.getLink(url='+contactaddress').click()
     >>> browser.title
     'Landscape Developers contact address'
     >>> control = browser.getControl(name='field.contact_method')

=== modified file 'lib/lp/registry/stories/foaf/xx-team-edit.txt'
--- lib/lp/registry/stories/foaf/xx-team-edit.txt 2009-08-13 19:03:36 +0000
+++ lib/lp/registry/stories/foaf/xx-team-edit.txt 2009-08-29 03:14:48 +0000
@@ -88,7 +88,7 @@
 such team pages read-only.

     >>> browser.open('http://launchpad.dev/~landscape-developers')
- >>> browser.getLink('Configure mailing list').click()
+ >>> browser.getLink(url='+mailinglist').click()
     >>> browser.getControl('Apply for Mailing List').click()

     # Approval of mailing lists is not yet exposed through the web.

=== modified file 'lib/lp/registry/stories/foaf/xx-team-home.txt'
--- lib/lp/registry/stories/foaf/xx-team-home.txt 2009-08-...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/app/templates/base-layout.pt'
--- lib/lp/app/templates/base-layout.pt 2009-08-20 07:58:58 +0000
+++ lib/lp/app/templates/base-layout.pt 2009-08-21 13:48:43 +0000
@@ -70,6 +70,8 @@
7070
71 <metal:load-javascript71 <metal:load-javascript
72 use-macro="context/@@+base-layout-macros/load-javascript" />72 use-macro="context/@@+base-layout-macros/load-javascript" />
73 <metal:page-javascript
74 use-macro="context/@@+base-layout-macros/page-javascript" />
73 <metal:block define-slot="head_epilogue"></metal:block>75 <metal:block define-slot="head_epilogue"></metal:block>
74 </head>76 </head>
7577
7678
=== modified file 'lib/lp/registry/browser/configure.zcml'
--- lib/lp/registry/browser/configure.zcml 2009-08-20 14:01:26 +0000
+++ lib/lp/registry/browser/configure.zcml 2009-08-21 13:48:43 +0000
@@ -782,6 +782,7 @@
782 PersonSpecsMenu782 PersonSpecsMenu
783 TeamBugsMenu783 TeamBugsMenu
784 TeamEditMenu784 TeamEditMenu
785 TeamIndexMenu
785 TeamOverviewMenu786 TeamOverviewMenu
786 TeamOverviewNavigationMenu787 TeamOverviewNavigationMenu
787 TeamSpecsMenu788 TeamSpecsMenu
@@ -1067,13 +1068,13 @@
1067 <browser:page1068 <browser:page
1068 for="lp.registry.interfaces.person.ITeam"1069 for="lp.registry.interfaces.person.ITeam"
1069 permission="zope.Public"1070 permission="zope.Public"
1070 class="lp.registry.browser.person.PersonIndexView"1071 class="lp.registry.browser.person.TeamIndexView"
1071 name="+index"1072 name="+index"
1072 template="../templates/team-index.pt"/>1073 template="../templates/team-index.pt"/>
1073 <browser:page1074 <browser:page
1074 for="lp.registry.interfaces.person.ITeam"1075 for="lp.registry.interfaces.person.ITeam"
1075 permission="zope.Public"1076 permission="zope.Public"
1076 class="canonical.launchpad.browser.TeamMapView"1077 class="lp.registry.browser.team.TeamMapView"
1077 name="+map"1078 name="+map"
1078 template="../templates/team-map.pt"/>1079 template="../templates/team-map.pt"/>
1079 <browser:page1080 <browser:page
@@ -1112,6 +1113,18 @@
1112 template="../templates/team-portlet-map.pt"/>1113 template="../templates/team-portlet-map.pt"/>
1113 <browser:page1114 <browser:page
1114 for="lp.registry.interfaces.person.ITeam"1115 for="lp.registry.interfaces.person.ITeam"
1116 class="lp.registry.browser.person.PersonIndexView"
1117 permission="zope.Public"
1118 name="+portlet-membership"
1119 template="../templates/team-portlet-membership.pt"/>
1120 <browser:page
1121 for="lp.registry.interfaces.person.ITeam"
1122 class="lp.registry.browser.person.PersonIndexView"
1123 permission="zope.Public"
1124 name="+portlet-mailinglist"
1125 template="../templates/team-portlet-mailinglist.pt"/>
1126 <browser:page
1127 for="lp.registry.interfaces.person.ITeam"
1115 permission="launchpad.Edit"1128 permission="launchpad.Edit"
1116 class="canonical.launchpad.browser.TeamContactAddressView"1129 class="canonical.launchpad.browser.TeamContactAddressView"
1117 name="+contactaddress"1130 name="+contactaddress"
11181131
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py 2009-08-20 16:13:15 +0000
+++ lib/lp/registry/browser/person.py 2009-08-21 14:42:54 +0000
@@ -42,6 +42,7 @@
42 'PersonLatestQuestionsView',42 'PersonLatestQuestionsView',
43 'PersonNavigation',43 'PersonNavigation',
44 'PersonOAuthTokensView',44 'PersonOAuthTokensView',
45 'PersonOverviewNavigationMenu',
45 'PersonOverviewMenu',46 'PersonOverviewMenu',
46 'PersonRdfContentsView',47 'PersonRdfContentsView',
47 'PersonRdfView',48 'PersonRdfView',
@@ -71,11 +72,13 @@
71 'TeamBreadcrumbBuilder',72 'TeamBreadcrumbBuilder',
72 'TeamEditLocationView',73 'TeamEditLocationView',
73 'TeamEditMenu',74 'TeamEditMenu',
75 'TeamIndexMenu',
74 'TeamJoinView',76 'TeamJoinView',
75 'TeamLeaveView',77 'TeamLeaveView',
76 'TeamMembershipView',78 'TeamMembershipView',
77 'TeamMugshotView',79 'TeamMugshotView',
78 'TeamNavigation',80 'TeamNavigation',
81 'TeamOverviewNavigationMenu',
79 'TeamOverviewMenu',82 'TeamOverviewMenu',
80 'TeamReassignmentView',83 'TeamReassignmentView',
81 'TeamSpecsMenu',84 'TeamSpecsMenu',
@@ -866,6 +869,32 @@
866 'Package Archive and create a new PPA.')869 'Package Archive and create a new PPA.')
867 return Link(target, text, summary, icon='add')870 return Link(target, text, summary, icon='add')
868871
872 def summary(self):
873 target = '+related-software'
874 text = 'Summary'
875 return Link(target, text)
876
877 def maintained(self):
878 target = '+maintained-packages'
879 text = 'Maintained Packages'
880 return Link(target, text, icon='info')
881
882 def uploaded(self):
883 target = '+uploaded-packages'
884 text = 'Uploaded Packages'
885 return Link(target, text)
886
887 def ppa(self):
888 target = '+ppa-packages'
889 text = 'PPA Packages'
890 return Link(target, text)
891
892 def projects(self):
893 target = '+related-projects'
894 text = 'Related Projects'
895 return Link(target, text)
896
897
869898
870class PersonOverviewMenu(ApplicationMenu, CommonMenuLinks):899class PersonOverviewMenu(ApplicationMenu, CommonMenuLinks):
871900
@@ -876,7 +905,7 @@
876 'editircnicknames', 'editjabberids', 'editpassword',905 'editircnicknames', 'editjabberids', 'editpassword',
877 'editsshkeys', 'editpgpkeys', 'editlocation', 'memberships',906 'editsshkeys', 'editpgpkeys', 'editlocation', 'memberships',
878 'mentoringoffers', 'codesofconduct', 'karma',907 'mentoringoffers', 'codesofconduct', 'karma',
879 'administer', 'related_projects', 'activate_ppa',908 'administer', 'related_projects', 'activate_ppa', 'maintained',
880 'view_ppa_subscriptions']909 'view_ppa_subscriptions']
881910
882 @enabled_with_permission('launchpad.Edit')911 @enabled_with_permission('launchpad.Edit')
@@ -1055,31 +1084,6 @@
1055 facet = 'overview'1084 facet = 'overview'
1056 links = ('summary', 'maintained', 'uploaded', 'ppa', 'projects')1085 links = ('summary', 'maintained', 'uploaded', 'ppa', 'projects')
10571086
1058 def summary(self):
1059 target = '+related-software'
1060 text = 'Summary'
1061 return Link(target, text)
1062
1063 def maintained(self):
1064 target = '+maintained-packages'
1065 text = 'Maintained Packages'
1066 return Link(target, text)
1067
1068 def uploaded(self):
1069 target = '+uploaded-packages'
1070 text = 'Uploaded Packages'
1071 return Link(target, text)
1072
1073 def ppa(self):
1074 target = '+ppa-packages'
1075 text = 'PPA Packages'
1076 return Link(target, text)
1077
1078 def projects(self):
1079 target = '+related-projects'
1080 text = 'Related Projects'
1081 return Link(target, text)
1082
10831087
1084class PersonEditNavigationMenu(NavigationMenu):1088class PersonEditNavigationMenu(NavigationMenu):
1085 """A sub-menu for different aspects of editing a Person's profile."""1089 """A sub-menu for different aspects of editing a Person's profile."""
@@ -1117,6 +1121,17 @@
11171121
11181122
1119class TeamMenuMixin(PPANavigationMenuMixIn, CommonMenuLinks):1123class TeamMenuMixin(PPANavigationMenuMixIn, CommonMenuLinks):
1124 """Base class of team menus.
1125
1126 You will need to override the team attribute if your menu subclass
1127 has the view as its context object.
1128 """
1129
1130 @property
1131 def team(self):
1132 """Allow subclasses that use the view as the context."""
1133 return self.context
1134
1120 def profile(self):1135 def profile(self):
1121 target = ''1136 target = ''
1122 text = 'Overview'1137 text = 'Overview'
@@ -1175,8 +1190,7 @@
1175 target = '+add-my-teams'1190 target = '+add-my-teams'
1176 text = 'Add one of my teams'1191 text = 'Add one of my teams'
1177 enabled = True1192 enabled = True
1178 team = self.context1193 if self.team.subscriptionpolicy == TeamSubscriptionPolicy.RESTRICTED:
1179 if team.subscriptionpolicy == TeamSubscriptionPolicy.RESTRICTED:
1180 # This is a restricted team; users can't join.1194 # This is a restricted team; users can't join.
1181 enabled = False1195 enabled = False
1182 return Link(target, text, icon='add', enabled=enabled)1196 return Link(target, text, icon='add', enabled=enabled)
@@ -1218,11 +1232,6 @@
1218 self.team.displayname)1232 self.team.displayname)
1219 return Link(target, text, summary, icon='edit')1233 return Link(target, text, summary, icon='edit')
12201234
1221 @property
1222 def team(self):
1223 """Allow subclasses that use the view as the context."""
1224 return self.context
1225
1226 @enabled_with_permission('launchpad.MailingListManager')1235 @enabled_with_permission('launchpad.MailingListManager')
1227 def configure_mailing_list(self):1236 def configure_mailing_list(self):
1228 target = '+mailinglist'1237 target = '+mailinglist'
@@ -1247,17 +1256,17 @@
1247 return Link(target, text, icon='edit')1256 return Link(target, text, icon='edit')
12481257
1249 def joinleave(self):1258 def joinleave(self):
1250 team = self.context
1251 enabled = True1259 enabled = True
1252 if userIsActiveTeamMember(team):1260 if userIsActiveTeamMember(self.team):
1253 if team.teamowner == self.user:1261 if self.team.teamowner == self.user:
1254 # The owner cannot leave his team1262 # The owner cannot leave his team
1255 enabled = False1263 enabled = False
1256 target = '+leave'1264 target = '+leave'
1257 text = 'Leave the Team' # &#8230;1265 text = 'Leave the Team' # &#8230;
1258 icon = 'remove'1266 icon = 'remove'
1259 else:1267 else:
1260 if team.subscriptionpolicy == TeamSubscriptionPolicy.RESTRICTED:1268 if (self.team.subscriptionpolicy
1269 == TeamSubscriptionPolicy.RESTRICTED):
1261 # This is a restricted team; users can't join.1270 # This is a restricted team; users can't join.
1262 enabled = False1271 enabled = False
1263 target = '+join'1272 target = '+join'
@@ -1277,7 +1286,7 @@
1277 'editlanguages', 'map', 'polls',1286 'editlanguages', 'map', 'polls',
1278 'add_poll', 'joinleave', 'add_my_teams', 'mentorships',1287 'add_poll', 'joinleave', 'add_my_teams', 'mentorships',
1279 'reassign', 'related_projects',1288 'reassign', 'related_projects',
1280 'activate_ppa']1289 'activate_ppa', 'maintained']
12811290
12821291
1283class TeamOverviewNavigationMenu(NavigationMenu, TeamMenuMixin):1292class TeamOverviewNavigationMenu(NavigationMenu, TeamMenuMixin):
@@ -2578,18 +2587,17 @@
2578 @property2587 @property
2579 def subscription_policy_description(self):2588 def subscription_policy_description(self):
2580 """Return the description of this team's subscription policy."""2589 """Return the description of this team's subscription policy."""
2581 team = self.context2590 assert self.team.isTeam(), (
2582 assert team.isTeam(), (
2583 'This method can only be called when the context is a team.')2591 'This method can only be called when the context is a team.')
2584 if team.subscriptionpolicy == TeamSubscriptionPolicy.RESTRICTED:2592 if self.team.subscriptionpolicy == TeamSubscriptionPolicy.RESTRICTED:
2585 description = _(2593 description = _(
2586 "This is a restricted team; new members can only be added "2594 "This is a restricted team; new members can only be added "
2587 "by one of the team's administrators.")2595 "by one of the team's administrators.")
2588 elif team.subscriptionpolicy == TeamSubscriptionPolicy.MODERATED:2596 elif self.team.subscriptionpolicy == TeamSubscriptionPolicy.MODERATED:
2589 description = _(2597 description = _(
2590 "This is a moderated team; all subscriptions are subjected "2598 "This is a moderated team; all subscriptions are subjected "
2591 "to approval by one of the team's administrators.")2599 "to approval by one of the team's administrators.")
2592 elif team.subscriptionpolicy == TeamSubscriptionPolicy.OPEN:2600 elif self.team.subscriptionpolicy == TeamSubscriptionPolicy.OPEN:
2593 description = _(2601 description = _(
2594 "This is an open team; any user can join and no approval "2602 "This is an open team; any user can join and no approval "
2595 "is required.")2603 "is required.")
@@ -2696,7 +2704,7 @@
2696 def specific_contact_text(self):2704 def specific_contact_text(self):
2697 """Return the appropriate link text."""2705 """Return the appropriate link text."""
2698 if self.context.is_team:2706 if self.context.is_team:
2699 return 'Contact this team'2707 return "Contact this team's administrators"
2700 else:2708 else:
2701 # Note that we explicitly do not change the text to "Contact2709 # Note that we explicitly do not change the text to "Contact
2702 # yourself" when viewing your own page.2710 # yourself" when viewing your own page.
@@ -3066,6 +3074,27 @@
3066 return check_permission('launchpad.View', self.context.location)3074 return check_permission('launchpad.View', self.context.location)
30673075
30683076
3077class TeamIndexView(PersonIndexView):
3078 """The view class for the +index page.
3079
3080 This class is needed, so an action menu that only applies to
3081 teams can be displayed without showing up on the person index page.
3082 """
3083
3084 @property
3085 def visibility(self):
3086 return self.context.visibility.title + ' Team'
3087
3088 @property
3089 def visibility_info(self):
3090 if self.context.visibility == PersonVisibility.PRIVATE:
3091 return 'Viewable by team members.'
3092 elif self.context.visibility == PersonVisibility.PRIVATE_MEMBERSHIP:
3093 return 'Team membership is viewable by team members.'
3094 else:
3095 return ''
3096
3097
3069class PersonCodeOfConductEditView(LaunchpadView):3098class PersonCodeOfConductEditView(LaunchpadView):
30703099
3071 def performCoCChanges(self):3100 def performCoCChanges(self):
@@ -5447,11 +5476,32 @@
5447 return 'Contact this user'5476 return 'Contact this user'
54485477
54495478
5479class ITeamIndexMenu(Interface):
5480 """A marker interface for the +index navigation menu."""
5481
5482
5450class ITeamEditMenu(Interface):5483class ITeamEditMenu(Interface):
5451 """A marker interface for the edit navigation menu."""5484 """A marker interface for the edit navigation menu."""
54525485
54535486
5454class TeamEditMenu(NavigationMenu, TeamMenuMixin):5487class TeamNavigationMenuBase(NavigationMenu, TeamMenuMixin):
5488
5489 @property
5490 def team(self):
5491 """Override TeamOverviewMenu since the view is the context."""
5492 return self.context.context
5493
5494
5495class TeamIndexMenu(TeamNavigationMenuBase):
5496 """A menu for different aspects of editing a team."""
5497
5498 usedfor = ITeamIndexMenu
5499 facet = 'overview'
5500 title = 'Change team'
5501 links = ('edit', 'joinleave', 'add_member', 'add_my_teams')
5502
5503
5504class TeamEditMenu(TeamNavigationMenuBase):
5455 """A menu for different aspects of editing a team."""5505 """A menu for different aspects of editing a team."""
54565506
5457 usedfor = ITeamEditMenu5507 usedfor = ITeamEditMenu
@@ -5460,10 +5510,6 @@
5460 links = ('branding', 'common_edithomepage', 'editlanguages', 'reassign',5510 links = ('branding', 'common_edithomepage', 'editlanguages', 'reassign',
5461 'editemail')5511 'editemail')
54625512
5463 @property5513
5464 def team(self):5514classImplements(TeamIndexView, ITeamIndexMenu)
5465 """Override TeamOverviewMenu since the view is the context."""
5466 return self.context.context
5467
5468
5469classImplements(TeamEditView, ITeamEditMenu)5515classImplements(TeamEditView, ITeamEditMenu)
54705516
=== modified file 'lib/lp/registry/browser/tests/team-views.txt'
--- lib/lp/registry/browser/tests/team-views.txt 2009-08-13 15:12:16 +0000
+++ lib/lp/registry/browser/tests/team-views.txt 2009-08-21 13:48:43 +0000
@@ -229,4 +229,4 @@
229 >>> print view.contact_link_title229 >>> print view.contact_link_title
230 Send an email to this team's owner through Launchpad230 Send an email to this team's owner through Launchpad
231 >>> print view.specific_contact_text231 >>> print view.specific_contact_text
232 Contact this team232 Contact this team's administrators
233233
=== modified file 'lib/lp/registry/stories/foaf/xx-reassign-team.txt'
--- lib/lp/registry/stories/foaf/xx-reassign-team.txt 2009-08-13 20:28:35 +0000
+++ lib/lp/registry/stories/foaf/xx-reassign-team.txt 2009-08-21 13:48:43 +0000
@@ -27,8 +27,9 @@
27 >>> browser.url27 >>> browser.url
28 'http://launchpad.dev/~landscape-developers'28 'http://launchpad.dev/~landscape-developers'
29 >>> print extract_text(29 >>> print extract_text(
30 ... find_tag_by_id(browser.contents, 'team-details'))30 ... find_tag_by_id(browser.contents, 'team-owner'))
31 Team owned by Celso Providelo, created on 2006-07-1231 Owner:
32 Celso Providelo
3233
33 >>> browser.open('http://launchpad.dev/~landscape-developers/+members')34 >>> browser.open('http://launchpad.dev/~landscape-developers/+members')
34 >>> print extract_text(find_tag_by_id(browser.contents, 'activemembers'))35 >>> print extract_text(find_tag_by_id(browser.contents, 'activemembers'))
@@ -63,8 +64,9 @@
63 >>> browser.url64 >>> browser.url
64 'http://launchpad.dev/~landscape-developers'65 'http://launchpad.dev/~landscape-developers'
65 >>> print extract_text(66 >>> print extract_text(
66 ... find_tag_by_id(browser.contents, 'team-details'))67 ... find_tag_by_id(browser.contents, 'team-owner'))
67 Team owned by Ubuntu Team...68 Owner:
69 Ubuntu Team
6870
69 >>> browser.open('http://launchpad.dev/~landscape-developers/+members')71 >>> browser.open('http://launchpad.dev/~landscape-developers/+members')
70 >>> print extract_text(find_tag_by_id(browser.contents, 'activemembers'))72 >>> print extract_text(find_tag_by_id(browser.contents, 'activemembers'))
7173
=== modified file 'lib/lp/registry/stories/foaf/xx-team-claim.txt'
--- lib/lp/registry/stories/foaf/xx-team-claim.txt 2009-07-23 13:44:13 +0000
+++ lib/lp/registry/stories/foaf/xx-team-claim.txt 2009-08-21 13:48:43 +0000
@@ -106,8 +106,9 @@
106 Team claimed successfully106 Team claimed successfully
107107
108 >>> print extract_text(108 >>> print extract_text(
109 ... find_tag_by_id(user_browser.contents, 'team-details'))109 ... find_tag_by_id(user_browser.contents, 'team-owner'))
110 Team owned by No Privileges Person, ...110 Owner:
111 No Privileges Person
111112
112113
113Trying to access +claimteam for an already active team 404s as you would114Trying to access +claimteam for an already active team 404s as you would
114115
=== modified file 'lib/lp/registry/stories/foaf/xx-team-home.txt'
--- lib/lp/registry/stories/foaf/xx-team-home.txt 2009-08-13 19:03:36 +0000
+++ lib/lp/registry/stories/foaf/xx-team-home.txt 2009-08-21 13:48:43 +0000
@@ -6,10 +6,8 @@
6 >>> print browser.title6 >>> print browser.title
7 Ubuntu Team in Launchpad7 Ubuntu Team in Launchpad
8 >>> privacy_info = find_tag_by_id(browser.contents, 'privacy')8 >>> privacy_info = find_tag_by_id(browser.contents, 'privacy')
9 >>> print privacy_info['class']
10 aside public
11 >>> print extract_text(privacy_info)9 >>> print extract_text(privacy_info)
12 This team is public10 Public Team
1311
14The page contains a few interesting details about team membership.12The page contains a few interesting details about team membership.
1513
@@ -28,18 +26,27 @@
28 Andrew Bennetts26 Andrew Bennetts
2927
30 >>> print extract_text(28 >>> print extract_text(
31 ... find_tag_by_id(browser.contents, 'team-details'))29 ... find_tag_by_id(browser.contents, 'team-owner'))
32 Team owned by Mark Shuttleworth, created on 2005-06-0630 Owner:
31 Mark Shuttleworth
32
33 >>> print extract_text(
34 ... find_tag_by_id(browser.contents, 'team-datecreated'))
35 Created on:
36 2005-06-06
3337
34 >>> print extract_text(38 >>> print extract_text(
35 ... find_tag_by_id(browser.contents, 'membership-summary'))39 ... find_tag_by_id(browser.contents, 'membership-summary'))
36 This team has: 10 active members, 1 invited members,40 This is a Moderated Team.
37 2 proposed members and is a Moderated Team...41 10 active members, 1 invited members, 2 proposed members...
3842
39 >>> print extract_text(43 >>> print extract_text(
40 ... find_tag_by_id(browser.contents, 'contact-details'))44 ... find_tag_by_id(browser.contents, 'contact-email'))
41 Contact details45 Email:
42 Log in for email information.46 Log in for email information.
47
48 >>> print extract_text(
49 ... find_tag_by_id(browser.contents, 'contact-languages'))
43 Languages:50 Languages:
44 English51 English
45 Set preferred languages52 Set preferred languages
@@ -88,14 +95,11 @@
8895
89 >>> browser.open('http://launchpad.dev/~ubuntu-team')96 >>> browser.open('http://launchpad.dev/~ubuntu-team')
90 >>> print extract_text(97 >>> print extract_text(
91 ... find_tag_by_id(browser.contents, 'contact-details'))98 ... find_tag_by_id(browser.contents, 'contact-email'))
92 Contact details99 Email:
100 Contact this team's administrators
93 support@ubuntu.com101 support@ubuntu.com
94 Contact this team
95 Change contact address102 Change contact address
96 Languages:
97 English
98 Set preferred languages
99103
100Member can contact their team even if the team does not have a contact104Member can contact their team even if the team does not have a contact
101address:105address:
@@ -103,16 +107,13 @@
103 >>> sample_browser = setupBrowser(auth='Basic test@canonical.com:test')107 >>> sample_browser = setupBrowser(auth='Basic test@canonical.com:test')
104 >>> sample_browser.open('http://launchpad.dev/~landscape-developers')108 >>> sample_browser.open('http://launchpad.dev/~landscape-developers')
105 >>> print extract_text(109 >>> print extract_text(
106 ... find_tag_by_id(sample_browser.contents, 'contact-details'))110 ... find_tag_by_id(sample_browser.contents, 'contact-email'))
107 Contact details111 Email:
108 No contact email112 No contact email
109 Contact this team
110 (Launchpad notifications are sent to all
111 team members)
112 Change contact address113 Change contact address
113 Languages:114 Contact this team's administrators
114 English115 (Launchpad notifications are sent to all
115 Set preferred languages116 team members)
116117
117As teams do not have OpenID Logins, there is not link in the Contact118As teams do not have OpenID Logins, there is not link in the Contact
118details section for help.119details section for help.
@@ -143,7 +144,7 @@
143144
144Team owners and admins can see a link to approve and decline applicants.145Team owners and admins can see a link to approve and decline applicants.
145146
146 >>> owner_browser = setupBrowser(auth="Basic mark@example.com:test")147 >>> owner_browser = setupBrowser(auth="Basic foo.bar@canonical.com:test")
147 >>> owner_browser.open('http://launchpad.dev/~ubuntu-team')148 >>> owner_browser.open('http://launchpad.dev/~ubuntu-team')
148 >>> print extract_text(149 >>> print extract_text(
149 ... find_tag_by_id(owner_browser.contents, 'recently-applied'))150 ... find_tag_by_id(owner_browser.contents, 'recently-applied'))
@@ -165,17 +166,14 @@
165 ... find_tag_by_id(user_browser.contents, 'your-involvement'))166 ... find_tag_by_id(user_browser.contents, 'your-involvement'))
166 You are not a member of this team...167 You are not a member of this team...
167168
168He can see the contact address, but the link's title explains the email169He can see the contact address, and the link explains the email
169will actually go to the team's owner.170will actually go to the team's administrators.
170171
171 >>> content = find_tag_by_id(user_browser.contents, 'contact-details')172 >>> content = find_tag_by_id(user_browser.contents, 'contact-email')
172 >>> print extract_text(content)173 >>> print extract_text(content)
173 Contact details174 Email:
175 Contact this team's administrators
174 support@ubuntu.com176 support@ubuntu.com
175 Contact this team
176 Languages:
177 English
178 Set preferred languages
179177
180 >>> content.a178 >>> content.a
181 <a href="+contactuser"179 <a href="+contactuser"
182180
=== modified file 'lib/lp/registry/stories/teammembership/private-team.txt'
--- lib/lp/registry/stories/teammembership/private-team.txt 2009-05-09 20:04:39 +0000
+++ lib/lp/registry/stories/teammembership/private-team.txt 2009-08-21 13:48:43 +0000
@@ -34,10 +34,9 @@
34The page states that the team is private.34The page states that the team is private.
3535
36 >>> privacy_info = find_tag_by_id(cprov_browser.contents, 'privacy')36 >>> privacy_info = find_tag_by_id(cprov_browser.contents, 'privacy')
37 >>> print privacy_info['class']
38 aside private
39 >>> print extract_text(privacy_info)37 >>> print extract_text(privacy_info)
40 This team is private38 Private Team
39 Viewable by team members.
4140
42A normal user cannot see the team.41A normal user cannot see the team.
4342
4443
=== modified file 'lib/lp/registry/stories/teammembership/xx-private-membership.txt'
--- lib/lp/registry/stories/teammembership/xx-private-membership.txt 2009-08-20 12:24:29 +0000
+++ lib/lp/registry/stories/teammembership/xx-private-membership.txt 2009-08-21 13:48:43 +0000
@@ -34,10 +34,9 @@
3434
35 >>> browser.open('http://launchpad.dev/~myteam')35 >>> browser.open('http://launchpad.dev/~myteam')
36 >>> privacy_info = find_tag_by_id(browser.contents, 'privacy')36 >>> privacy_info = find_tag_by_id(browser.contents, 'privacy')
37 >>> print privacy_info['class']
38 aside private
39 >>> print extract_text(privacy_info)37 >>> print extract_text(privacy_info)
40 This team is private38 Private Membership Team
39 Team membership is viewable by team members.
4140
42A team member will be able to see these parts of the team page.41A team member will be able to see these parts of the team page.
4342
@@ -50,7 +49,8 @@
5049
51 >>> print extract_text(50 >>> print extract_text(
52 ... find_tag_by_id(browser.contents, 'membership-summary'))51 ... find_tag_by_id(browser.contents, 'membership-summary'))
53 This team has: 2 active members, 1 proposed members ...52 This is a Moderated Team.
53 2 active members, 1 proposed members...
5454
5555
56== Team Participation ==56== Team Participation ==
5757
=== modified file 'lib/lp/registry/templates/person-macros.pt'
--- lib/lp/registry/templates/person-macros.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/registry/templates/person-macros.pt 2009-08-21 15:54:04 +0000
@@ -3,6 +3,113 @@
3 xmlns:metal="http://xml.zope.org/namespaces/metal"3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 omit-tag="">4 omit-tag="">
55
6<!-- contact-details macro. -->
7<metal:macro define-macro="contact-details">
8 <div class="portlet"
9 id="contact-details">
10 <h2 tal:condition="context/is_team">Team details</h2>
11
12 <dl id="contact-email">
13 <dt>Email:</dt>
14
15 <dd>
16 <tal:not_logged_in
17 condition="view/email_address_visibility/is_login_required">
18 <a href="+login">Log in</a> for email information.
19 </tal:not_logged_in>
20
21 <tal:no_preferredemail
22 condition="view/email_address_visibility/are_none_available">
23 No contact email
24 </tal:no_preferredemail>
25
26 <div tal:condition="view/can_contact">
27 <img src="/@@/mail" alt="email"/>
28 <a href="+contactuser"
29 tal:attributes="title view/contact_link_title"
30 tal:content="view/specific_contact_text"
31 >Contact this person</a>
32 <tal:no_preferredemail
33 condition="view/email_address_visibility/are_none_available">
34 <br /><small>(Launchpad notifications are sent to all
35 team members)</small>
36 </tal:no_preferredemail>
37 </div>
38
39 <tal:emails repeat="email view/visible_email_addresses">
40 <div style="white-space: nowrap">
41 <img src="/@@/mail" alt="mail" />
42 <tal:email replace="email">foo2@bar.com</tal:email>
43 </div>
44 </tal:emails>
45 <a tal:replace="structure overview_menu/editemail/fmt:link" />
46 </dd>
47 </dl>
48
49 <div class="two-column-list">
50 <dl id="team-owner">
51 <dt>Owner:</dt>
52 <dd>
53 <tal:owner replace="structure context/teamowner/fmt:link"/>
54 </dd>
55 </dl>
56
57 <dl id="team-datecreated">
58 <dt>Created on:</dt>
59 <dd>
60 <span id="created-date"
61 tal:attributes="title context/datecreated/fmt:datetime"
62 tal:content="context/datecreated/fmt:date" />
63 </dd>
64 </dl>
65
66 <dl id="contact-languages">
67 <dt>Languages:</dt>
68 <dd>
69 <tal:languages content="view/languages">English</tal:languages>
70 <a tal:attributes="href overview_menu/editlanguages/fmt:url"
71 class="sprite edit">
72 <span class="invisible-link">Set preferred languages</span></a>
73 </dd>
74 </dl>
75
76 </div>
77 </div>
78</metal:macro>
79
80<!-- subteam-of macro. -->
81<metal:macro define-macro="subteam-of">
82 <div class="portlet"
83 id="subteam-of">
84 <h2>Subteam of</h2>
85
86 <p tal:condition="not: context/super_teams">
87 &#8220;<span tal:replace="context/displayname"/>&#8221;
88 itself is not a member of any other team.
89 </p>
90
91 <tal:is-a-subteam condition="context/super_teams">
92 <p>
93 &#8220;<span tal:replace="context/displayname"/>&#8221;
94 is a member of these teams:
95 </p>
96 <ul class="iconed">
97 <li tal:repeat="team context/super_teams">
98 <tal:block replace="structure team/fmt:link" />
99 </li>
100 </ul>
101 </tal:is-a-subteam>
102
103 <p>
104 <tal:memberships
105 replace="structure overview_menu/memberships/fmt:link" />
106 &nbsp;
107 <tal:received_invitations
108 replace="structure overview_menu/received_invitations/fmt:link" />
109 </p>
110 </div>
111</metal:macro>
112
6<metal:macro define-macro="sourcepackagerelease-rows">113<metal:macro define-macro="sourcepackagerelease-rows">
7114
8 <tal:comment replace="nothing">115 <tal:comment replace="nothing">
9116
=== modified file 'lib/lp/registry/templates/person-portlet-related-projects.pt'
--- lib/lp/registry/templates/person-portlet-related-projects.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/registry/templates/person-portlet-related-projects.pt 2009-08-21 14:51:31 +0000
@@ -22,14 +22,14 @@
22 <tfoot>22 <tfoot>
23 <tr>23 <tr>
24 <td style="padding-top: .5em;">24 <td style="padding-top: .5em;">
25 <a href="+projects"25 <a class="sprite info" href="+projects"
26 tal:condition="view/has_more_related_projects">26 tal:condition="view/has_more_related_projects">
27 &raquo; Show all27 Show all
28 <tal:count content="view/related_projects_count">8</tal:count>28 <tal:count content="view/related_projects_count">8</tal:count>
29 related projects</a>29 related projects</a>
30 <a href="+projects"30 <a class="sprite info" href="+projects"
31 tal:condition="not: view/has_more_related_projects">31 tal:condition="not: view/has_more_related_projects">
32 &raquo; Show related projects</a>32 Show related projects</a>
33 </td>33 </td>
34 </tr>34 </tr>
35 </tfoot>35 </tfoot>
3636
=== modified file 'lib/lp/registry/templates/team-index.pt'
--- lib/lp/registry/templates/team-index.pt 2009-08-07 23:55:37 +0000
+++ lib/lp/registry/templates/team-index.pt 2009-08-21 14:12:07 +0000
@@ -6,7 +6,7 @@
6 xml:lang="en"6 xml:lang="en"
7 lang="en"7 lang="en"
8 dir="ltr"8 dir="ltr"
9 metal:use-macro="view/macro:page/onecolumn"9 metal:use-macro="view/macro:page/main_side"
10 i18n:domain="launchpad"10 i18n:domain="launchpad"
11>11>
1212
@@ -22,312 +22,113 @@
2222
23<body>23<body>
2424
25<div metal:fill-slot="before_nav_menu">25<!-- side slot -->
26 <div id="team-details" style="text-align:right">26<div metal:fill-slot="side"
27 Team owned27 tal:define="overview_menu context/menu:overview">
28 by <tal:reporter replace="structure context/teamowner/fmt:link" />,28
29 created on <span id="created-date"29 <div id="privacy" class="portlet">
30 tal:attributes="title context/datecreated/fmt:datetime"30 <h2 tal:content="view/visibility">Public Team</h2>
31 tal:content="context/datecreated/fmt:date" />31 <span tal:content="view/visibility_info">Viewable by team members.</span>
32 </div>32 </div>
33</div>33
3434 <tal:menu replace="structure view/@@+global-actions" />
35<div metal:fill-slot="main" class="pillar"35
36 tal:define="overview_menu context/menu:overview">36 <div id="polls" class="portlet">
3737 <h2>Current polls for
38 <div style="float:right; margin:0">38 &#8220;<span tal:replace="context/displayname" />&#8221;
39 <div id="privacy" tal:attributes="class view/public_private_css">39 </h2>
40 <div id="privacy-text">40
41 This team is41 <p tal:condition="not: view/hasCurrentPolls">
42 <tal:public condition="not: context/private">public</tal:public>42 This team has no open polls nor polls that are not yet opened.
43 <tal:private condition="context/private">private</tal:private>43 </p>
44 </div>44
45 </div>45 <ul tal:condition="view/hasCurrentPolls">
4646 <li tal:repeat="poll view/openpolls">
47 <div class="actions" style="text-align:right;"47 <a tal:attributes="href poll/fmt:url">
48 tal:condition="overview_menu/edit/enabled"48 <span tal:replace="poll/title" />
49 tal:content="structure overview_menu/edit/fmt:link-icon">49 </a> - closes
50 </div>50 <span
51 </div>51 tal:attributes="title poll/datecloses/fmt:datetime"
5252 tal:content="poll/datecloses/fmt:displaydate" />.
53 <tal:icon replace="structure context/image:mugshot" />53
5454 <tal:block define="user request/lp:person" condition="user">
55 <h1 tal:content="context/displayname" />55 <tal:block condition="python: poll.personVoted(user)">
5656 You have
57 <div57 <span tal:replace="poll/closesIn/fmt:approximateduration" />
58 class="description"58 to change your vote if you wish.
59 tal:condition="context/homepage_content"59 </tal:block>
60 tal:content="structure context/homepage_content/fmt:text-to-html"60
61 />61 <tal:block condition="python: not poll.personVoted(user)">
6262 You have
63 <div63 <span tal:replace="poll/closesIn/fmt:approximateduration" />
64 class="description"64 left to vote in this poll.
65 tal:content="structure context/teamdescription/fmt:text-to-html"65 </tal:block>
66 />66 </tal:block>
6767
68 <div class="portletBody portletContent" style="margin-bottom: 1em;"68 </li>
69 tal:define="can_view_membership context/@@+restricted-membership/userCanViewMembership">69
70 <div tal:content="structure context/@@+portlet-map" />70 <li tal:condition="view/userIsOwner"
71 </div>71 tal:repeat="poll view/notyetopenedpolls">
7272 <a tal:attributes="href poll/fmt:url">
73 <div class="portlet" id="contact-details">73 <span tal:replace="poll/title" />
74 <h2 tal:condition="context/is_team">Contact details</h2>74 </a> - opens
7575 <span
76 <div class="portletContent portletBody">76 tal:attributes="title poll/dateopens/fmt:datetime"
77 <tal:not_logged_in77 tal:content="poll/dateopens/fmt:displaydate" />
78 condition="view/email_address_visibility/is_login_required">78 </li>
79 <a href="+login">Log in</a> for email information.79 </ul>
80 </tal:not_logged_in>80
8181 <a tal:replace="structure overview_menu/polls/fmt:link" />
82 <tal:no_preferredemail82 <a tal:replace="structure overview_menu/add_poll/fmt:link" />
83 condition="view/email_address_visibility/are_none_available">83
84 No contact email84 </div>
85 <metal:define metal:define-macro="contact">85</div>
86 <tal:can-contact condition="view/can_contact">86
87 &nbsp; <img src="/@@/mail" alt="email"/>87<!-- heading slot. -->
88 <a href="+contactuser"88<div metal:fill-slot="heading">
89 tal:attributes="title view/contact_link_title"89 <div tal:attributes="class view/public_private_css">
90 tal:content="view/specific_contact_text">Contact this person</a>90 <tal:comment condition="nothing">
91 <tal:no_preferredemail91 Display striped image.
92 condition="view/email_address_visibility/are_none_available">92 </tal:comment>
93 <br /><small>(Launchpad notifications are sent to all93 </div>
94 team members)</small>94
95 </tal:no_preferredemail>95 <h1 style="margin: 0"
96 </tal:can-contact>96 tal:content="context/displayname"/>
97 </metal:define>97
98 </tal:no_preferredemail>98 <div
99 <tal:emails repeat="email view/visible_email_addresses">99 class="description"
100 <span style="white-space: nowrap">100 tal:condition="context/homepage_content"
101 <img src="/@@/mail" alt="mail" />101 tal:content="structure context/homepage_content/fmt:text-to-html"
102 <tal:email replace="email">foo2@bar.com</tal:email>102 />
103 <tal:contact condition="repeat/email/start">103
104 <tal:contact metal:use-macro="template/macros/contact" />104 <div
105 </tal:contact>105 class="description"
106 <br tal:omit-tag="repeat/email/end" />106 tal:content="structure context/teamdescription/fmt:text-to-html"
107 </span>107 />
108 </tal:emails>108</div>
109 <a tal:replace="structure overview_menu/editemail/fmt:icon" />109
110 <br /><strong>Languages:</strong>110<!-- main slot. -->
111 <tal:languages content="view/languages">English</tal:languages>111<div metal:fill-slot="main"
112 <a tal:attributes="href overview_menu/editlanguages/fmt:url" class="sprite edit">112 tal:define="overview_menu context/menu:overview">
113 <span class="invisible-link">Set preferred languages</span></a>113
114114 <div class="yui-g">
115 </div>115 <!-- First portlet column. -->
116 </div>116 <div class="first yui-u">
117117 <div tal:content="structure context/@@+portlet-membership" />
118 <div tal:replace="structure context/@@+portlet-ppas"/>118 <div tal:content="structure context/@@+portlet-ppas" />
119119 <metal:subteam-of use-macro="context/@@+person-macros/subteam-of" />
120 <div tal:content="structure context/@@+portlet-related-projects" />120 </div>
121121
122 <div id="mailing-lists" class="portlet">122 <!-- Second portlet column. -->
123 <h2>Mailing list</h2>123 <div class="yui-u">
124124 <div tal:content="structure context/@@+portlet-related-projects" />
125 <div class="portletBody portletContent">125 <metal:details use-macro="context/@@+person-macros/contact-details" />
126 <div126 <div tal:content="structure context/@@+portlet-mailinglist" />
127 tal:define="archive_url view/archive_url"127 </div>
128 tal:condition="archive_url">128 </div>
129 <img src="/@@/mail" alt="mail" />129
130 <a id="mailing-list-posting-address"130 <div tal:content="structure context/@@+portlet-map" />
131 tal:attributes="href string:mailto:${context/mailing_list/address}"131
132 tal:content="context/mailing_list/address">team@example.com</a>132</div>
133 <br />
134 <strong>Policy:</strong>
135 You must be a team member to subscribe to the team mailing list.
136 <br /><img src="/@@/mail" alt="email" /> <a id="mailing-list-archive"
137 tal:attributes="href archive_url">Mailing list archive</a>
138 <br /><img src="/@@/team" alt="team" /> <a id="mailing-list-subscribers"
139 tal:attributes="href context/fmt:url/+mailing-list-subscribers"
140 >Mailing list subscribers</a>
141 </div>
142 <div tal:condition="not: view/archive_url">
143 This team does not have a mailing list.
144 </div>
145 <div tal:condition="overview_menu/configure_mailing_list/enabled">
146 <tal:configure_mailing_list
147 replace="structure overview_menu/configure_mailing_list/fmt:link-icon" />
148 &nbsp;
149 <tal:moderate_mailing_list
150 replace="structure overview_menu/moderate_mailing_list/fmt:link-icon" />
151 </div>
152 <tal:block condition="view/userIsParticipant">
153 <div id="mailing-list-involvement"
154 tal:condition="view/team_has_mailing_list">
155 <tal:subscribed-to-list
156 condition="view/user_is_subscribed_to_list">
157 <form class="actions" id="form.list.unsubscribe" name="unsubscribe"
158 action="" method="post">
159 You are subscribed to the team mailing list.
160 <input type="submit" name="unsubscribe" value="Unsubscribe" />
161 </form>
162 </tal:subscribed-to-list>
163 <tal:can-subscribe-to-list
164 condition="view/user_can_subscribe_to_list">
165 You are not subscribed to the team mailing list.
166 (<a href="/people/+me/+editemails">Subscribe</a>)
167 </tal:can-subscribe-to-list>
168 </div>
169 </tal:block>
170 </div>
171 </div>
172
173 <div id="membership" class="portlet">
174 <h2>Members</h2>
175
176 <div id="membership-summary" class="portletBody portletContent"
177 style="margin-bottom: 1.5em;">
178 <div id="membership-summary">
179 This team has: <img src="/@@/team" alt="team" />
180 <strong><tal:active content="context/all_member_count" /></strong>
181 <a tal:attributes="href string:${context/fmt:url/+members}#active"
182 >active members</a><tal:invited
183 define="invited_member_count context/invited_member_count"
184 condition="invited_member_count">,
185 <strong><tal:invited_count content="context/invited_member_count" /></strong>
186 <a tal:attributes="href string:${context/fmt:url/+members}#invited"
187 >invited members</a></tal:invited><tal:proposed
188 define="proposed_member_count context/proposed_member_count"
189 condition="proposed_member_count">,
190 <strong><tal:proposed_count content="proposed_member_count" /></strong>
191 <a tal:attributes="href string:${context/fmt:url/+members}#proposed"
192 >proposed members</a>
193 </tal:proposed>
194 and is a
195 <span id="subscription-policy">
196 <strong><tal:policy replace="context/subscriptionpolicy/title" /></strong>
197 <img src="/@@/maybe"
198 tal:attributes="title context/subscriptionpolicy/description" />
199 </span>
200 <br />
201 <tal:members
202 replace="structure overview_menu/members/fmt:link" />
203 &nbsp;
204 <tal:mugshots
205 replace="structure overview_menu/mugshots/fmt:link" />
206 </div>
207
208 <p id="your-involvement" tal:condition="not: request/lp:person">
209 You must <a href="+login">log in</a>
210 to join or leave this team.
211 </p>
212
213 <p id="your-involvement" tal:condition="request/lp:person">
214 <tal:is-owner condition="view/userIsOwner">
215 <tal:team condition="context/teamowner/is_team">
216 You are a member of the team that owns this team.
217 </tal:team>
218 <tal:user condition="not: context/teamowner/is_team">
219 You are the owner of this team.
220 </tal:user>
221 <tal:absentee-owner condition="not: view/userIsActiveMember">
222 You are not currently an active member.
223 </tal:absentee-owner>
224 </tal:is-owner>
225
226 <tal:not-owner condition="not: view/userIsOwner">
227 <tal:active-member tal:condition="view/userIsActiveMember">
228 <tal:can-leave condition="view/userCanRequestToLeave">
229 You are a member of this team.
230 </tal:can-leave>
231 </tal:active-member>
232 <tal:not-active-member tal:condition="not: view/userIsActiveMember">
233 <tal:not-member condition="not: view/userIsParticipant">
234 You are not a member of this team.
235 </tal:not-member>
236 <tal:participant condition="view/userIsParticipant">
237 You are an indirect member of this team:
238 <br />
239 <a tal:replace="structure view/user/fmt:link"
240 >Guilherme Salgado</a>
241 <tal:path repeat="team view/findUserPathToTeam">
242 &rarr;
243 <a tal:replace="structure team/fmt:link"
244 >Launchpad Developers</a>
245 </tal:path>
246 </tal:participant>
247 </tal:not-active-member>
248 </tal:not-owner>
249 <tal:join-leave
250 replace="structure overview_menu/joinleave/fmt:link" />
251 <a tal:replace="structure overview_menu/reassign/fmt:icon">
252 Change owner</a>
253 <br />
254 &nbsp;
255 <tal:add_member
256 condition="overview_menu/add_member/enabled">
257 <a tal:replace="structure overview_menu/add_member/fmt:link" />
258 &nbsp;
259 </tal:add_member>
260 <tal:add_my_teams
261 condition="overview_menu/add_my_teams/enabled">
262 <a tal:replace="structure overview_menu/add_my_teams/fmt:link" />
263 &nbsp;
264 </tal:add_my_teams>
265 </p>
266 </div>
267
268 <tal:can-view condition="context/@@+restricted-membership/userCanViewMembership">
269 <table style="margin: 0px 0px .5em 0px;"
270 tal:condition="view/has_recent_approved_or_proposed_members">
271 <tr>
272 <td style="padding: 0px 3em 0px 0px" id="recently-approved"
273 tal:condition="view/recently_approved_members">
274 <h3 style="color:black; font-weight:bold; margin: 0px">Recently approved</h3>
275 <ul tal:condition="view/recently_approved_members">
276 <li tal:repeat="person view/recently_approved_members"
277 tal:content="structure person/fmt:link" />
278 </ul>
279 <div style="margin-top: 3px;">
280 <tal:mentorships
281 replace="structure overview_menu/mentorships/fmt:link" />
282 </div>
283 </td>
284 <td style="padding: 0px;" id="recently-applied"
285 tal:condition="view/recently_proposed_members">
286 <h3 style="color:black; font-weight:bold; margin: 0px">Recently applied</h3>
287 <ul>
288 <li tal:repeat="person view/recently_proposed_members"
289 tal:content="structure person/fmt:link" />
290 </ul>
291 <div style="margin-top: 3px;"
292 tal:condition="overview_menu/proposed_members/enabled"
293 tal:content="structure overview_menu/proposed_members/fmt:icon-link">
294 </div>
295 </td>
296 </tr>
297 </table>
298 </tal:can-view>
299 <div>
300
301 </div>
302 </div>
303 <div class="portlet" id="subteam-of">
304 <h2>Subteam of</h2>
305
306 <p tal:condition="not: context/super_teams">
307 &#8220;<span tal:replace="context/displayname"/>&#8221;
308 itself is not a member of any other team.
309 </p>
310
311 <tal:is-a-subteam condition="context/super_teams">
312 <p>
313 &#8220;<span tal:replace="context/displayname"/>&#8221;
314 is a member of these teams:
315 </p>
316 <ul class="iconed">
317 <li tal:repeat="team context/super_teams">
318 <tal:block replace="structure team/fmt:link" />
319 </li>
320 </ul>
321 </tal:is-a-subteam>
322
323 <p>
324 <tal:memberships
325 replace="structure overview_menu/memberships/fmt:link" />
326 &nbsp;
327 <tal:received_invitations
328 replace="structure overview_menu/received_invitations/fmt:link" />
329 </p>
330 </div>
331 </div>
332</body>133</body>
333</html>134</html>
334135
=== added file 'lib/lp/registry/templates/team-portlet-mailinglist.pt'
--- lib/lp/registry/templates/team-portlet-mailinglist.pt 1970-01-01 00:00:00 +0000
+++ lib/lp/registry/templates/team-portlet-mailinglist.pt 2009-08-21 13:48:43 +0000
@@ -0,0 +1,57 @@
1<tal:root
2 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5 omit-tag="">
6
7<div id="mailing-lists" class="portlet">
8 <h2>Mailing list</h2>
9
10 <div class="portletBody portletContent">
11 <div
12 tal:define="archive_url view/archive_url"
13 tal:condition="archive_url">
14 <img src="/@@/mail" alt="mail" />
15 <a id="mailing-list-posting-address"
16 tal:attributes="href string:mailto:${context/mailing_list/address}"
17 tal:content="context/mailing_list/address">team@example.com</a>
18 <br />
19 <strong>Policy:</strong>
20 You must be a team member to subscribe to the team mailing list.
21 <br /><img src="/@@/mail" alt="email" /> <a id="mailing-list-archive"
22 tal:attributes="href archive_url">Mailing list archive</a>
23 <br /><img src="/@@/team" alt="team" /> <a id="mailing-list-subscribers"
24 tal:attributes="href context/fmt:url/+mailing-list-subscribers"
25 >Mailing list subscribers</a>
26 </div>
27 <div tal:condition="not: view/archive_url">
28 This team does not have a mailing list.
29 </div>
30 <div tal:condition="context/menu:overview/configure_mailing_list/enabled">
31 <tal:configure_mailing_list
32 replace="structure context/menu:overview/configure_mailing_list/fmt:link-icon" />
33 &nbsp;
34 <tal:moderate_mailing_list
35 replace="structure context/menu:overview/moderate_mailing_list/fmt:link-icon" />
36 </div>
37 <tal:block condition="view/userIsParticipant">
38 <div id="mailing-list-involvement"
39 tal:condition="view/team_has_mailing_list">
40 <tal:subscribed-to-list
41 condition="view/user_is_subscribed_to_list">
42 <form class="actions" id="form.list.unsubscribe" name="unsubscribe"
43 action="" method="post">
44 You are subscribed to the team mailing list.
45 <input type="submit" name="unsubscribe" value="Unsubscribe" />
46 </form>
47 </tal:subscribed-to-list>
48 <tal:can-subscribe-to-list
49 condition="view/user_can_subscribe_to_list">
50 You are not subscribed to the team mailing list.
51 (<a href="/people/+me/+editemails">Subscribe</a>)
52 </tal:can-subscribe-to-list>
53 </div>
54 </tal:block>
55 </div>
56</div>
57</tal:root>
058
=== modified file 'lib/lp/registry/templates/team-portlet-map.pt'
--- lib/lp/registry/templates/team-portlet-map.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/registry/templates/team-portlet-map.pt 2009-08-21 13:48:43 +0000
@@ -5,16 +5,10 @@
5 omit-tag="">5 omit-tag="">
66
7<div class="portlet" id="portlet-map" style="margin-bottom: 0px;">7<div class="portlet" id="portlet-map" style="margin-bottom: 0px;">
8 <h2>Location</h2>
89
9 <tal:can_view condition="context/required:launchpad.View"10 <tal:can_view condition="context/required:launchpad.View"
10 define="link context/menu:overview/map">11 define="link context/menu:overview/map">
11 <div
12 tal:define="unmapped_count view/unmapped_participants_count"
13 tal:condition="unmapped_count">
14 <strong><tal:count replace="unmapped_count" /> member(s)</strong>
15 have not set their location. <a tal:attributes="href link/target">Do
16 it for them!</a>
17 </div>
18 <div style="width: 400px;" tal:condition="view/has_mapped_participants">12 <div style="width: 400px;" tal:condition="view/has_mapped_participants">
19 <div id="team_map_actions"13 <div id="team_map_actions"
20 style="position:relative; z-index: 9999;14 style="position:relative; z-index: 9999;
2115
=== added file 'lib/lp/registry/templates/team-portlet-membership.pt'
--- lib/lp/registry/templates/team-portlet-membership.pt 1970-01-01 00:00:00 +0000
+++ lib/lp/registry/templates/team-portlet-membership.pt 2009-08-21 13:48:43 +0000
@@ -0,0 +1,127 @@
1<tal:root
2 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5 omit-tag="">
6
7<div id="membership" class="portlet">
8 <h2>Members</h2>
9
10 <div id="membership-summary" class="portletBody portletContent"
11 style="margin-bottom: 1.5em;">
12 <div id="membership-summary">
13 This is a
14 <span>
15 <strong id="subscription-policy"
16 tal:content="context/subscriptionpolicy/title" />.
17 <img src="/@@/maybe"
18 tal:attributes="title context/subscriptionpolicy/description" />
19 </span>
20 <div>
21 <img src="/@@/team" alt="team" />
22 <strong><tal:active content="context/all_member_count" /></strong>
23 <a tal:attributes="href string:${context/fmt:url/+members}#active"
24 >active members</a><tal:invited
25 define="invited_member_count context/invited_member_count"
26 condition="invited_member_count">,
27 <strong>
28 <tal:invited_count content="context/invited_member_count" />
29 </strong>
30 <a tal:attributes="href string:${context/fmt:url/+members}#invited"
31 >invited members</a></tal:invited><tal:proposed
32 define="proposed_member_count context/proposed_member_count"
33 condition="proposed_member_count">,
34 <strong>
35 <tal:proposed_count content="proposed_member_count" />
36 </strong>
37 <a tal:attributes="href string:${context/fmt:url/+members}#proposed"
38 >proposed members</a>
39 </tal:proposed>
40 </div>
41 <tal:members
42 replace="structure context/menu:overview/members/fmt:link" />
43 &nbsp;
44 <tal:mugshots replace="structure context/menu:overview/mugshots/fmt:link" />
45 </div>
46
47 <p id="your-involvement" tal:condition="not: request/lp:person">
48 You must <a href="+login">log in</a>
49 to join or leave this team.
50 </p>
51
52 <div id="your-involvement" tal:condition="request/lp:person">
53 <tal:is-owner condition="view/userIsOwner">
54 <tal:team condition="context/teamowner/is_team">
55 You are a member of the team that owns this team.
56 </tal:team>
57 <tal:user condition="not: context/teamowner/is_team">
58 You are the owner of this team.
59 </tal:user>
60 <tal:absentee-owner condition="not: view/userIsActiveMember">
61 You are not currently an active member.
62 </tal:absentee-owner>
63 </tal:is-owner>
64
65 <tal:not-owner condition="not: view/userIsOwner">
66 <tal:active-member tal:condition="view/userIsActiveMember">
67 <tal:can-leave condition="view/userCanRequestToLeave">
68 You are a member of this team.
69 </tal:can-leave>
70 </tal:active-member>
71 <tal:not-active-member tal:condition="not: view/userIsActiveMember">
72 <tal:not-member condition="not: view/userIsParticipant">
73 You are not a member of this team.
74 </tal:not-member>
75 <tal:participant condition="view/userIsParticipant">
76 You are an indirect member of this team:
77 <br />
78 <a tal:replace="structure view/user/fmt:link"
79 >Guilherme Salgado</a>
80 <tal:path repeat="team view/findUserPathToTeam">
81 &rarr;
82 <a tal:replace="structure team/fmt:link"
83 >Launchpad Developers</a>
84 </tal:path>
85 </tal:participant>
86 </tal:not-active-member>
87 </tal:not-owner>
88 </div>
89 </div>
90 <tal:can-view
91 condition="context/@@+restricted-membership/userCanViewMembership"
92 define="overview_menu context/menu:overview">
93 <table style="margin: 0px 0px .5em 0px;"
94 tal:condition="view/has_recent_approved_or_proposed_members">
95 <tr>
96 <td style="padding: 0px 3em 0px 0px" id="recently-approved"
97 tal:condition="view/recently_approved_members">
98 <h3 style="color:black; font-weight:bold; margin: 0px">
99 Recently approved
100 </h3>
101 <ul tal:condition="view/recently_approved_members">
102 <li tal:repeat="person view/recently_approved_members"
103 tal:content="structure person/fmt:link" />
104 </ul>
105 <div style="margin-top: 3px;">
106 <tal:mentorships
107 replace="structure overview_menu/mentorships/fmt:link" />
108 </div>
109 </td>
110 <td style="padding: 0px;" id="recently-applied"
111 tal:condition="view/recently_proposed_members">
112 <h3 style="color:black; font-weight:bold; margin: 0px">
113 Recently applied
114 </h3>
115 <ul>
116 <li tal:repeat="person view/recently_proposed_members"
117 tal:content="structure person/fmt:link" />
118 </ul>
119 <div style="margin-top: 3px;"
120 tal:condition="overview_menu/proposed_members/enabled"
121 tal:content="structure overview_menu/proposed_members/fmt:icon-link">
122 </div>
123 </td>
124 </tr>
125 </table>
126 </tal:can-view>
127</tal:root>
0128
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-private-teams.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-private-teams.txt 2009-05-15 19:33:57 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-private-teams.txt 2009-08-21 13:48:43 +0000
@@ -29,6 +29,7 @@
29 >>> print_tag_with_id(browser.contents, 'ppas')29 >>> print_tag_with_id(browser.contents, 'ppas')
30 Personal package archives30 Personal package archives
31 Create a new PPA31 Create a new PPA
32 Maintained Packages
3233
33The form looks almost identical to that for a public team.34The form looks almost identical to that for a public team.
3435
3536
=== modified file 'lib/lp/soyuz/templates/person-portlet-ppas.pt'
--- lib/lp/soyuz/templates/person-portlet-ppas.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/person-portlet-ppas.pt 2009-08-21 15:16:48 +0000
@@ -10,20 +10,22 @@
1010
11 <div tal:replace="structure context/@@+ppas-list"/>11 <div tal:replace="structure context/@@+ppas-list"/>
1212
13 <div class="actions">13 <ul class="horizontal">
14 <p><tal:activate_ppa14 <li tal:define="link context/menu:overview/activate_ppa"
15 define="link context/menu:overview/activate_ppa"15 tal:condition="link/enabled"
16 condition="link/enabled"16 tal:content="structure link/fmt:icon-link" />
17 replace="structure link/fmt:icon-link" />17
18 </p>18 <li tal:define="link context/menu:overview/maintained"
19 <p><tal:is-person condition="not: context/is_team">19 tal:condition="link/enabled"
20 <tal:view_p3a_subscriptions20 tal:replace="structure link/fmt:icon-link" />
21 define="link context/menu:overview/view_ppa_subscriptions"21
22 condition="link/enabled"22 <tal:is-person condition="not: context/is_team">
23 replace="structure link/fmt:icon-link" />23 <li tal:define="link context/menu:overview/view_ppa_subscriptions"
24 </tal:is-person>24 tal:condition="link/enabled"
25 </p>25 tal:replace="structure link/fmt:icon-link" />
26 </div>26 </tal:is-person>
27
28 </ul>
27 </div>29 </div>
28 </div>30 </div>
29 </div>31 </div>
3032
=== modified file 'lib/lp/soyuz/templates/person-ppas.pt'
--- lib/lp/soyuz/templates/person-ppas.pt 2009-07-30 02:26:46 +0000
+++ lib/lp/soyuz/templates/person-ppas.pt 2009-08-21 13:48:43 +0000
@@ -4,7 +4,7 @@
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5 omit-tag="">5 omit-tag="">
6 <div tal:define="ppas context/ppas" tal:condition="ppas">6 <div tal:define="ppas context/ppas" tal:condition="ppas">
7 <table class="summary">7 <table>
8 <tal:ppa_line tal:repeat="ppa ppas">8 <tal:ppa_line tal:repeat="ppa ppas">
9 <tr>9 <tr>
10 <td tal:define="ppa_link ppa/fmt:link"10 <td tal:define="ppa_link ppa/fmt:link"