Merge lp:~thumper/launchpad/new-import-link-move into lp:launchpad

Proposed by Tim Penhey
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 10487
Proposed branch: lp:~thumper/launchpad/new-import-link-move
Merge into: lp:launchpad
Diff against target: 41 lines (+7/-2)
3 files modified
lib/lp/registry/browser/productseries.py (+1/-1)
lib/lp/registry/browser/tests/productseries-views.txt (+5/-0)
lib/lp/registry/templates/productseries-codesummary.pt (+1/-1)
To merge this branch: bzr merge lp:~thumper/launchpad/new-import-link-move
Reviewer Review Type Date Requested Status
Paul Hummer (community) Approve
Review via email: mp+21088@code.launchpad.net

Commit message

Make the new import link on the product series page got to a page that doesn't lose the product context.

Description of the change

Make the import hyperlink on the product series page go the the +new-import page for the project rather than the generic +code-imports/+new page.

Also add text mentioning mercurial imports.

To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) :
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/productseries.py'
--- lib/lp/registry/browser/productseries.py 2010-02-08 20:11:17 +0000
+++ lib/lp/registry/browser/productseries.py 2010-03-10 22:19:18 +0000
@@ -309,7 +309,7 @@
309 @property309 @property
310 def request_import_link(self):310 def request_import_link(self):
311 """A link to the page for requesting a new code import."""311 """A link to the page for requesting a new code import."""
312 return canonical_url(getUtility(ICodeImportSet), view_name='+new')312 return canonical_url(self.context.product, view_name='+new-import')
313313
314 @property314 @property
315 def user_branch_visible(self):315 def user_branch_visible(self):
316316
=== modified file 'lib/lp/registry/browser/tests/productseries-views.txt'
--- lib/lp/registry/browser/tests/productseries-views.txt 2010-02-09 05:13:05 +0000
+++ lib/lp/registry/browser/tests/productseries-views.txt 2010-03-10 22:19:18 +0000
@@ -107,6 +107,11 @@
107 >>> print view.latest_release_with_download_files.version107 >>> print view.latest_release_with_download_files.version
108 0.9.2108 0.9.2
109109
110The view also provides a link to register a new code import.
111
112 >>> print view.request_import_link
113 http://launchpad.dev/firefox/+new-import
114
110115
111Edit ProductSeries116Edit ProductSeries
112------------------117------------------
113118
=== modified file 'lib/lp/registry/templates/productseries-codesummary.pt'
--- lib/lp/registry/templates/productseries-codesummary.pt 2009-11-13 20:14:41 +0000
+++ lib/lp/registry/templates/productseries-codesummary.pt 2010-03-10 22:19:18 +0000
@@ -54,7 +54,7 @@
54 </li>54 </li>
5555
56 <li>56 <li>
57 If the code is in git, CVS or Subversion you can57 If the code is in Git, Mercurial, CVS or Subversion you can
58 <a tal:attributes="href view/request_import_link">request that the branch be imported to Bazaar</a>.58 <a tal:attributes="href view/request_import_link">request that the branch be imported to Bazaar</a>.
59 </li>59 </li>
60 </ul>60 </ul>