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
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py 2009-09-18 06:25:54 +0000
+++ lib/lp/registry/browser/person.py 2009-09-18 15:11:08 +0000
@@ -5769,7 +5769,8 @@
5769 usedfor = ITeamIndexMenu5769 usedfor = ITeamIndexMenu
5770 facet = 'overview'5770 facet = 'overview'
5771 title = 'Change team'5771 title = 'Change team'
5772 links = ('edit', 'add_member', 'add_my_teams', 'leave')5772 links = ('edit', 'join', 'add_member', 'add_my_teams',
5773 'leave')
57735774
57745775
5775class TeamEditMenu(TeamNavigationMenuBase):5776class TeamEditMenu(TeamNavigationMenuBase):
57765777
=== modified file 'lib/lp/registry/templates/team-index.pt'
--- lib/lp/registry/templates/team-index.pt 2009-09-16 13:46:16 +0000
+++ lib/lp/registry/templates/team-index.pt 2009-09-18 15:11:08 +0000
@@ -30,17 +30,6 @@
30 <span tal:content="view/visibility_info">Viewable by team members.</span>30 <span tal:content="view/visibility_info">Viewable by team members.</span>
31 </div>31 </div>
3232
33 <ul id="join-team"
34 class="super-add-action"
35 tal:define="link context/menu:overview/join"
36 tal:condition="link/enabled"
37 >
38 <li>
39 <a tal:attributes="href link/fmt:url"
40 tal:content="link/text" />
41 </li>
42 </ul>
43
44 <tal:menu replace="structure view/@@+global-actions" />33 <tal:menu replace="structure view/@@+global-actions" />
45 <tal:polls replace="structure context/@@+portlet-polls" />34 <tal:polls replace="structure context/@@+portlet-polls" />
4635