Merge lp:~jcsackett/launchpad/add-member-648476 into lp:launchpad

Proposed by j.c.sackett
Status: Merged
Approved by: Māris Fogels
Approved revision: no longer in the source branch.
Merged at revision: 11766
Proposed branch: lp:~jcsackett/launchpad/add-member-648476
Merge into: lp:launchpad
Diff against target: 89 lines (+21/-8)
2 files modified
lib/lp/registry/browser/tests/team-views.txt (+16/-8)
lib/lp/registry/templates/team-members.pt (+5/-0)
To merge this branch: bzr merge lp:~jcsackett/launchpad/add-member-648476
Reviewer Review Type Date Requested Status
Māris Fogels (community) Approve
Review via email: mp+38887@code.launchpad.net

Commit message

Adds the "Add member" link to the block that displays in the member listing when there are no members; team owners should still have access to this link, regardless of membership status.

Description of the change

Summary
=======

The +members page doesn't show the +Add member button when there are no members of the team; since there can still be a teamowner and that teamowner should still have control (even if his membership is deactivated) the button should still be present, as it is in the overview page.

Proposed fix
============

Change the display conditions of the Add member link so it's always present for the team owner.

Preimplementation talk
======================

Spoke with Curtis Hovey.

Implementation details
======================

The conditions aren't actually the problem--the link is inside a block that displays when there are members. This branch simply adds it to the block that displays when there aren't members as well.

Tests
=====

bin/test -vvct team-views

Q&A
===

Create a team in launchpad.dev. Deactivate your membership (as the owner) and go to +members for the team. You should see the message saying there are no members, and below that an add member link.

Lint
====

make lint output:

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/browser/tests/team-views.txt
  lib/lp/registry/templates/team-members.pt

To post a comment you must log in.
Revision history for this message
Māris Fogels (mars) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/registry/browser/tests/team-views.txt'
--- lib/lp/registry/browser/tests/team-views.txt 2010-10-03 15:30:06 +0000
+++ lib/lp/registry/browser/tests/team-views.txt 2010-10-20 13:33:08 +0000
@@ -1,6 +1,8 @@
1= Team pages =1Team pages
2==========
23
3== Home page ==4Home page
5---------
46
5 >>> from canonical.launchpad.interfaces import (7 >>> from canonical.launchpad.interfaces import (
6 ... IPersonSet, ITeamMembershipSet)8 ... IPersonSet, ITeamMembershipSet)
@@ -65,7 +67,8 @@
65 form fields.67 form fields.
6668
6769
68== +map-portlet ==70+map-portlet
71------------
6972
70The team profile page contain the location portlet that shows a map.73The team profile page contain the location portlet that shows a map.
7174
@@ -90,7 +93,8 @@
90 >>> team_view = create_initialized_view(93 >>> team_view = create_initialized_view(
91 ... ubuntu_team, '+index', cookie=cookie)94 ... ubuntu_team, '+index', cookie=cookie)
9295
93== +map ==96+map
97----
9498
95A team's +map page will show a map with markers on the location of all99A team's +map page will show a map with markers on the location of all
96members of that team. That page also lists the local times of members.100members of that team. That page also lists the local times of members.
@@ -192,7 +196,8 @@
192 min_lng: -46...196 min_lng: -46...
193197
194198
195== Contacting the team ==199Contacting the team
200-------------------
196201
197Logged in users can contact any other Launchpad user through a 'Contact this202Logged in users can contact any other Launchpad user through a 'Contact this
198user' feature (see person-pages.txt). Similarly, a logged in user can contact203user' feature (see person-pages.txt). Similarly, a logged in user can contact
@@ -213,7 +218,8 @@
213 Contact this team's owner218 Contact this team's owner
214219
215220
216== Mugshots ==221Mugshots
222--------
217223
218The mugshots for all members of a team can be seen on the +mugshots224The mugshots for all members of a team can be seen on the +mugshots
219page. The display of mugshots is batched.225page. The display of mugshots is batched.
@@ -240,7 +246,8 @@
240 <Person at ... mark (Mark Shuttleworth)>246 <Person at ... mark (Mark Shuttleworth)>
241247
242248
243== Privacy and visibility ==249Privacy and visibility
250----------------------
244251
245Team visibility is used on the page to indicate privacy. GuadaMen is a public252Team visibility is used on the page to indicate privacy. GuadaMen is a public
246team.253team.
@@ -266,7 +273,8 @@
266 >>> print view.visibility_portlet_class273 >>> print view.visibility_portlet_class
267 portlet private274 portlet private
268275
269== +add-my-teams ==276+add-my-teams
277-------------
270278
271This page lists the teams that you administer and can add as a member279This page lists the teams that you administer and can add as a member
272to the current team. Private teams cannot be added as members to another280to the current team. Private teams cannot be added as members to another
273281
=== modified file 'lib/lp/registry/templates/team-members.pt'
--- lib/lp/registry/templates/team-members.pt 2010-06-24 20:07:30 +0000
+++ lib/lp/registry/templates/team-members.pt 2010-10-20 13:33:08 +0000
@@ -102,6 +102,11 @@
102 </h2>102 </h2>
103103
104 <p>This team doesn't have any members yet.</p>104 <p>This team doesn't have any members yet.</p>
105
106 <div tal:define="link view/menu:overview/add_member"
107 tal:condition="link/enabled">
108 <a tal:replace="structure link/fmt:link" />
109 </div>
105 </li>110 </li>
106 <br />111 <br />
107112