Merge lp:~bac/launchpad/bug-432163-join-link into lp:launchpad

Proposed by Brad Crittenden
Status: Merged
Merged at revision: not available
Proposed branch: lp:~bac/launchpad/bug-432163-join-link
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~bac/launchpad/bug-432163-join-link
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Canonical Launchpad Engineering Pending
Review via email: mp+12064@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

= Summary =

Bug 432163 notes that the 'Join this team' link is absurdly large and trying to pass
itself off as a download link.

== Proposed fix ==

Remove the hard-coded bits from the page template and add 'join' to the
TeamIndexMenu. It'll then show up in the correct portlet and the conditional logic
will just work.

== Pre-implementation notes ==

None.

== Implementation details ==

As above.

== Tests ==

bin/test -vvm lp.registry -t stories/teammembership

but for fun I just run all registry tests.

== Demo and Q/A ==

Go to an open membership team you aren't a member. Note the appropriately sized and
located 'Join this team' link. Join the team. Note the link is not present but
'Leave' is.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/registry/templates/team-index.pt
  lib/lp/registry/browser/person.py

== Pylint notices ==

lib/lp/registry/browser/person.py
    117: [F0401] Unable to import 'lazr.delegates' (No module named delegates)
    118: [F0401] Unable to import 'lazr.config' (No module named config)
    119: [F0401] Unable to import 'lazr.restful.interface' (No module named restful)

Revision history for this message
Curtis Hovey (sinzui) wrote :

Thanks.

review: Approve (code)
Revision history for this message
Brad Crittenden (bac) wrote :

I'm bundling this trivial change for bug 432427:

=== modified file 'lib/lp/registry/templates/person-index.pt'
--- lib/lp/registry/templates/person-index.pt 2009-09-16 17:56:17 +0000
+++ lib/lp/registry/templates/person-index.pt 2009-09-18 15:38:47 +0000
@@ -71,7 +71,7 @@
           tal:attributes="href context/fmt:url:translations">Translations</a>
       </li>
       <li>
- <a class="sprite blueprints"
+ <a class="sprite code"
           tal:attributes="href context/fmt:url:code">Code</a>
       </li>
       <li>

Revision history for this message
Curtis Hovey (sinzui) wrote :

> I'm bundling this trivial change for bug 432427:
>
> === modified file 'lib/lp/registry/templates/person-index.pt'
...

> - <a class="sprite blueprints"
> + <a class="sprite code"
> tal:attributes="href context/fmt:url:code">Code</a>

Thanks.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/person.py'
2--- lib/lp/registry/browser/person.py 2009-09-18 06:25:54 +0000
3+++ lib/lp/registry/browser/person.py 2009-09-18 15:11:08 +0000
4@@ -5769,7 +5769,8 @@
5 usedfor = ITeamIndexMenu
6 facet = 'overview'
7 title = 'Change team'
8- links = ('edit', 'add_member', 'add_my_teams', 'leave')
9+ links = ('edit', 'join', 'add_member', 'add_my_teams',
10+ 'leave')
11
12
13 class TeamEditMenu(TeamNavigationMenuBase):
14
15=== modified file 'lib/lp/registry/templates/team-index.pt'
16--- lib/lp/registry/templates/team-index.pt 2009-09-16 13:46:16 +0000
17+++ lib/lp/registry/templates/team-index.pt 2009-09-18 15:11:08 +0000
18@@ -30,17 +30,6 @@
19 <span tal:content="view/visibility_info">Viewable by team members.</span>
20 </div>
21
22- <ul id="join-team"
23- class="super-add-action"
24- tal:define="link context/menu:overview/join"
25- tal:condition="link/enabled"
26- >
27- <li>
28- <a tal:attributes="href link/fmt:url"
29- tal:content="link/text" />
30- </li>
31- </ul>
32-
33 <tal:menu replace="structure view/@@+global-actions" />
34 <tal:polls replace="structure context/@@+portlet-polls" />
35