Merge lp:~edwin-grubbs/launchpad/bug-490593-configure-involvement-portlet into lp:launchpad

Proposed by Edwin Grubbs
Status: Merged
Approved by: Curtis Hovey
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~edwin-grubbs/launchpad/bug-490593-configure-involvement-portlet
Merge into: lp:launchpad
Diff against target: 1459 lines (+524/-182)
34 files modified
Makefile (+3/-0)
lib/canonical/launchpad/icing/style-3-0.css.in (+26/-5)
lib/canonical/launchpad/pagetests/standalone/xx-form-layout.txt (+2/-1)
lib/lp/blueprints/browser/specificationtarget.py (+1/-1)
lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt (+4/-2)
lib/lp/bugs/stories/bugs/xx-front-page-info.txt (+1/-1)
lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt (+2/-1)
lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt (+2/-1)
lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt (+11/-11)
lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt (+2/-1)
lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt (+1/-1)
lib/lp/bugs/stories/initial-bug-contacts/10-set-upstream-bugcontact.txt (+2/-2)
lib/lp/bugs/templates/bugtarget-bugs.pt (+8/-3)
lib/lp/bugs/templates/bugtarget-macros-filebug.pt (+1/-1)
lib/lp/code/stories/branches/xx-branch-tag-cloud.txt (+7/-5)
lib/lp/code/stories/branches/xx-product-branches.txt (+12/-8)
lib/lp/registry/browser/configure.zcml (+42/-0)
lib/lp/registry/browser/pillar.py (+72/-4)
lib/lp/registry/browser/product.py (+101/-23)
lib/lp/registry/browser/productseries.py (+24/-20)
lib/lp/registry/browser/tests/pillar-views.txt (+46/-14)
lib/lp/registry/doc/product.txt (+6/-3)
lib/lp/registry/model/product.py (+6/-2)
lib/lp/registry/stories/product/xx-product-development-focus.txt (+32/-16)
lib/lp/registry/stories/product/xx-product-edit.txt (+4/-2)
lib/lp/registry/stories/product/xx-product-launchpad-usage.txt (+40/-17)
lib/lp/registry/templates/pillar-involvement-portlet.pt (+30/-3)
lib/lp/registry/templates/product-index.pt (+0/-4)
lib/lp/translations/stories/productseries/xx-productseries-translations.txt (+10/-10)
lib/lp/translations/stories/standalone/xx-product-translations.txt (+8/-7)
lib/lp/translations/stories/translationgroups/15-product-translation-group.txt (+3/-2)
lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt (+1/-1)
lib/lp/translations/stories/translations/55-rosetta-potemplates.txt (+2/-1)
lib/lp/translations/templates/product-portlet-not-using-launchpad.pt (+12/-9)
To merge this branch: bzr merge lp:~edwin-grubbs/launchpad/bug-490593-configure-involvement-portlet
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code ui Approve
Review via email: mp+21524@code.launchpad.net

Description of the change

Summary
-------

This branch uses the "Get Involved" portlet to encourage users to link
projects to the upstream bug tracker. In a later branch, we may open
up permissions to more than the project owner.

Implementation details
----------------------

Drive-by cleanups.
    Makefile
    lib/lp/blueprints/browser/specificationtarget.py

Split out form elements for configuring Launchpad services into seperate
forms. The visible_disabled_links attributes displays disabled links for
projects that don't have Bugs or Branches configured.
    lib/lp/registry/browser/configure.zcml
    lib/lp/registry/browser/pillar.py
    lib/lp/registry/browser/product.py
    lib/lp/registry/stories/product/xx-product-launchpad-usage.txt
    lib/lp/registry/browser/tests/pillar-views.txt
    lib/lp/registry/templates/pillar-involvement-portlet.pt

Added styles for a disabled version of the Get Involved links.
    lib/canonical/launchpad/icing/style-3-0.css.in

Fixed links that were pointing to +edit.
    lib/lp/bugs/templates/bugtarget-bugs.pt
    lib/lp/bugs/templates/bugtarget-macros-filebug.pt
    lib/lp/translations/templates/product-portlet-not-using-launchpad.pt

Fixed tests that were expecting to use +edit.
    lib/canonical/launchpad/pagetests/standalone/xx-form-layout.txt
    lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt
    lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt
    lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt
    lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt
    lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt
    lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt
    lib/lp/bugs/stories/initial-bug-contacts/10-set-upstream-bugcontact.txt
    lib/lp/code/stories/branches/xx-branch-tag-cloud.txt
    lib/lp/code/stories/branches/xx-product-branches.txt
    lib/lp/registry/stories/product/xx-product-edit.txt
    lib/lp/translations/stories/productseries/xx-productseries-translations.txt
    lib/lp/translations/stories/standalone/xx-product-translations.txt
    lib/lp/translations/stories/translationgroups/15-product-translation-group.txt
    lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt
    lib/lp/translations/stories/translations/55-rosetta-potemplates.txt

Tests
-----

./bin/test -vv -t whatever '/xx-product-launchpad-usage.txt|/pillar-views.txt|/xx-form-layout.txt|/xx-upstream-bugtracker-links.txt|/bugtrackers-index.txt|/xx-bugtracker.txt|/xx-bug-reporting-guidelines.txt|/xx-no-launchpadder.txt|/xx-project-guided-filebug.txt|/xx-branch-tag-cloud.txt|/xx-product-branches.txt|/xx-product-edit.txt|/xx-productseries-translations.txt|/xx-product-translations.txt|stories/initial-bug-contacts|stories/translationgroups|stories/translations'

Demo and Q/A
------------

* Open http://launchpad.dev/firefox
  * Test the new forms and links for:
    * Configure Launchpad Answers
    * Configure Launchpad Branches
    * Configure Launchpad Bugs
    * Configure Launchpad Translations
* Open http://blueprints.launchpad.dev/firefox
    * There should be a "Configure Launchpad Blueprints" link.
* Open http://translations.launchpad.dev/firefox
    * If translations is disabled, there should be a
      "Configure Launchpad Translations" link.
* Open http://bugs.launchpad.dev/firefox
    * If the project is not using launchpad for bug tracking,
      there should be a "Configure Launchpad Bugs" link.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :
Download full text (10.4 KiB)

Hi Edwin.

I really appreciate your effort to solve this usability issue.

UI/Usability
------------

! As the owner of thunderbird, I saw that the "Report a bug" was disabled. I
  used "Configure Launchpad bugs" and choose The Mozilla.org bug tracker and
  provided the remove project.
  * I still see "Report a bug" (This service needs configuration). This is
    wrong. I provided the real information that should satisfy other
    contributors. I expect to see the warning disappear.

! As the owner of Firefox and thunderbird, I expect to see a warning that
  "Development focus branch has not been specified" which I can see in the
  Project information portlet.
  * I think this is a case where official_codehosting is a bogus attribute.
    We know if the project officially uses code if the branch is neither a
    mirror or import. I expect the Involvement portlet to tell me that this
    is a problem.
  * As an anonymous user I should see a warning that the development focus is
    missing a branch in the Involvement portlet.
  * May be call for action should also be repeated on the series page since
    that is the object that is being edited.

! As the user of evolution, a project that has a link to a package with
  I expect to see a warning that translation syncing should be setup.
  The owner certainly can set official/unofficial usage, but any user
  can enable series sync, and should if Ubuntu has translations for it.
  * This is a unique case were any user can set this. This information
    must be shown on the series overview for any user to act on.
  * We may want alternate configuration link or tool tips about the
    problem.
  * This is case is harder than the others because the official_translations
    attribute is legitimate.

! I think the message for all these services is wrong. We want the user
  to tell Launchpad where the service is and maybe configure it if the
  service is Launchpad's. In the bug tracker example. we need to know the
  bug tracker, and the owner wants to tell every one about the official
  tracker; no one is asking users to enable Launchpad Bugs.

* I noticed that as an anonymous user or no-priv that the Involvement portlet
  has about 1em extra padding in the bottom. Oh. The markup has an empty
  <ul>; this is invalid HTML.

* I Think the "Uses Launchpad for" item in the Project information portlet
  may be redundant. We can discuss removing it after we are certain that this
  change is all the information needed. I suspect we need to disable answers
  and blueprints first since they are effectively on and it is not clear
  that the involvement portlet is 100% related to official uses. Of course,
  the involvement portlet is not just about official uses anymore either.

* Think the "Development focus branch has not been specified" link in
  the Project information portlet may be removable if we solve the Involvement
  portlet issues.

* Note to self, we may want to remove official_translations from distros.
  Only Ubuntu can use translations. I recall there was a complaint from a
  user that we cannot set a distro bug tracker.

I see your configuration for the bug tracker is similar to my branch and I
...

review: Needs Fixing (code ui)
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (23.5 KiB)

> Hi Edwin.
>
> I really appreciate your effort to solve this usability issue.
>
> UI/Usability
> ------------
>
> ! As the owner of thunderbird, I saw that the "Report a bug" was disabled. I
> used "Configure Launchpad bugs" and choose The Mozilla.org bug tracker and
> provided the remove project.
> * I still see "Report a bug" (This service needs configuration). This is
> wrong. I provided the real information that should satisfy other
> contributors. I expect to see the warning disappear.

Hi Curtis,

Thanks for the review.

As we discussed on Skype, I will focus on code hosting now and fix the logic for displaying the bug tracker warning in another branch.

I have not fixed any of the unit tests for these recent changes, since I want to get your input on the UI changes first. You will notice that "Configure code hosting" switches between a plus-icon and an edit-icon, since I'm re-using the original menu item for +linkbranch. The plus-icon doesn't really make sense with the "configure" verb, but I think it is worth contemplating the use of a different icon to indicate unconfigured services.

> ! As the owner of Firefox and thunderbird, I expect to see a warning that
> "Development focus branch has not been specified" which I can see in the
> Project information portlet.
> * I think this is a case where official_codehosting is a bogus attribute.
> We know if the project officially uses code if the branch is neither a
> mirror or import. I expect the Involvement portlet to tell me that this
> is a problem.
> * As an anonymous user I should see a warning that the development focus is
> missing a branch in the Involvement portlet.
> * May be call for action should also be repeated on the series page since
> that is the object that is being edited.

