Merge lp://staging/~sinzui/launchpad/pillar-portlets into lp://staging/launchpad

Proposed by Curtis Hovey
Status: Merged
Approved by: Aaron Bentley
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp://staging/~sinzui/launchpad/pillar-portlets
Merge into: lp://staging/launchpad
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~sinzui/launchpad/pillar-portlets
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+10932@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is my branch to fix involvement links.

    lp:~sinzui/launchpad/pillar-portlets
    Diff size: 53
    Launchpad bug: https://bugs.launchpad.net/bugs/416125
                   https://bugs.launchpad.net/bugs/418548
                   https://bugs.launchpad.net/bugs/421899
    Test command: ./bin/test -vvt "pillar-views"
    Pre-implementation: no-one, I trust the bug reporters
    Target release: 3.1.0

= Fix involvement links and official portlets =

Bug 416125 [product homepage's submit code link leads to +filebug]
    The link is to file a bug, not register a branch.

Bug 418548 [Help translate" link in Get involved portlet is broken]
    The link is missing the pillar; it goes to the root.

Bug 421899 [register a blueprint" leads to a 404 on edge]
    The link is register a branch, not a spec.

== Rules ==

Bug 416125 [product homepage's submit code link leads to +filebug]
    * Change the link to +addbranch.

Bug 418548 [Help translate" link in Get involved portlet is broken]
    * Replace '/' with '' because the former removes the context from
      the URL.

Bug 421899 [register a blueprint" leads to a 404 on edge]
    * Change the link to +addspec.

== QA ==

Bug 416125 [product homepage's submit code link leads to +filebug]
    * Visit https://edge.launchpad.net/epidermis
    * Verify that the submit code link goes to +addbranch

Bug 418548 [Help translate" link in Get involved portlet is broken]
    * Visit https://edge.launchpad.net/epidermis
    * Verify that the submit code link goes to
      https://translate.edge.launchpad.net/epidermis

Bug 421899 [register a blueprint" leads to a 404 on edge]
    * Visit https://edge.launchpad.net/epidermis
     * Verify that the register a blueprint link goes to +addspec

== Lint ==

Linting changed files:
  lib/lp/registry/browser/pillar.py
  lib/lp/registry/browser/tests/pillar-views.txt

== Test ==

    * lib/lp/registry/browser/tests/pillar-views.txt
      * Added a test of the entire menu. The tests for whether a link
        is enabled are fine, but there was not a test to verify the target.

== Implementation ==

    * lib/lp/registry/browser/pillar.py
      * Fixed the target param of three links.

Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Curtis Hovey wrote:
> Curtis Hovey has proposed merging lp:~sinzui/launchpad/pillar-portlets into lp:launchpad/devel.
>
> Requested reviews:
> Canonical Launchpad Engineering (launchpad)
>
> This is my branch to fix involvement links.

 merge approved

Looks good.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqcJY4ACgkQ0F+nu1YWqI3L6ACfYMa3EwkryNe7cBWIaAUR5qR/
UQEAnidFb+sCUZUEbZr9FdiJ9OhgyrxG
=ebQn
-----END PGP SIGNATURE-----

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/pillar.py'
--- lib/lp/registry/browser/pillar.py 2009-08-28 13:58:36 +0000
+++ lib/lp/registry/browser/pillar.py 2009-08-31 16:37:27 +0000
@@ -49,17 +49,17 @@
4949
50 def help_translate(self):50 def help_translate(self):
51 return Link(51 return Link(
52 '/', 'Help translate', site='translations', icon='translations',52 '', 'Help translate', site='translations', icon='translations',
53 enabled=self.context.official_rosetta)53 enabled=self.context.official_rosetta)
5454
55 def submit_code(self):55 def submit_code(self):
56 return Link(56 return Link(
57 '+filebug', 'Submit code', site='code', icon='code',57 '+addbranch', 'Submit code', site='code', icon='code',
58 enabled=self.context.official_codehosting)58 enabled=self.context.official_codehosting)
5959
60 def register_blueprint(self):60 def register_blueprint(self):
61 return Link(61 return Link(
62 '+addbranch', 'Register a blueprint', site='blueprints',62 '+addspec', 'Register a blueprint', site='blueprints',
63 icon='blueprints', enabled=self.context.official_blueprints)63 icon='blueprints', enabled=self.context.official_blueprints)
6464
6565
6666
=== modified file 'lib/lp/registry/browser/tests/pillar-views.txt'
--- lib/lp/registry/browser/tests/pillar-views.txt 2009-08-28 12:01:43 +0000
+++ lib/lp/registry/browser/tests/pillar-views.txt 2009-08-31 16:37:27 +0000
@@ -120,3 +120,23 @@
120 >>> for link in view.enabled_links:120 >>> for link in view.enabled_links:
121 ... print link.name121 ... print link.name
122 report_bug ask_question122 report_bug ask_question
123
124
125Involvement links
126-----------------
127
128The pillar involvement view uses the InvolvedMenu when rendering links:
129
130 >>> from operator import attrgetter
131 >>> from canonical.launchpad.webapp.tales import MenuAPI
132
133 >>> view = create_view(product, '+get-involved')
134 >>> menuapi = MenuAPI(view)
135 >>> for link in sorted(
136 ... menuapi.navigation.values(), key=attrgetter('sort_key')):
137 ... print link.url
138 http://bugs.launchpad.dev/bread/+filebug
139 http://answers.launchpad.dev/bread/+addquestion
140 http://translations.launchpad.dev/bread
141 http://code.launchpad.dev/bread/+addbranch
142 http://blueprints.launchpad.dev/bread/+addspec
123143