Merge lp:~bac/launchpad/bug-430748-team-mailinglist into lp:launchpad

Proposed by Brad Crittenden
Status: Merged
Approved by: Edwin Grubbs
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~bac/launchpad/bug-430748-team-mailinglist
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~bac/launchpad/bug-430748-team-mailinglist
Reviewer Review Type Date Requested Status
Edwin Grubbs (community) code Approve
Review via email: mp+11924@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

= Summary =

Fix bug 430784 - convert team-mailinglist.pt to UI 3.0.

== Proposed fix ==

JFDI

== Pre-implementation notes ==

n/a

== Implementation details ==

Simple fix to the template and fix the tests.

== Tests ==

bin/test -vvm lp.registry

== Demo and Q/A ==

The template and view are multi-modal. The same page is used to apply for a mailing
list and configure an existing one.

All of these views are available as screenshots at:
http://people.canonical.com/~bac/bug-430748-team-mailinglist/

* Run 'make run_all'
* As mark, go to https://launchpad.dev/~ubuntu-team
* Click on 'Create a mailing list'
* Apply
* Go to https://launchpad.dev/+mailinglists and approve the list
* Return to https://launchpad.dev/~ubuntu-team and click on 'Configure mailing list'
* You'll now see one of the other views where the admin can set the welcome message.
* Another view is for a rejected team. Apply, reject, look.

= 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-mailinglist.pt
  lib/lp/registry/stories/mailinglists/lifecycle.txt
  lib/lp/registry/stories/mailinglists/admin-approval.txt

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Hi Brad,

This branch looks good. I just have one thing that I stumbled upon when looking at your changes that would make a good drive-by cleanup.

merge-approved

Can you make this change?

        <browser:page
            for="lp.registry.interfaces.person.ITeam"
            permission="launchpad.MailingListManager"
- class="canonical.launchpad.browser.TeamMailingListConfigurationView"
+ class="lp.registry.browser.team.TeamMailingListConfigurationView"
            name="+mailinglist"
            template="../templates/team-mailinglist.pt"/>

-Edwin

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

I made the change and the others related to the team.
http://pastebin.ubuntu.com/272435/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/stories/mailinglists/admin-approval.txt'
2--- lib/lp/registry/stories/mailinglists/admin-approval.txt 2009-09-11 00:24:50 +0000
3+++ lib/lp/registry/stories/mailinglists/admin-approval.txt 2009-09-16 19:37:35 +0000
4@@ -157,7 +157,9 @@
5 The Test Two mailing list has been declined so Mailman will not create it.
6
7 >>> user_browser.open('http://launchpad.dev/~test-two/+mailinglist')
8- >>> print extract_text(find_main_content(user_browser.contents))
9+ >>> print extract_text(
10+ ... find_tag_by_id(user_browser.contents,
11+ ... 'mailing_list_status_message'))
12 The application for this team's mailing list has been declined.
13 Please contact a Launchpad administrator for further assistance.
14
15
16=== modified file 'lib/lp/registry/stories/mailinglists/lifecycle.txt'
17--- lib/lp/registry/stories/mailinglists/lifecycle.txt 2009-08-31 12:01:46 +0000
18+++ lib/lp/registry/stories/mailinglists/lifecycle.txt 2009-09-16 19:37:35 +0000
19@@ -13,8 +13,9 @@
20 >>> browser = setupBrowser(auth='Basic test@canonical.com:test')
21 >>> browser.open('http://launchpad.dev/~landscape-developers')
22 >>> browser.getLink(url='+mailinglist').click()
23- >>> browser.title
24- 'Configure mailing list'
25+ >>> from canonical.launchpad.helpers import backslashreplace
26+ >>> print backslashreplace(browser.title)
27+ +mailinglist : \u201cLandscape Developers\u201d team
28
29 >>> browser.getControl('Apply for Mailing List').click()
30 >>> browser.title
31@@ -243,6 +244,7 @@
32
33 The contact address is now set to the mailing list address.
34
35+ >>> browser.goBack()
36 >>> browser.getLink(url='+contactaddress').click()
37 >>> control = browser.getControl(name='field.contact_method')
38 >>> [strip_label(label) for label in control.displayValue]
39
40=== modified file 'lib/lp/registry/templates/team-mailinglist.pt'
41--- lib/lp/registry/templates/team-mailinglist.pt 2009-07-17 17:59:07 +0000
42+++ lib/lp/registry/templates/team-mailinglist.pt 2009-09-16 19:37:35 +0000
43@@ -3,10 +3,9 @@
44 xmlns:tal="http://xml.zope.org/namespaces/tal"
45 xmlns:metal="http://xml.zope.org/namespaces/metal"
46 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
47- xml:lang="en"
48- lang="en"
49- metal:use-macro="context/@@main_template/master"
50- i18n:domain="launchpad">
51+ metal:use-macro="view/macro:page/main_only"
52+ i18n:domain="launchpad"
53+>
54
55 <body>
56