I'm confused here, since a little further down you comment that the warning could be removed from the Project information portlet. Do you want a more noticeable warning message in the involvement portlet than a tooltip?

> ! As the user of evolution, a project that has a link to a package with
> I expect to see a warning that translation syncing should be setup.
> The owner certainly can set official/unofficial usage, but any user
> can enable series sync, and should if Ubuntu has translations for it.
> * This is a unique case were any user can set this. This information
> must be shown on the series overview for any user to act on.
> * We may want alternate configuration link or tool tips about the
> problem.
> * This is case is harder than the others because the official_translations
> attribute is legitimate.

We agreed to handle translations later.

> ! I think the message for all these services is wrong. We want the user
> to tell Launchpad where the service is and maybe configure it if the
> service is Launchpad's. In the bug tracker example. we need to know the
> bug tracker, and the owner wants to tell every one about the official
> tracker; no one is asking users to enable Launchpad Bugs.

I tried improving the tooltip for the warnings.

> * I noticed that as an anonymous user or no-priv that the Involve...

Revision history for this message
Curtis Hovey (sinzui) wrote :
Download full text (7.5 KiB)

Hi Edwin.

I have a couple suggestion and questions that I think will take a few minutes
to resolve.

Using the UI:

    * "bug tracker" is two words.
    * Maybe "Configure support tracking" for answers.
    * We are asking users to Configure project development branch? I guess
      length is the issue here.

Code:

I see these warnings:

    == Pyflakes notices ==

    lib/lp/registry/browser/pillar.py
        28: 'IProductSeries' imported but unused

    lib/lp/registry/browser/product.py
        9: undefined name 'ProductInvolvementView' in __all__

> === modified file 'lib/lp/bugs/templates/bugtarget-bugs.pt'
> --- lib/lp/bugs/templates/bugtarget-bugs.pt 2010-03-04 15:09:10 +0000
> +++ lib/lp/bugs/templates/bugtarget-bugs.pt 2010-03-19 16:20:16 +0000
> @@ -169,9 +169,14 @@
> bug tracking.</strong></p>
>
> <p tal:condition="context/required:launchpad.Edit"
> - id="no-malone-edit">
> - <a tal:attributes="href string:${context/fmt:url/+edit}">Enable
> - bug tracking.</a>
> + id="no-malone-edit"
> + tal:define ="configure_bugtracker context/menu:overview/configure_bugtracker | nothing"
> + >
> + <a tal:condition="configure_bugtracker"
> + tal:replace="structure configure_bugtracker/fmt:link"/>
> + <a tal:condition="not: configure_bugtracker"
> + tal:attributes="href string:${context/fmt:url/+edit}">
> + Enable bug tracking.</a>

Why isn't this using the context's overview menu edit link that has
permission checking for rendering.

    context/menu:overview/edit:fmt:url

The language looks wrong. We are interested in Configuring, not enabling.
I think this is for the bugs root page which may be fine in this case.

> === modified file 'lib/lp/code/stories/branches/xx-product-branches.txt'
> --- lib/lp/code/stories/branches/xx-product-branches.txt 2010-01-08 14:22:42 +0000
> +++ lib/lp/code/stories/branches/xx-product-branches.txt 2010-03-19 16:20:16 +0000
> @@ -170,7 +170,7 @@
> the 'Import your project' button is not shown.
>
> >>> admin_browser.open('http://launchpad.dev/gnome-terminal')
> - >>> admin_browser.getLink('Change details').click()
> + >>> admin_browser.getLink('Configure Launchpad Branches').click()
> >>> admin_browser.getControl(
> ... 'Code for this project is published in Bazaar branches '
> ... 'on Launchpad').click()

I do not like the use of "Launchpad" in these links. They imply the project
is setting up hosting when we are really interested in gathering project info.

I have dealt with several angry, confused users who see Launchpad masquerading
or is forking project. I think taking "Launchpad" out of the link will make
it clear we want the know where the upstream branch is.

> === modified file 'lib/lp/registry/browser/pillar.py'
> --- lib/lp/registry/browser/pillar.py 2010-02-17 11:19:42 +0000
> +++ lib/lp/registry/browser/pillar.py 2010-03-19 16:20:16 +0000

> @@ -128,6 +130,78 @@
> link for link in menuapi.navigation.values() if link.enabled],
> key=attrgetter('sort_key'))
>
> + @cachedproperty
> + def visible_d...

Read more...

review: Needs Information (code ui)
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (20.2 KiB)

Hi Curtis,

Thanks for the review. I have merged in Brad's branch and pointed
the "Configure product branch" links at +setbranch instead of
+linkbranch, and I have responded to your comments below.

-Edwin

> Hi Edwin.
>
> I have a couple suggestion and questions that I think will take a few minutes
> to resolve.
>
> Using the UI:
>
> * "bug tracker" is two words.
> * Maybe "Configure support tracking" for answers.
> * We are asking users to Configure project development branch? I guess
> length is the issue here.

Fixed.

>
> Code:
>
> I see these warnings:
>
> == Pyflakes notices ==
>
> lib/lp/registry/browser/pillar.py
> 28: 'IProductSeries' imported but unused
>
> lib/lp/registry/browser/product.py
> 9: undefined name 'ProductInvolvementView' in __all__
>

TODO: lint

>
> > === modified file 'lib/lp/bugs/templates/bugtarget-bugs.pt'
> > --- lib/lp/bugs/templates/bugtarget-bugs.pt 2010-03-04 15:09:10 +0000
> > +++ lib/lp/bugs/templates/bugtarget-bugs.pt 2010-03-19 16:20:16 +0000
> > @@ -169,9 +169,14 @@
> > bug tracking.</strong></p>
> >
> > <p tal:condition="context/required:launchpad.Edit"
> > - id="no-malone-edit">
> > - <a tal:attributes="href string:${context/fmt:url/+edit}">Enable
> > - bug tracking.</a>
> > + id="no-malone-edit"
> > + tal:define ="configure_bugtracker
> context/menu:overview/configure_bugtracker | nothing"
> > + >
> > + <a tal:condition="configure_bugtracker"
> > + tal:replace="structure configure_bugtracker/fmt:link"/>
> > + <a tal:condition="not: configure_bugtracker"
> > + tal:attributes="href string:${context/fmt:url/+edit}">
> > + Enable bug tracking.</a>
>
> Why isn't this using the context's overview menu edit link that has
> permission checking for rendering.
>
> context/menu:overview/edit:fmt:url
>
> The language looks wrong. We are interested in Configuring, not enabling.
> I think this is for the bugs root page which may be fine in this case.

I was afraid of breaking a bunch more tests if I changed the name of
the link from "Enable bug tracking", not to mention that there may be
push back on the "Configure bug tracker" link later on.

> > === modified file 'lib/lp/code/stories/branches/xx-product-branches.txt'
> > --- lib/lp/code/stories/branches/xx-product-branches.txt 2010-01-08
> 14:22:42 +0000
> > +++ lib/lp/code/stories/branches/xx-product-branches.txt 2010-03-19
> 16:20:16 +0000
> > @@ -170,7 +170,7 @@
> > the 'Import your project' button is not shown.
> >
> > >>> admin_browser.open('http://launchpad.dev/gnome-terminal')
> > - >>> admin_browser.getLink('Change details').click()
> > + >>> admin_browser.getLink('Configure Launchpad Branches').click()
> > >>> admin_browser.getControl(
> > ... 'Code for this project is published in Bazaar branches '
> > ... 'on Launchpad').click()
>
> I do not like the use of "Launchpad" in these links. They imply the project
> is setting up hosting when we are really interested in gathering project info.
>
> I have dealt with severa...

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

Thanks for these revisions Edwin.

I am very aware of the ProductInvolvementView problem. I am working on a fix for it. It tangentially related to the ProductSeriesBranchTarget adapter I am trying to remove. Your branch is good to land. If I solve the provideAdapter() problem, will move your class in my branch.

