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
1=== modified file 'lib/lp/registry/browser/tests/team-views.txt'
2--- lib/lp/registry/browser/tests/team-views.txt 2010-10-03 15:30:06 +0000
3+++ lib/lp/registry/browser/tests/team-views.txt 2010-10-20 13:33:08 +0000
4@@ -1,6 +1,8 @@
5-= Team pages =
6+Team pages
7+==========
8
9-== Home page ==
10+Home page
11+---------
12
13 >>> from canonical.launchpad.interfaces import (
14 ... IPersonSet, ITeamMembershipSet)
15@@ -65,7 +67,8 @@
16 form fields.
17
18
19-== +map-portlet ==
20++map-portlet
21+------------
22
23 The team profile page contain the location portlet that shows a map.
24
25@@ -90,7 +93,8 @@
26 >>> team_view = create_initialized_view(
27 ... ubuntu_team, '+index', cookie=cookie)
28
29-== +map ==
30++map
31+----
32
33 A team's +map page will show a map with markers on the location of all
34 members of that team. That page also lists the local times of members.
35@@ -192,7 +196,8 @@
36 min_lng: -46...
37
38
39-== Contacting the team ==
40+Contacting the team
41+-------------------
42
43 Logged in users can contact any other Launchpad user through a 'Contact this
44 user' feature (see person-pages.txt). Similarly, a logged in user can contact
45@@ -213,7 +218,8 @@
46 Contact this team's owner
47
48
49-== Mugshots ==
50+Mugshots
51+--------
52
53 The mugshots for all members of a team can be seen on the +mugshots
54 page. The display of mugshots is batched.
55@@ -240,7 +246,8 @@
56 <Person at ... mark (Mark Shuttleworth)>
57
58
59-== Privacy and visibility ==
60+Privacy and visibility
61+----------------------
62
63 Team visibility is used on the page to indicate privacy. GuadaMen is a public
64 team.
65@@ -266,7 +273,8 @@
66 >>> print view.visibility_portlet_class
67 portlet private
68
69-== +add-my-teams ==
70++add-my-teams
71+-------------
72
73 This page lists the teams that you administer and can add as a member
74 to the current team. Private teams cannot be added as members to another
75
76=== modified file 'lib/lp/registry/templates/team-members.pt'
77--- lib/lp/registry/templates/team-members.pt 2010-06-24 20:07:30 +0000
78+++ lib/lp/registry/templates/team-members.pt 2010-10-20 13:33:08 +0000
79@@ -102,6 +102,11 @@
80 </h2>
81
82 <p>This team doesn't have any members yet.</p>
83+
84+ <div tal:define="link view/menu:overview/add_member"
85+ tal:condition="link/enabled">
86+ <a tal:replace="structure link/fmt:link" />
87+ </div>
88 </li>
89 <br />
90