review: Approve (code ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2010-04-06 21:43:23 +0000
3+++ Makefile 2010-04-09 18:48:33 +0000
4@@ -182,7 +182,10 @@
5 --download-base=download-cache/dist --eggs=eggs
6
7 # This builds bin/py and all the other bin files except bin/buildout.
8+# Remove the target before calling buildout to ensure that buildout
9+# updates the timestamp.
10 $(BUILDOUT_BIN): bin/buildout versions.cfg $(BUILDOUT_CFG) setup.py
11+ $(RM) $@
12 $(SHHH) PYTHONPATH= ./bin/buildout \
13 configuration:instance_name=${LPCONFIG} -c $(BUILDOUT_CFG)
14
15
16=== modified file 'lib/canonical/launchpad/icing/style-3-0.css.in'
17--- lib/canonical/launchpad/icing/style-3-0.css.in 2010-04-06 17:12:49 +0000
18+++ lib/canonical/launchpad/icing/style-3-0.css.in 2010-04-09 18:48:33 +0000
19@@ -525,6 +525,19 @@
20 display: block;
21 padding: 0.3em;
22 }
23+.involvement li.disabled {
24+ color: #cccccc;
25+ }
26+.involvement-service-links li.disabled img {
27+ margin-bottom: 0;
28+ }
29+.involvement-service-links li.disabled span {
30+ margin-bottom: 0;
31+ }
32+.involvement-service-links li.disabled table {
33+ padding-top: 0.3em;
34+ padding-bottom: 0.3em;
35+ }
36 .involvement a.bugs {
37 color: #b9413e;
38 background: url(/@@/bugs-arrow-right.png) right center no-repeat;
39@@ -812,15 +825,23 @@
40 padding: 2px 0 5px 18px;
41 line-height: 18px;
42 }
43+.icon-only {
44+ border: 0;
45+ padding: 0;
46+ width: 14px;
47+}
48+div.icon-only {
49+ height: 14px;
50+}
51 input[type="submit"].icon-only {
52- vertical-align: middle;
53- border: 0;
54- padding: 0;
55- height: 16px;
56- width: 16px;
57+ height: 14px;
58 background-color: inherit;
59 cursor: pointer;
60 }
61+span.icon-only {
62+ padding-right: 14px;
63+ line-height: 14px;
64+}
65 .vertical .sprite {
66 /* XXX: EdwinGrubbs 2009-10-29 bug=463032
67 The reduced padding is only necessary to prevent parts of the
68
69=== added file 'lib/canonical/launchpad/images/gray-arrow-right.png'
70Binary files lib/canonical/launchpad/images/gray-arrow-right.png 1970-01-01 00:00:00 +0000 and lib/canonical/launchpad/images/gray-arrow-right.png 2010-04-09 18:48:33 +0000 differ
71=== modified file 'lib/canonical/launchpad/pagetests/standalone/xx-form-layout.txt'
72--- lib/canonical/launchpad/pagetests/standalone/xx-form-layout.txt 2010-03-26 13:26:12 +0000
73+++ lib/canonical/launchpad/pagetests/standalone/xx-form-layout.txt 2010-04-09 18:48:33 +0000
74@@ -91,7 +91,8 @@
75 Checkboxes have their label to the right. One example is the checkbox for
76 specifying whether your project uses Launchpad Translations.
77
78- >>> admin_browser.open('http://launchpad.dev/evolution/+edit')
79+ >>> admin_browser.open(
80+ ... 'http://launchpad.dev/evolution/+configure-translations')
81 >>> content = find_main_content(admin_browser.contents)
82
83 >>> print content
84
85=== modified file 'lib/lp/blueprints/browser/specificationtarget.py'
86--- lib/lp/blueprints/browser/specificationtarget.py 2010-02-19 11:55:02 +0000
87+++ lib/lp/blueprints/browser/specificationtarget.py 2010-04-09 18:48:33 +0000
88@@ -42,7 +42,7 @@
89 from canonical.lazr.utils import smartquote
90
91
92-class HasSpecificationsMenuMixin(object):
93+class HasSpecificationsMenuMixin:
94
95 def listall(self):
96 """Return a link to show all blueprints."""
97
98=== modified file 'lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt'
99--- lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt 2009-07-01 13:16:44 +0000
100+++ lib/lp/bugs/stories/bug-also-affects/xx-upstream-bugtracker-links.txt 2010-04-09 18:48:33 +0000
101@@ -28,7 +28,8 @@
102 If we link Thunderbird to an upstream bug tracker, the text will change
103 to reflect this.
104
105- >>> admin_browser.open('http://launchpad.dev/thunderbird/+edit')
106+ >>> admin_browser.open(
107+ ... 'http://launchpad.dev/thunderbird/+configure-bugtracker')
108 >>> admin_browser.getControl(
109 ... name='field.bugtracker').value = ['external']
110 >>> admin_browser.getControl(
111@@ -89,7 +90,8 @@
112 If the remote bug tracker is one for which Launchpad doesn't offer a bug
113 filing link, such as Debbugs, only a search link will be displayed.
114
115- >>> admin_browser.open('http://launchpad.dev/gnome-terminal/+edit')
116+ >>> admin_browser.open(
117+ ... 'http://launchpad.dev/gnome-terminal/+configure-bugtracker')
118 >>> admin_browser.getControl(
119 ... 'In a registered bug tracker:').selected = True
120 >>> admin_browser.getControl(
121
122=== modified file 'lib/lp/bugs/stories/bugs/xx-front-page-info.txt'
123--- lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2010-03-12 14:26:46 +0000
124+++ lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2010-04-09 18:48:33 +0000
125@@ -31,7 +31,7 @@
126 >>> enable_tracker = find_tag_by_id(
127 ... admin_browser.contents, 'no-malone-edit')
128 >>> print extract_text(enable_tracker)
129- Enable bug tracking.
130+ Configure bug tracker
131
132 The bugs home page for a project using Launchpad for bug tracking
133 shows controls for setting bug supervisor and states that no
134
135=== modified file 'lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt'
136--- lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt 2009-09-23 11:10:00 +0000
137+++ lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt 2010-04-09 18:48:33 +0000
138@@ -88,7 +88,8 @@
139 Let's link a pair to debbugs:
140
141 >>> def link_to_debbugs(name):
142- ... admin_browser.open("http://launchpad.dev/%s/+edit" % name)
143+ ... admin_browser.open(
144+ ... "http://launchpad.dev/%s/+configure-bugtracker" % name)
145 ... admin_browser.getControl("In a registered bug tracker").click()
146 ... bt = admin_browser.getControl(name="field.bugtracker.bugtracker")
147 ... bt.value = ["3"]
148
149=== modified file 'lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt'
150--- lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2010-04-09 12:00:54 +0000
151+++ lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2010-04-09 18:48:33 +0000
152@@ -672,7 +672,8 @@
153 ... 'A test Bugzilla Tracker']
154 >>> admin_browser.getControl('Change Details').click()
155
156- >>> admin_browser.open('http://launchpad.dev/jokosher/+edit')
157+ >>> admin_browser.open(
158+ ... 'http://launchpad.dev/jokosher/+configure-bugtracker')
159 >>> admin_browser.getControl(name='field.bugtracker'
160 ... ).displayValue = ['In a registered bug tracker:']
161 >>> admin_browser.getControl(name='field.bugtracker.bugtracker'
162
163=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt'
164--- lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt 2009-10-30 12:17:48 +0000
165+++ lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt 2010-04-09 18:48:33 +0000
166@@ -4,14 +4,14 @@
167 distributions, product groups, products, and source packages.
168
169 >>> contexts = [
170- ... ('Ubuntu', 'ubuntu'),
171- ... ('Mozilla', 'mozilla'),
172- ... ('Firefox', 'firefox'),
173- ... ('alsa-utils in Ubuntu', 'ubuntu/+source/alsa-utils'),
174+ ... ('Ubuntu', 'ubuntu', '+edit'),
175+ ... ('Mozilla', 'mozilla', '+edit'),
176+ ... ('Firefox', 'firefox', '+configure-bugtracker'),
177+ ... ('alsa-utils in Ubuntu', 'ubuntu/+source/alsa-utils', '+edit'),
178 ... ]
179
180- >>> for context_name, context_path in contexts:
181- ... edit_url = 'http://launchpad.dev/%s/+edit' % (context_path,)
182+ >>> for context_name, context_path, view in contexts:
183+ ... edit_url = 'http://launchpad.dev/%s/%s' % (context_path, view)
184 ... admin_browser.open(edit_url)
185 ... admin_browser.getControl(
186 ... name='field.bug_reporting_guidelines').value = (
187@@ -31,7 +31,7 @@
188 ... print extract_text(find_tag_by_id(
189 ... user_browser.contents, 'bug-reporting-guidelines'))
190
191- >>> for context_name, context_path in contexts:
192+ >>> for context_name, context_path, view in contexts:
193 ... filebug_url = (
194 ... 'http://launchpad.dev/%s/+filebug' % (context_path,))
195 ... user_browser.open(filebug_url)
196@@ -43,7 +43,7 @@
197 But they are displayed once you've got to the step of entering a bug
198 description.
199
200- >>> for context_name, context_path in contexts:
201+ >>> for context_name, context_path, view in contexts:
202 ... filebug_url = (
203 ... 'http://launchpad.dev/%s/+filebug' % (context_path,))
204 ... user_browser.open(filebug_url)
205@@ -143,7 +143,7 @@
206 ... pass
207
208 >>> edit_url_re = re.compile('/[+]edit$')
209- >>> for context_name, context_path in contexts:
210+ >>> for context_name, context_path, view in contexts:
211 ... overview_url = 'http://launchpad.dev/%s' % (context_path,)
212 ... print '* ' + context_name
213 ... print ' - User:',
214@@ -173,8 +173,8 @@
215 Unprivileged cannot access the page for changing bug reporting
216 guidelines.
217
218- >>> for context_name, context_path in contexts:
219- ... edit_url = 'http://launchpad.dev/%s/+edit' % (context_path,)
220+ >>> for context_name, context_path, view in contexts:
221+ ... edit_url = 'http://launchpad.dev/%s/%s' % (context_path, view)
222 ... print '* ' + context_name
223 ... try:
224 ... user_browser.open(edit_url)
225
226=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt'
227--- lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt 2009-07-27 12:39:34 +0000
228+++ lib/lp/bugs/stories/guided-filebug/xx-no-launchpadder.txt 2010-04-09 18:48:33 +0000
229@@ -52,7 +52,8 @@
230 The advice is slightly different if the upstream bug tracker is
231 actually an email address.
232
233- >>> admin_browser.open('http://launchpad.dev/jokosher/+edit')
234+ >>> admin_browser.open(
235+ ... 'http://launchpad.dev/jokosher/+configure-bugtracker')
236 >>> admin_browser.getControl(
237 ... 'By emailing an upstream bug contact').selected = True
238 >>> admin_browser.getControl(
239
240=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt'
241--- lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt 2010-01-13 15:08:30 +0000
242+++ lib/lp/bugs/stories/guided-filebug/xx-project-guided-filebug.txt 2010-04-09 18:48:33 +0000
243@@ -217,7 +217,7 @@
244 ... sourcepackagename=thunderbird_spn, distroseries=hoary)
245 >>> logout()
246
247- >>> admin_browser.open('http://launchpad.dev/testy/+edit')
248+ >>> admin_browser.open('http://launchpad.dev/testy/+configure-bugtracker')
249 >>> admin_browser.getControl(name='field.bugtracker').value = ['external']
250 >>> admin_browser.getControl(
251 ... name='field.bugtracker.bugtracker').value = ['3']
252
253=== modified file 'lib/lp/bugs/stories/initial-bug-contacts/10-set-upstream-bugcontact.txt'
254--- lib/lp/bugs/stories/initial-bug-contacts/10-set-upstream-bugcontact.txt 2010-01-19 16:37:15 +0000
255+++ lib/lp/bugs/stories/initial-bug-contacts/10-set-upstream-bugcontact.txt 2010-04-09 18:48:33 +0000
256@@ -122,9 +122,9 @@
257 We can change the settings to use Launchpad for bug tracking.
258
259 >>> sample_browser.getLink(
260- ... 'Enable bug tracking.').click()
261+ ... 'Configure bug tracker').click()
262 >>> print sample_browser.title
263- Change A product for testing things's details : Bugs : Test Product
264+ Configure bug tracker : Bugs : Test Product
265 >>> sample_browser.getControl('In Launchpad').click()
266 >>> sample_browser.getControl('Change').click()
267
268
269=== modified file 'lib/lp/bugs/templates/bugtarget-bugs.pt'
270--- lib/lp/bugs/templates/bugtarget-bugs.pt 2010-03-04 15:09:10 +0000
271+++ lib/lp/bugs/templates/bugtarget-bugs.pt 2010-04-09 18:48:33 +0000
272@@ -169,9 +169,14 @@
273 bug tracking.</strong></p>
274
275 <p tal:condition="context/required:launchpad.Edit"
276- id="no-malone-edit">
277- <a tal:attributes="href string:${context/fmt:url/+edit}">Enable
278- bug tracking.</a>
279+ id="no-malone-edit"
280+ tal:define ="configure_bugtracker context/menu:overview/configure_bugtracker | nothing"
281+ >
282+ <a tal:condition="configure_bugtracker"
283+ tal:replace="structure configure_bugtracker/fmt:link"/>
284+ <a tal:condition="not: configure_bugtracker"
285+ tal:attributes="href string:${context/fmt:url/+edit}">
286+ Enable bug tracking.</a>
287 </p>
288 </tal:not_uses_malone>
289
290
291=== modified file 'lib/lp/bugs/templates/bugtarget-macros-filebug.pt'
292--- lib/lp/bugs/templates/bugtarget-macros-filebug.pt 2009-12-04 12:12:35 +0000
293+++ lib/lp/bugs/templates/bugtarget-macros-filebug.pt 2010-04-09 18:48:33 +0000
294@@ -143,7 +143,7 @@
295 <div class="highlight-message">
296 <a tal:replace="structure product_or_distro/fmt:link">Alsa Utils</a>
297 <strong>does not use</strong> Launchpad as its bug tracker.
298- <a tal:attributes="href context/menu:overview/edit/fmt:url"
299+ <a tal:attributes="href context/menu:overview/configure_bugtracker/fmt:url"
300 tal:condition="context/required:launchpad.Edit">
301 Change this&nbsp;<span class="sprite edit"></span>
302 </a>
303
304=== modified file 'lib/lp/code/stories/branches/xx-branch-tag-cloud.txt'
305--- lib/lp/code/stories/branches/xx-branch-tag-cloud.txt 2009-08-28 05:57:37 +0000
306+++ lib/lp/code/stories/branches/xx-branch-tag-cloud.txt 2010-04-09 18:48:33 +0000
307@@ -22,11 +22,13 @@
308
309 Update firefox to officially use codehosting:
310
311- >>> admin_browser.open('http://launchpad.dev/firefox/+edit')
312- >>> admin_browser.getControl(
313- ... 'Code for this project is published in Bazaar branches on '
314- ... 'Launchpad').click()
315- >>> admin_browser.getControl('Change').click()
316+ >>> from lp.registry.interfaces.product import IProductSet
317+ >>> from zope.component import getUtility
318+ >>> login('admin@canonical.com')
319+ >>> firefox = getUtility(IProductSet).getByName('firefox')
320+ >>> firefox.development_focus.branch = factory.makeBranch(
321+ ... product=firefox)
322+ >>> logout()
323
324 The class for firefox in the project tag cloud will now show 'highlight' rather
325 than shade.
326
327=== modified file 'lib/lp/code/stories/branches/xx-product-branches.txt'
328--- lib/lp/code/stories/branches/xx-product-branches.txt 2010-01-08 14:22:42 +0000
329+++ lib/lp/code/stories/branches/xx-product-branches.txt 2010-04-09 18:48:33 +0000
330@@ -158,10 +158,18 @@
331 There are two buttons that show on the right hand side of the screen
332 for project branch listings. 'Register a branch' and 'Import your project'.
333
334+ >>> from zope.component import getUtility
335+ >>> from lp.registry.interfaces.product import IProductSet
336+ >>> login('admin@canonical.com')
337+ >>> product = getUtility(IProductSet).getByName('firefox')
338+ >>> old_branch = product.development_focus.branch
339+ >>> product.development_focus.branch = None
340+ >>> logout()
341 >>> def print_links(browser):
342 ... links = find_tag_by_id(browser.contents, 'floating-links')
343 ... for link in links.findAll('a'):
344 ... print extract_text(link)
345+ >>> browser.open('http://code.launchpad.dev/firefox')
346 >>> print_links(browser)
347 Register a branch
348 Import your project
349@@ -169,14 +177,10 @@
350 If the product specifies that it officially uses Launchpad code, then
351 the 'Import your project' button is not shown.
352
353- >>> admin_browser.open('http://launchpad.dev/gnome-terminal')
354- >>> admin_browser.getLink('Change details').click()
355- >>> admin_browser.getControl(
356- ... 'Code for this project is published in Bazaar branches '
357- ... 'on Launchpad').click()
358- >>> admin_browser.getControl('Change').click()
359-
360- >>> browser.open('http://code.launchpad.dev/gnome-terminal')
361+ >>> login('admin@canonical.com')
362+ >>> product.development_focus.branch = old_branch
363+ >>> logout()
364+ >>> browser.open('http://code.launchpad.dev/firefox')
365 >>> print_links(browser)
366 Register a branch
367
368
369=== modified file 'lib/lp/registry/browser/configure.zcml'
370--- lib/lp/registry/browser/configure.zcml 2010-04-06 18:49:52 +0000
371+++ lib/lp/registry/browser/configure.zcml 2010-04-09 18:48:33 +0000
372@@ -495,6 +495,20 @@
373 facet="overview"
374 permission="zope.Public"
375 template="../templates/pillar-involvement-portlet.pt"/>
376+ <browser:page
377+ name="+get-involved"
378+ for="lp.registry.interfaces.product.IProduct"
379+ class="lp.registry.browser.pillar.ProductInvolvementView"
380+ facet="overview"
381+ permission="zope.Public"
382+ template="../templates/pillar-involvement-portlet.pt"/>
383+ <browser:page
384+ name="+get-involved"
385+ for="lp.registry.interfaces.product.IProductSeries"
386+ class="lp.registry.browser.pillar.ProductSeriesInvolvementView"
387+ facet="overview"
388+ permission="zope.Public"
389+ template="../templates/pillar-involvement-portlet.pt"/>
390 <facet
391 facet="overview">
392 <browser:url
393@@ -1458,6 +1472,34 @@
394 permission="launchpad.Edit"
395 template="../../app/templates/generic-edit.pt"/>
396 <browser:page
397+ for="lp.registry.interfaces.product.IProduct"
398+ facet="overview"
399+ permission="launchpad.Edit"
400+ name="+configure-answers"
401+ template="../../app/templates/generic-edit.pt"
402+ class="lp.registry.browser.product.ProductConfigureAnswersView"/>
403+ <browser:page
404+ for="lp.registry.interfaces.product.IProduct"
405+ facet="overview"
406+ permission="launchpad.Edit"
407+ name="+configure-blueprints"
408+ template="../../app/templates/generic-edit.pt"
409+ class="lp.registry.browser.product.ProductConfigureBlueprintsView"/>
410+ <browser:page
411+ for="lp.registry.interfaces.product.IProduct"
412+ facet="overview"
413+ permission="launchpad.Edit"
414+ name="+configure-bugtracker"
415+ template="../../app/templates/generic-edit.pt"
416+ class="lp.registry.browser.product.ProductConfigureBugTrackerView"/>
417+ <browser:page
418+ for="lp.registry.interfaces.product.IProduct"
419+ facet="overview"
420+ permission="launchpad.Edit"
421+ name="+configure-translations"
422+ template="../../app/templates/generic-edit.pt"
423+ class="lp.registry.browser.product.ProductConfigureTranslationsView"/>
424+ <browser:page
425 name="+branding"
426 for="lp.registry.interfaces.product.IProduct"
427 facet="overview"
428
429=== modified file 'lib/lp/registry/browser/pillar.py'
430--- lib/lp/registry/browser/pillar.py 2010-02-17 11:19:42 +0000
431+++ lib/lp/registry/browser/pillar.py 2010-04-09 18:48:33 +0000
432@@ -15,6 +15,7 @@
433 from zope.component.globalregistry import provideAdapter
434 from zope.interface import implements, Interface
435
436+from canonical.cachedproperty import cachedproperty
437 from canonical.launchpad.webapp.interfaces import INavigationMenu
438 from canonical.launchpad.webapp.menu import Link, NavigationMenu
439 from canonical.launchpad.webapp.publisher import LaunchpadView, nearest
440@@ -24,7 +25,6 @@
441 from lp.registry.interfaces.distributionsourcepackage import (
442 IDistributionSourcePackage)
443 from lp.registry.interfaces.pillar import IPillar
444-from lp.registry.interfaces.productseries import IProductSeries
445 from lp.registry.interfaces.projectgroup import IProjectGroup
446
447
448@@ -69,6 +69,9 @@
449 """A view for any `IPillar`."""
450 implements(IInvolved)
451
452+ configuration_links = []
453+ visible_disabled_link_names = []
454+
455 def __init__(self, context, request):
456 super(PillarView, self).__init__(context, request)
457 self.official_malone = False
458@@ -85,9 +88,7 @@
459 self.official_codehosting = False
460 else:
461 self._set_official_launchpad(pillar)
462- if IProductSeries.providedBy(self.context):
463- self.official_answers = False
464- elif IDistroSeries.providedBy(self.context):
465+ if IDistroSeries.providedBy(self.context):
466 self.official_answers = False
467 self.official_codehosting = False
468 elif IDistributionSourcePackage.providedBy(self.context):
469@@ -128,6 +129,73 @@
470 link for link in menuapi.navigation.values() if link.enabled],
471 key=attrgetter('sort_key'))
472
473+ @cachedproperty
474+ def visible_disabled_links(self):
475+ """Important disabled links.
476+
477+ These are displayed to notify the user to provide configuration
478+ info to enable the links.
479+
480+ Override the visible_disabled_link_names attribute to change
481+ the results.
482+ """
483+ involved_menu = MenuAPI(self).navigation
484+ important_links = [
485+ involved_menu[name]
486+ for name in self.visible_disabled_link_names]
487+ return sorted([
488+ link for link in important_links if not link.enabled],
489+ key=attrgetter('sort_key'))
490+
491
492 provideAdapter(
493 InvolvedMenu, [IInvolved], INavigationMenu, name="overview")
494+
495+
496+# This class can't be moved into the browser/product.py file, since
497+# the pillar-views.txt test will fail due to the MenuAPI adapter
498+# for PillarView.enabled_links not working.
499+class ProductInvolvementView(PillarView):
500+ """Encourage configuration of involvement links for projects."""
501+
502+ has_involvement = True
503+ visible_disabled_link_names = ['submit_code']
504+
505+ @property
506+ def configuration_links(self):
507+ """The enabled involvement links."""
508+ overview_menu = MenuAPI(self.context).overview
509+ series_menu = MenuAPI(self.context.development_focus).overview
510+ configuration_names = [
511+ 'configure_answers',
512+ 'configure_bugtracker',
513+ 'configure_translations',
514+ ]
515+ configuration_links = [
516+ overview_menu[name] for name in configuration_names]
517+ set_branch = series_menu['set_branch']
518+ set_branch.text = 'Configure project branch'
519+ configuration_links.append(set_branch)
520+ return sorted([
521+ link for link in configuration_links if link.enabled],
522+ key=attrgetter('sort_key'))
523+
524+
525+class ProductSeriesInvolvementView(PillarView):
526+ """Encourage configuration of involvement links for project series."""
527+
528+ has_involvement = True
529+ visible_disabled_link_names = ['submit_code']
530+
531+ def __init__(self, context, request):
532+ super(ProductSeriesInvolvementView, self).__init__(context, request)
533+ self.official_codehosting = self.context.branch is not None
534+ self.official_answers = False
535+
536+ @property
537+ def configuration_links(self):
538+ """The enabled involvement links."""
539+ series_menu = MenuAPI(self.context).overview
540+ set_branch = series_menu['set_branch']
541+ set_branch.text = 'Configure series branch'
542+ return [set_branch]
543
544=== modified file 'lib/lp/registry/browser/product.py'
545--- lib/lp/registry/browser/product.py 2010-04-06 20:25:12 +0000
546+++ lib/lp/registry/browser/product.py 2010-04-09 18:48:33 +0000
547@@ -12,11 +12,17 @@
548 'ProductAdminView',
549 'ProductBrandingView',
550 'ProductBugsMenu',
551+ 'ProductConfigureAnswersView',
552+ 'ProductConfigureBlueprintsView',
553+ 'ProductConfigureBranchesView',
554+ 'ProductConfigureBugTrackerView',
555+ 'ProductConfigureTranslationsView',
556 'ProductDownloadFileMixin',
557 'ProductDownloadFilesView',
558 'ProductEditPeopleView',
559 'ProductEditView',
560 'ProductFacets',
561+ 'ProductInvolvementView',
562 'ProductNavigation',
563 'ProductNavigationMenu',
564 'ProductOverviewMenu',
565@@ -331,6 +337,30 @@
566 return Link('+edit', text, icon='edit')
567
568 @enabled_with_permission('launchpad.Edit')
569+ def configure_bugtracker(self):
570+ text = 'Configure bug tracker'
571+ summary = 'Specify where bugs are tracked for this project'
572+ return Link('+configure-bugtracker', text, summary, icon='edit')
573+
574+ @enabled_with_permission('launchpad.Edit')
575+ def configure_translations(self):
576+ text = 'Configure translations'
577+ summary = 'Allow users to submit translations for this project'
578+ return Link('+configure-translations', text, summary, icon='edit')
579+
580+ @enabled_with_permission('launchpad.Edit')
581+ def configure_answers(self):
582+ text = 'Configure support tracker'
583+ summary = 'Allow users to ask questions on this project'
584+ return Link('+configure-answers', text, summary, icon='edit')
585+
586+ @enabled_with_permission('launchpad.Edit')
587+ def configure_blueprints(self):
588+ text = 'Configure blueprints'
589+ summary = 'Enable tracking of specifications and meetings'
590+ return Link('+configure-blueprints', text, summary, icon='edit')
591+
592+ @enabled_with_permission('launchpad.Edit')
593 def branding(self):
594 text = 'Change branding'
595 return Link('+branding', text, icon='edit')
596@@ -374,6 +404,10 @@
597 facet = 'overview'
598 links = [
599 'edit',
600+ 'configure_answers',
601+ 'configure_blueprints',
602+ 'configure_bugtracker',
603+ 'configure_translations',
604 'reassign',
605 'top_contributors',
606 'distributions',
607@@ -473,11 +507,12 @@
608 return Link('+securitycontact', text, icon='edit')
609
610
611-class ProductSpecificationsMenu(NavigationMenu,
612+class ProductSpecificationsMenu(NavigationMenu, ProductEditLinksMixin,
613 HasSpecificationsMenuMixin):
614 usedfor = IProduct
615 facet = 'specifications'
616- links = ['listall', 'doc', 'assignments', 'new', 'register_sprint']
617+ links = ['configure_blueprints', 'listall', 'doc', 'assignments', 'new',
618+ 'register_sprint']
619
620
621 def _cmp_distros(a, b):
622@@ -1145,6 +1180,70 @@
623 return canonical_url(self.context)
624
625
626+class ProductConfigureBase(ReturnToReferrerMixin, LaunchpadEditFormView):
627+ implements(IProductEditMenu)
628+ schema = IProduct
629+
630+ @property
631+ def page_title(self):
632+ return self.label
633+
634+ @action("Change", name='change')
635+ def change_action(self, action, data):
636+ self.updateContextFromData(data)
637+
638+
639+class ProductConfigureBugTrackerView(ProductConfigureBase):
640+ """View class to configure the bug tracker for a project."""
641+
642+ label = "Configure bug tracker"
643+ field_names = [
644+ "bugtracker",
645+ "enable_bug_expiration",
646+ "remote_product",
647+ "bug_reporting_guidelines",
648+ ]
649+ custom_widget('bugtracker', ProductBugTrackerWidget)
650+
651+ def validate(self, data):
652+ """Constrain bug expiration to Launchpad Bugs tracker."""
653+ # enable_bug_expiration is disabled by JavaScript when bugtracker
654+ # is not 'In Launchpad'. The constraint is enforced here in case the
655+ # JavaScript fails to activate or run. Note that the bugtracker
656+ # name : values are {'In Launchpad' : object, 'Somewhere else' : None
657+ # 'In a registered bug tracker' : IBugTracker}.
658+ bugtracker = data.get('bugtracker', None)
659+ if bugtracker is None or IBugTracker.providedBy(bugtracker):
660+ data['enable_bug_expiration'] = False
661+
662+
663+class ProductConfigureBlueprintsView(ProductConfigureBase):
664+ """View class to configure the Launchpad Blueprints for a project."""
665+
666+ label = "Configure Blueprints"
667+ field_names = [
668+ "official_blueprints",
669+ ]
670+
671+
672+class ProductConfigureTranslationsView(ProductConfigureBase):
673+ """View class to configure the Launchpad Translations for a project."""
674+
675+ label = "Configure Translations"
676+ field_names = [
677+ "official_rosetta",
678+ ]
679+
680+
681+class ProductConfigureAnswersView(ProductConfigureBase):
682+ """View class to configure the Launchpad Answers for a project."""
683+
684+ label = "Configure Answers"
685+ field_names = [
686+ "official_answers",
687+ ]
688+
689+
690 class ProductEditView(ProductLicenseMixin, LaunchpadEditFormView):
691 """View class that lets you edit a Product object."""
692
693@@ -1157,15 +1256,7 @@
694 "title",
695 "summary",
696 "description",
697- "bug_reporting_guidelines",
698 "project",
699- "official_codehosting",
700- "bugtracker",
701- "enable_bug_expiration",
702- "official_blueprints",
703- "official_rosetta",
704- "official_answers",
705- "remote_product",
706 "homepageurl",
707 "sourceforgeproject",
708 "freshmeatproject",
709@@ -1178,7 +1269,6 @@
710 "license_info",
711 ]
712 custom_widget('licenses', LicenseWidget)
713- custom_widget('bugtracker', ProductBugTrackerWidget)
714 custom_widget('license_info', GhostWidget)
715
716 @property
717@@ -1206,18 +1296,6 @@
718 return False
719 return super(ProductEditView, self).showOptionalMarker(field_name)
720
721- def validate(self, data):
722- """Constrain bug expiration to Launchpad Bugs tracker."""
723- # enable_bug_expiration is disabled by JavaScript when bugtracker
724- # is not 'In Launchpad'. The contraint is enforced here in case the
725- # JavaScript fails to activate or run. Note that the bugtracker
726- # name : values are {'In Launchpad' : object, 'Somewhere else' : None
727- # 'In a registered bug tracker' : IBugTracker}.
728- bugtracker = data.get('bugtracker', None)
729- if bugtracker is None or IBugTracker.providedBy(bugtracker):
730- data['enable_bug_expiration'] = False
731- ProductLicenseMixin.validate(self, data)
732-
733 @action("Change", name='change')
734 def change_action(self, action, data):
735 previous_licenses = self.context.licenses
736
737=== modified file 'lib/lp/registry/browser/productseries.py'
738--- lib/lp/registry/browser/productseries.py 2010-04-08 19:04:48 +0000
739+++ lib/lp/registry/browser/productseries.py 2010-04-09 18:48:33 +0000
740@@ -81,7 +81,8 @@
741 from canonical.launchpad.webapp.interfaces import (
742 NotFoundError, UnexpectedFormData)
743 from canonical.launchpad.webapp.launchpadform import (
744- action, custom_widget, LaunchpadEditFormView, LaunchpadFormView)
745+ action, custom_widget, LaunchpadEditFormView, LaunchpadFormView,
746+ ReturnToReferrerMixin)
747 from canonical.launchpad.webapp.menu import structured
748 from canonical.widgets.itemswidgets import LaunchpadRadioWidget
749 from canonical.widgets.textwidgets import StrippedTextWidget
750@@ -175,6 +176,7 @@
751 links = [
752 'edit', 'delete', 'driver', 'link_branch', 'branch_add', 'ubuntupkg',
753 'create_milestone', 'create_release', 'rdf', 'subscribe',
754+ 'set_branch',
755 ]
756
757 @enabled_with_permission('launchpad.Edit')
758@@ -211,6 +213,21 @@
759 summary = 'Change the branch for this series'
760 return Link('+linkbranch', text, summary, icon=icon)
761
762+ @enabled_with_permission('launchpad.Edit')
763+ def set_branch(self):
764+ """Return a link to set the bazaar branch for this series."""
765+ # Once +setbranch has been beta tested thoroughly, it should
766+ # replace the +linkbranch page.
767+ if self.context.branch is None:
768+ text = 'Link to branch'
769+ icon = 'add'
770+ summary = 'Set the branch for this series'
771+ else:
772+ text = "Change branch"
773+ icon = 'edit'
774+ summary = 'Change the branch for this series'
775+ return Link('+setbranch', text, summary, icon=icon)
776+
777 def branch_add(self):
778 text = 'Register a branch'
779 summary = "Register a new Bazaar branch for this series' project"
780@@ -734,7 +751,8 @@
781 )
782
783
784-class ProductSeriesSetBranchView(LaunchpadFormView, ProductSeriesView,
785+class ProductSeriesSetBranchView(ReturnToReferrerMixin, LaunchpadFormView,
786+ ProductSeriesView,
787 BranchNameValidationMixin):
788 """The view to set a branch for the ProductSeries."""
789
790@@ -919,7 +937,6 @@
791
792 @action(_('Update'), name='update')
793 def update_action(self, action, data):
794- self.next_url = canonical_url(self.context)
795 branch_type = data.get('branch_type')
796 if branch_type == LINK_LP_BZR:
797 branch_location = data.get('branch_location')
798@@ -1011,13 +1028,10 @@
799 self._setBranchExists(e.existing_branch, 'branch_name')
800 return branch
801
802- @property
803- def cancel_url(self):
804- """See `LaunchpadFormView`."""
805- return canonical_url(self.context)
806-
807-
808-class ProductSeriesLinkBranchView(LaunchpadEditFormView, ProductSeriesView):
809+
810+class ProductSeriesLinkBranchView(ReturnToReferrerMixin,
811+ ProductSeriesView,
812+ LaunchpadEditFormView):
813 """View to set the bazaar branch for a product series."""
814
815 schema = IProductSeries
816@@ -1034,11 +1048,6 @@
817 """The page title."""
818 return self.label
819
820- @property
821- def next_url(self):
822- """See `LaunchpadFormView`."""
823- return canonical_url(self.context)
824-
825 @action(_('Update'), name='update')
826 def update_action(self, action, data):
827 """Update the branch attribute."""
828@@ -1052,11 +1061,6 @@
829 self.request.response.addInfoNotification(
830 'Series code location updated.')
831
832- @property
833- def cancel_url(self):
834- """See `LaunchpadFormView`."""
835- return canonical_url(self.context)
836-
837
838 class ProductSeriesLinkBranchFromCodeView(ProductSeriesLinkBranchView):
839 """Set the branch link from the code overview page."""
840
841=== modified file 'lib/lp/registry/browser/tests/pillar-views.txt'
842--- lib/lp/registry/browser/tests/pillar-views.txt 2009-09-03 19:26:16 +0000
843+++ lib/lp/registry/browser/tests/pillar-views.txt 2010-04-09 18:48:33 +0000
844@@ -49,19 +49,19 @@
845 report_bug ask_question
846
847 >>> print view.render()
848- <div id="involvement" class="portlet involvement">
849+ <div id="involvement" class="portlet">
850 <h2>Get Involved</h2>
851- <ul>
852+ <ul class="involvement">
853 <li>
854- <a href="..." class="...bugs">Report a bug</a>
855+ <a href=... class="...bugs">Report a bug</a>
856 </li>
857 <li>
858- <a href="..." class="...answers">Ask a question</a>
859+ <a href=... class="...answers">Ask a question</a>
860 </li>
861 </ul>
862- </div>
863+ ...
864
865-Products are are supported.
866+Products are supported.
867
868 >>> product = factory.makeProduct(name='bread')
869 >>> login_person(product.owner)
870@@ -69,6 +69,24 @@
871 >>> view = create_view(product, '+get-involved')
872 >>> view.official_blueprints
873 True
874+ >>> for link in view.enabled_links:
875+ ... print link.name
876+ register_blueprint
877+
878+Products subclass the view to display disabled links to encourage
879+configuring that service in Launchpad for the project. The project
880+also has configuration links that make it easy to figure out where
881+to configure each service.
882+
883+ >>> for link in view.visible_disabled_links:
884+ ... print link.name
885+ submit_code
886+ >>> for link in view.configuration_links:
887+ ... print link.name
888+ configure_answers
889+ configure_bugtracker
890+ configure_translations
891+ set_branch
892
893 Project are supported too, but they only display the applications used by
894 their products.
895@@ -80,13 +98,27 @@
896 >>> view.official_blueprints
897 True
898
899-Projects cannot make links to register a branch, so official_code is always
900-false.
901-
902- >>> product.official_codehosting = True
903- >>> view = create_view(product, '+get-involved')
904- >>> view.official_codehosting
905- True
906+The offical_codehosting for a project is based on whether the project's
907+development focus series has a branch.
908+
909+ >>> print product.development_focus.branch
910+ None
911+ >>> product.official_codehosting
912+ False
913+ >>> view = create_view(product, '+get-involved')
914+ >>> view.official_codehosting
915+ False
916+
917+ >>> product.development_focus.branch = factory.makeBranch(
918+ ... product=product)
919+ >>> product.official_codehosting
920+ True
921+ >>> view = create_view(product, '+get-involved')
922+ >>> view.official_codehosting
923+ True
924+
925+Project groups cannot make links to register a branch, so
926+official_codehosting is always false.
927
928 >>> view = create_view(project_group, '+get-involved')
929 >>> view.official_codehosting
930@@ -108,7 +140,7 @@
931 >>> view = create_view(series, '+get-involved')
932 >>> for link in view.enabled_links:
933 ... print link.name
934- submit_code register_blueprint
935+ register_blueprint
936
937 DistributionSourcePackages can use this view. The distribution is used to
938 set the links. Despite the fact that the distribution uses blueprints,
939
940=== modified file 'lib/lp/registry/doc/product.txt'
941--- lib/lp/registry/doc/product.txt 2009-12-13 11:55:40 +0000
942+++ lib/lp/registry/doc/product.txt 2010-04-09 18:48:33 +0000
943@@ -455,12 +455,15 @@
944
945 == Products With Branches ==
946
947-Products can now specify whether they officially support Launchpad as a
948-location for their branches.
949+Products are considered to officially support Launchpad as a location
950+for their branches after a branch is set for the development focus
951+series.
952
953+ >>> print firefox.development_focus.branch
954+ None
955 >>> print firefox.official_codehosting
956 False
957- >>> firefox.official_codehosting = True
958+ >>> firefox.development_focus.branch = factory.makeBranch(product=firefox)
959 >>> print firefox.official_codehosting
960 True
961
962
963=== modified file 'lib/lp/registry/model/product.py'
964--- lib/lp/registry/model/product.py 2010-04-08 19:27:14 +0000
965+++ lib/lp/registry/model/product.py 2010-04-09 18:48:33 +0000
966@@ -246,8 +246,6 @@
967 dbName='official_answers', notNull=True, default=False)
968 official_blueprints = BoolCol(
969 dbName='official_blueprints', notNull=True, default=False)
970- official_codehosting = BoolCol(
971- dbName='official_codehosting', notNull=True, default=False)
972 official_malone = BoolCol(
973 dbName='official_malone', notNull=True, default=False)
974 official_rosetta = BoolCol(
975@@ -256,6 +254,12 @@
976 name='remote_product', allow_none=True, default=None)
977 max_bug_heat = Int()
978
979+ @property
980+ def official_codehosting(self):
981+ # XXX Need to remove official_codehosting column from Product
982+ # table.
983+ return self.development_focus.branch is not None
984+
985 def _getMilestoneCondition(self):
986 """See `HasMilestonesMixin`."""
987 return (Milestone.product == self)
988
989=== modified file 'lib/lp/registry/stories/product/xx-product-development-focus.txt'
990--- lib/lp/registry/stories/product/xx-product-development-focus.txt 2009-11-18 04:51:08 +0000
991+++ lib/lp/registry/stories/product/xx-product-development-focus.txt 2010-04-09 18:48:33 +0000
992@@ -32,6 +32,12 @@
993 ... print content
994 ... title = a.get('title', '')
995 ... print "%s (%s)" % (title, a['href'])
996+ >>> def print_involvement_portlet(browser):
997+ ... involvement = find_tag_by_id(browser.contents, 'involvement')
998+ ... for a in involvement.findAll('a'):
999+ ... for content in a.contents:
1000+ ... print content
1001+ ... print a['href']
1002
1003
1004 Projects without development focus branches
1005@@ -39,48 +45,59 @@
1006
1007 If the project has not specified a development focus branch then the
1008 development focus section just contains a link to the development focus
1009-series, and text telling the user that no branch has been specified.
1010+series.
1011
1012 >>> anon_browser.open('http://launchpad.dev/fooix')
1013 >>> print_development_focus(anon_browser)
1014 Development focus:
1015 trunk series
1016- Development focus branch has not been specified
1017 Links:
1018 trunk series (/fooix/trunk)
1019+ >>> print_involvement_portlet(anon_browser)
1020
1021
1022 Setting the development focus branch
1023 ------------------------------------
1024
1025 If the user has rights to change the development focus or to specify the
1026-development focus branch, then these links are shown next to the text.
1027+development focus branch, then these links are shown in the involvement
1028+portlet.
1029
1030 >>> owner_browser.open('http://launchpad.dev/fooix')
1031 >>> print_development_focus(owner_browser)
1032 Development focus:
1033 trunk series Change details
1034- Development focus branch has not been specified Link to branch
1035 Links:
1036- trunk series (/fooix/trunk)
1037- <span class="invisible-link">Change details</span>
1038- (http://launchpad.dev/fooix/+edit)
1039- <span class="invisible-link">Link to branch</span>
1040- Set the branch for this series
1041- (http://launchpad.dev/fooix/trunk/+linkbranch)
1042+ trunk series
1043+ (/fooix/trunk)
1044+ <span class="invisible-link">Change details</span>
1045+ (http://launchpad.dev/fooix/+edit)
1046+ >>> print_involvement_portlet(owner_browser)
1047+ Configure support tracker
1048+ http://launchpad.dev/fooix/+configure-answers
1049+ Configure bug tracker
1050+ http://launchpad.dev/fooix/+configure-bugtracker
1051+ Configure translations
1052+ http://launchpad.dev/fooix/+configure-translations
1053+ Configure project branch
1054+ http://launchpad.dev/fooix/trunk/+setbranch
1055
1056 The owner can specify the development focus branch from the overview page.
1057
1058- >>> owner_browser.getLink(url='+linkbranch').click()
1059- >>> owner_browser.getControl('Branch').value = '~eric/fooix/trunk'
1060+ >>> owner_browser.getLink(url='+setbranch').click()
1061+ >>> owner_browser.getControl(name='field.branch_location').value = (
1062+ ... '~eric/fooix/trunk')
1063 >>> owner_browser.getControl('Update').click()
1064 >>> print_feedback_messages(owner_browser.contents)
1065 Series code location updated.
1066
1067-The owner is taken back to the trunk series page.
1068+The owner is taken back to the project page.
1069
1070- >>> print_tag_with_id(owner_browser.contents, 'branch-details')
1071- lp://dev/fooix - Eric Change branch
1072+ >>> print_tag_with_id(owner_browser.contents, 'dev-focus')
1073+ Development focus:
1074+ trunk series Change details
1075+ lp://dev/fooix Change branch
1076+ View the branch content
1077
1078
1079 Projects with development focus branches
1080@@ -137,7 +154,6 @@
1081 >>> print_development_focus(anon_browser)
1082 Development focus:
1083 trunk series
1084- Development focus branch has not been specified
1085 Links:
1086 trunk series (/fooix/trunk)
1087
1088
1089=== modified file 'lib/lp/registry/stories/product/xx-product-edit.txt'
1090--- lib/lp/registry/stories/product/xx-product-edit.txt 2009-12-24 01:41:54 +0000
1091+++ lib/lp/registry/stories/product/xx-product-edit.txt 2010-04-09 18:48:33 +0000
1092@@ -387,10 +387,12 @@
1093 The remote_product field - which stores a Product's ID on the remote bug
1094 tracker - can be set from the +edit page, too.
1095
1096- >>> user_browser.open('http://launchpad.dev/thunderbird/+edit')
1097+ >>> user_browser.open(
1098+ ... 'http://launchpad.dev/thunderbird/+configure-bugtracker')
1099 >>> user_browser.getControl('Remote project').value = 'Thunderbird'
1100 >>> user_browser.getControl('Change').click()
1101
1102- >>> user_browser.open('http://launchpad.dev/thunderbird/+edit')
1103+ >>> user_browser.open(
1104+ ... 'http://launchpad.dev/thunderbird/+configure-bugtracker')
1105 >>> print user_browser.getControl('Remote project').value
1106 Thunderbird
1107
1108=== modified file 'lib/lp/registry/stories/product/xx-product-launchpad-usage.txt'
1109--- lib/lp/registry/stories/product/xx-product-launchpad-usage.txt 2010-01-20 23:10:13 +0000
1110+++ lib/lp/registry/stories/product/xx-product-launchpad-usage.txt 2010-04-09 18:48:33 +0000
1111@@ -28,20 +28,14 @@
1112 >>> registrant_browser = setupBrowser(
1113 ... auth='Basic test@canonical.com:test')
1114 >>> registrant_browser.open('http://launchpad.dev/firefox')
1115- >>> registrant_browser.getLink('Change details').click()
1116+ >>> registrant_browser.getLink('Configure bug tracker').click()
1117 >>> registrant_browser.url
1118- 'http://launchpad.dev/firefox/+edit'
1119+ 'http://launchpad.dev/firefox/+configure-bugtracker'
1120
1121 Firefox is currently marked as using Bugs. Let's specify that it
1122 doesn't use any bug tracker at all.
1123
1124 >>> registrant_browser.getControl(
1125- ... 'Translations for this project are done in Launchpad').selected
1126- False
1127- >>> registrant_browser.getControl(
1128- ... 'People can ask questions in Launchpad Answers').selected
1129- True
1130- >>> registrant_browser.getControl(
1131 ... 'In Launchpad').selected
1132 True
1133 >>> registrant_browser.getControl(
1134@@ -49,12 +43,39 @@
1135 ... 'become inactive').selected
1136 False
1137 >>> registrant_browser.getControl('Somewhere else').selected = True
1138+ >>> registrant_browser.getControl('Change').click()
1139
1140 We'll also set it as officially using codehosting.
1141
1142- >>> registrant_browser.getControl(
1143- ... 'Code for this project is published in Bazaar branches on'
1144- ... ' Launchpad').selected = True
1145+ >>> registrant_browser.getLink('Configure project branch').click()
1146+ >>> registrant_browser.getControl(name='field.branch_location').value = (
1147+ ... '~name12/firefox/main')
1148+ >>> registrant_browser.getControl('Update').click()
1149+
1150+Translations can be enabled.
1151+
1152+ >>> registrant_browser.open('http://launchpad.dev/firefox')
1153+ >>> registrant_browser.getLink('Configure translations').click()
1154+ >>> registrant_browser.url
1155+ 'http://launchpad.dev/firefox/+configure-translations'
1156+ >>> control = registrant_browser.getControl(
1157+ ... 'Translations for this project are done in Launchpad')
1158+ >>> control.selected
1159+ False
1160+ >>> control.selected = True
1161+ >>> registrant_browser.getControl('Change').click()
1162+
1163+Answers can be disabled.
1164+
1165+ >>> registrant_browser.open('http://launchpad.dev/firefox')
1166+ >>> registrant_browser.getLink('Configure support tracker').click()
1167+ >>> registrant_browser.url
1168+ 'http://launchpad.dev/firefox/+configure-answers'
1169+ >>> control = registrant_browser.getControl(
1170+ ... 'People can ask questions in Launchpad Answers')
1171+ >>> control.selected
1172+ True
1173+ >>> control.selected = False
1174 >>> registrant_browser.getControl('Change').click()
1175
1176 On the product page, we can see that the product doesn't use any bug
1177@@ -62,7 +83,7 @@
1178
1179 >>> uses = find_tag_by_id(registrant_browser.contents, id='uses')
1180 >>> print extract_text(uses)
1181- Uses Launchpad for: Answers and Branches.
1182+ Uses Launchpad for: Branches and Translations.
1183
1184
1185 Tracking bugs by email
1186@@ -71,7 +92,8 @@
1187 Instead if using a web-based bug tracker, projects can specify an
1188 email address where bug reports should be sent.
1189
1190- >>> registrant_browser.open('http://launchpad.dev/firefox/+edit')
1191+ >>> registrant_browser.open(
1192+ ... 'http://launchpad.dev/firefox/+configure-bugtracker')
1193 >>> registrant_browser.getControl(
1194 ... 'By emailing an upstream bug contact').selected = True
1195 >>> registrant_browser.getControl(
1196@@ -90,14 +112,15 @@
1197
1198 An error message is shown if the email address is not filled in.
1199
1200- >>> registrant_browser.open('http://launchpad.dev/firefox/+edit')
1201+ >>> registrant_browser.open(
1202+ ... 'http://launchpad.dev/firefox/+configure-bugtracker')
1203 >>> registrant_browser.getControl(
1204 ... 'By emailing an upstream bug contact').selected = True
1205 >>> registrant_browser.getControl(
1206 ... name='field.bugtracker.upstream_email_address').value = ''
1207 >>> registrant_browser.getControl('Change').click()
1208 >>> registrant_browser.url
1209- 'http://launchpad.dev/firefox/+edit'
1210+ 'http://launchpad.dev/firefox/+configure-bugtracker'
1211 >>> for message in find_tags_by_class(
1212 ... registrant_browser.contents, 'message'):
1213 ... print extract_text(message)
1214@@ -124,7 +147,7 @@
1215 >>> registrant_browser.title
1216 'Jokosher Audio Editor in Launchpad'
1217
1218- >>> registrant_browser.getLink('Change details').click()
1219+ >>> registrant_browser.getLink('Configure bug tracker').click()
1220 >>> registrant_browser.getControl('In Launchpad').selected
1221 True
1222
1223@@ -145,7 +168,7 @@
1224 Reviewing the edit page again, Dafydd, can see that bug expiration was
1225 also disabled by the switch from Launchpad Bugs.
1226
1227- >>> registrant_browser.getLink('Change details').click()
1228+ >>> registrant_browser.getLink('Configure bug tracker').click()
1229 >>> registrant_browser.getControl('In Launchpad').selected
1230 False
1231
1232
1233=== modified file 'lib/lp/registry/templates/pillar-involvement-portlet.pt'
1234--- lib/lp/registry/templates/pillar-involvement-portlet.pt 2009-08-15 05:35:13 +0000
1235+++ lib/lp/registry/templates/pillar-involvement-portlet.pt 2010-04-09 18:48:33 +0000
1236@@ -1,13 +1,40 @@
1237 <div
1238 xmlns:tal="http://xml.zope.org/namespaces/tal"
1239 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
1240- id="involvement" class="portlet involvement"
1241- tal:condition="view/has_involvement">
1242+ id="involvement" class="portlet"
1243+ tal:condition="view/has_involvement"
1244+ >
1245 <h2>Get Involved</h2>
1246
1247- <ul>
1248+ <ul class="involvement">
1249 <li tal:repeat="link view/enabled_links">
1250 <a tal:replace="structure link/fmt:link" />
1251 </li>
1252+
1253+ <tal:disabled repeat="link view/visible_disabled_links">
1254+ <li tal:condition="not: link/enabled"
1255+ tal:attributes="title string:Launchpad needs to know where the user can ${link/text/lower}"
1256+ class="disabled">
1257+ <div style="padding: 0.3em 0 0.3em 0.3em">
1258+ <div style="display: inline-block"
1259+ class="sprite icon-only warning-icon"></div>
1260+
1261+ <div style="height: 1.2em; float: right">
1262+ <img src="/@@/gray-arrow-right.png"
1263+ style="top: 50%; bottom: 50%; margin-top: -5px;
1264+ position: relative;
1265+ height: 9px; width: 14px; padding: 0"/>
1266+ </div>
1267+
1268+ <span tal:content="link/text"/>
1269+ </div>
1270+ </li>
1271+ </tal:disabled>
1272+ </ul>
1273+
1274+ <ul tal:condition="view/configuration_links" style="padding-top: 1em">
1275+ <li tal:repeat="link view/configuration_links">
1276+ <a tal:replace="structure link/fmt:link" />
1277+ </li>
1278 </ul>
1279 </div>
1280
1281=== modified file 'lib/lp/registry/templates/product-index.pt'
1282--- lib/lp/registry/templates/product-index.pt 2009-11-18 04:51:08 +0000
1283+++ lib/lp/registry/templates/product-index.pt 2010-04-09 18:48:33 +0000
1284@@ -116,10 +116,6 @@
1285 <br/>
1286 <a tal:replace="structure trunk/menu:context/source/fmt:link"/>
1287 </p>
1288- <p tal:condition="not: trunk_visible">
1289- Development focus branch has not been specified
1290- <a tal:replace="structure dev_focus/menu:overview/link_branch/fmt:icon" />
1291- </p>
1292 </dd>
1293 </dl>
1294
1295
1296=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations.txt'
1297--- lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2010-01-29 16:16:19 +0000
1298+++ lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2010-04-09 18:48:33 +0000
1299@@ -159,14 +159,14 @@
1300 ... find_tag_by_id(
1301 ... owner_browser.contents, 'not-translated-in-launchpad'))
1302 This project is not using Launchpad for translations.
1303- You can change this in the project settings. (Getting
1304- started with translating your project in Launchpad)
1305-
1306-The notice links to the project settings where the option can be set.
1307-
1308- >>> owner_browser.getLink('project settings').click()
1309+ Configure translations
1310+ Getting started with translating your project in Launchpad
1311+
1312+The notice links to the page for configuring translations on the project.
1313+
1314+ >>> owner_browser.getLink('Configure translations').click()
1315 >>> print owner_browser.url
1316- http://.../bazaar/+edit
1317+ http://.../bazaar/+configure-translations
1318
1319 An administrator also sees the notice.
1320
1321@@ -177,8 +177,8 @@
1322 ... find_tag_by_id(
1323 ... admin_browser.contents, 'not-translated-in-launchpad'))
1324 This project is not using Launchpad for translations.
1325- You can change this in the project settings. (Getting
1326- started with translating your project in Launchpad)
1327+ Configure translations
1328+ Getting started with translating your project in Launchpad
1329
1330 A Translations admin who is neither a Launchpad admin nor the project
1331 owner (and so won't be able to change the project's settings) sees the
1332@@ -213,7 +213,7 @@
1333 ... find_tag_by_id(
1334 ... jtv_browser.contents, 'not-translated-in-launchpad'))
1335 This project is not using Launchpad for translations.
1336- (Getting started with translating your project in Launchpad)
1337+ Getting started with translating your project in Launchpad
1338
1339
1340 Branch synchronization options
1341
1342=== modified file 'lib/lp/translations/stories/standalone/xx-product-translations.txt'
1343--- lib/lp/translations/stories/standalone/xx-product-translations.txt 2010-01-15 14:00:30 +0000
1344+++ lib/lp/translations/stories/standalone/xx-product-translations.txt 2010-04-09 18:48:33 +0000
1345@@ -49,20 +49,21 @@
1346 ... find_tag_by_id(
1347 ... registrant.contents, 'not-translated-in-launchpad'))
1348 This project is not using Launchpad for translations.
1349- You can change this in the project settings. (Getting
1350- started with translating your project in Launchpad)
1351+ Configure translations
1352+ Getting started with translating your project in Launchpad
1353
1354 >>> registrant.getLink(
1355 ... url=('/gnomebaker/trunk/'
1356 ... '+translations-upload')) is not None
1357 True
1358
1359-The instructions for the registrant link to the settings page, where they can
1360-configure the project to use Launchpad for translations if desired.
1361+The instructions for the registrant link to the translations
1362+configuration page, where they can configure the project to use
1363+Launchpad for translations if desired.
1364
1365- >>> registrant.getLink('project settings').click()
1366+ >>> registrant.getLink('Configure translations').click()
1367 >>> print registrant.url
1368- http://.../gnomebaker/+edit
1369+ http://.../gnomebaker/+configure-translations
1370
1371 (The template upload process is tested in xx-translation-import-queue.txt.)
1372
1373@@ -140,7 +141,7 @@
1374 >>> admin_browser.getLink('Overview').click()
1375 >>> print admin_browser.title
1376 Network Applet in Launchpad
1377- >>> admin_browser.getLink('Change details').click()
1378+ >>> admin_browser.getLink('Configure translations').click()
1379 >>> admin_browser.getControl(
1380 ... 'Translations for this project are done in Launchpad').selected
1381 False
1382
1383=== modified file 'lib/lp/translations/stories/translationgroups/15-product-translation-group.txt'
1384--- lib/lp/translations/stories/translationgroups/15-product-translation-group.txt 2009-09-18 15:42:19 +0000
1385+++ lib/lp/translations/stories/translationgroups/15-product-translation-group.txt 2010-04-09 18:48:33 +0000
1386@@ -10,9 +10,10 @@
1387 ... find_tag_by_id(netapplet_owner_browser.contents, 'uses'))
1388 Does not use Launchpad for development.
1389
1390- >>> netapplet_owner_browser.getLink('Change details').click()
1391+ >>> netapplet_owner_browser.getLink(
1392+ ... 'Configure translations').click()
1393 >>> print netapplet_owner_browser.title
1394- Change Network Applet's details...
1395+ Configure Translations : NetApplet
1396
1397 >>> netapplet_owner_browser.getControl(
1398 ... 'Translations for this project are done in Launchpad'
1399
1400=== modified file 'lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt'
1401--- lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt 2010-02-16 21:21:14 +0000
1402+++ lib/lp/translations/stories/translationgroups/46-test-distro-structured-permissions.txt 2010-04-09 18:48:33 +0000
1403@@ -1,7 +1,7 @@
1404 First, we state that netapplet is using Launchpad Translations.
1405
1406 >>> admin_browser.open('http://launchpad.dev/netapplet')
1407- >>> admin_browser.getLink('Change details').click()
1408+ >>> admin_browser.getLink('Configure translations').click()
1409 >>> admin_browser.getControl(
1410 ... 'Translations for this project are done in Launchpad'
1411 ... ).selected = True
1412
1413=== modified file 'lib/lp/translations/stories/translations/55-rosetta-potemplates.txt'
1414--- lib/lp/translations/stories/translations/55-rosetta-potemplates.txt 2009-12-21 17:27:17 +0000
1415+++ lib/lp/translations/stories/translations/55-rosetta-potemplates.txt 2010-04-09 18:48:33 +0000
1416@@ -47,7 +47,8 @@
1417
1418 # To check this, we need to state that this project uses Launchpad for
1419 # translations.
1420- >>> admin_browser.open('http://launchpad.dev/netapplet/+edit')
1421+ >>> admin_browser.open(
1422+ ... 'http://launchpad.dev/netapplet/+configure-translations')
1423 >>> admin_browser.getControl(
1424 ... 'Translations for this project are done in Launchpad'
1425 ... ).selected = True
1426
1427=== modified file 'lib/lp/translations/templates/product-portlet-not-using-launchpad.pt'
1428--- lib/lp/translations/templates/product-portlet-not-using-launchpad.pt 2009-11-01 20:18:32 +0000
1429+++ lib/lp/translations/templates/product-portlet-not-using-launchpad.pt 2010-04-09 18:48:33 +0000
1430@@ -4,17 +4,20 @@
1431 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
1432 omit-tag="">
1433
1434- <p id="not-translated-in-launchpad"
1435- tal:condition="not: context/official_rosetta">
1436+ <div id="not-translated-in-launchpad"
1437+ tal:condition="not: context/official_rosetta">
1438 <strong>
1439 This project is not using Launchpad for translations.
1440 </strong>
1441- <tal:admin_or_owner condition="context/required:launchpad.Edit">
1442- You can change this in the
1443- <a tal:attributes="href context/fmt:url/+edit">
1444- project settings</a>.
1445- </tal:admin_or_owner>
1446- (<a href="/+help/getting-started-for-your-project.html" target="help">Getting started with translating your project in Launchpad</a>)
1447- </p>
1448+ <ul>
1449+ <li>
1450+ <a tal:replace="structure context/menu:overview/configure_translations/fmt:link"/>
1451+ </li>
1452+ <li>
1453+ <a href="/+help/getting-started-for-your-project.html" target="help"
1454+ >Getting started with translating your project in Launchpad</a>
1455+ </li>
1456+ </ul>
1457+ </div>
1458
1459 </tal:root>