Vaishnavi Asawale has proposed merging ~vaishnavi-asawale/launchpad/+git/launchpad-1:delete-mailing-list-creation into launchpad:master.
Commit message: Changes to prevent creation of ML Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~vaishnavi-asawale/launchpad/+git/launchpad-1/+merge/488406 -- Your team Launchpad code reviewers is requested to review the proposed merge of ~vaishnavi-asawale/launchpad/+git/launchpad-1:delete-mailing-list-creation into launchpad:master.
diff --git a/lib/lp/registry/browser/team.py b/lib/lp/registry/browser/team.py index d3b919c..9087e28 100644 --- a/lib/lp/registry/browser/team.py +++ b/lib/lp/registry/browser/team.py @@ -801,14 +801,6 @@ class TeamMailingListConfigurationView(MailingListTeamBaseView): return None elif self.mailing_list.status == MailingListStatus.REGISTERED: return None - elif self.mailing_list.status in [ - MailingListStatus.APPROVED, - MailingListStatus.CONSTRUCTING, - ]: - return _( - "This team's mailing list will be available within " - "a few minutes." - ) elif self.mailing_list.status == MailingListStatus.DECLINED: return _( "The application for this team's mailing list has been " @@ -1713,14 +1705,18 @@ class TeamMenuMixin(PPANavigationMenuMixIn, CommonMenuLinks): @enabled_with_permission("launchpad.Moderate") def configure_mailing_list(self): - target = "+mailinglist" mailing_list = self.person.mailing_list if mailing_list is not None: text = "Configure mailing list" icon = "edit" + target = "+mailinglist" else: - text = "Create a mailing list" - icon = "add" + text = "Read more about it here." + icon = None + target = ( + "https://blog.launchpad.net/" + "general/sunsetting-launchpads-mailing-lists" + ) summary = ( "The mailing list associated with %s" % self.context.displayname ) diff --git a/lib/lp/registry/browser/tests/test_mailinglists.py b/lib/lp/registry/browser/tests/test_mailinglists.py index ed16526..e89b09f 100644 --- a/lib/lp/registry/browser/tests/test_mailinglists.py +++ b/lib/lp/registry/browser/tests/test_mailinglists.py @@ -160,6 +160,7 @@ class TestTeamMailingListConfigurationView(MailingListTestCase): def test_public_achive_message_without_list(self): # Public teams have public archives. team = self.factory.makeTeam() + self.factory.makeMailingList(team, team.teamowner) view = create_initialized_view( team, name="+mailinglist", @@ -175,6 +176,7 @@ class TestTeamMailingListConfigurationView(MailingListTestCase): owner=owner, visibility=PersonVisibility.PRIVATE ) login_person(owner) + self.factory.makeMailingList(team, team.teamowner) view = create_initialized_view( team, name="+mailinglist", principal=owner ) diff --git a/lib/lp/registry/browser/tests/test_team.py b/lib/lp/registry/browser/tests/test_team.py index 1d82687..f60bfed 100644 --- a/lib/lp/registry/browser/tests/test_team.py +++ b/lib/lp/registry/browser/tests/test_team.py @@ -686,7 +686,7 @@ class TestTeamMenu(TestCaseWithFactory): menu.links = no_mailinst_list_links self.assertIs(True, check_menu_links(menu)) link = menu.configure_mailing_list() - self.assertEqual("Create a mailing list", link.text) + self.assertEqual("Read more about it here.", link.text) def test_TeamOverviewMenu_check_menu_links_with_mailing(self): self.factory.makeMailingList(self.team, self.team.teamowner) diff --git a/lib/lp/registry/templates/team-mailinglist.pt b/lib/lp/registry/templates/team-mailinglist.pt index f193a94..bda4261 100644 --- a/lib/lp/registry/templates/team-mailinglist.pt +++ b/lib/lp/registry/templates/team-mailinglist.pt @@ -17,7 +17,9 @@ <p id="mailing_list_status_message" tal:condition="view/mailing_list_status_message"> <strong tal:content="structure view/mailing_list_status_message"> - This team's mailing list will be available within a few minutes. + Launchpad does not support the creation of new mailing lists. + <a id="launchpad-blog-sunset-mailing-lists" + tal:attributes="href string:https://blog.launchpad.net/general/sunsetting-launchpads-mailing-lists">Read more about it here.</a> </strong> </p> @@ -34,38 +36,12 @@ <metal:widgets fill-slot="widgets"> <div id="no_mailing_list" - tal:condition="view/list_can_be_created"> - <p> - You can create a mailing list for this team. Team members - can subscribe and post to the team mailing list. - </p> - - <ul class="bulleted"> - <li> - The mailing list can be used as the team's contact address - </li> - <li> - Messages will be kept in a - <strong id="mailing-list-archive" - tal:content="context/visibility/title/fmt:lower" /> archive - </li> - <li> - Launchpad will silently discard email sent from addresses that are - not associated with a Launchpad account. - </li> - </ul> - - <p id="ubuntu-notice"><strong>Ubuntu does not use Launchpad to host - its mailing lists. Create them at - <a href="https://lists.ubuntu.com">lists.ubuntu.com</a> instead. - </strong></p> - - <p> - » <a href="https://help.launchpad.net/Teams/MailingLists">Help for mailing lists</a> - </p> - <input tal:replace="structure view/create_list_creation/render" /> - </div> - + tal:condition="view/list_can_be_created"> + Launchpad does not support the creation of new mailing lists. + <a id="launchpad-blog-sunset-mailing-lists" + tal:attributes="href string:https://blog.launchpad.net/general/sunsetting-launchpads-mailing-lists">Read more about it here.</a> + </div> + <div id="mailing_list_purge" tal:condition="view/list_can_be_purged"> <p>You can purge this mailing list so that the team can be merged or @@ -110,9 +86,14 @@ <input tal:replace="structure view/deactivate_list/render" /> </span> - <p tal:condition="view/list_can_be_reactivated"> - <input tal:replace="structure view/reactivate_list/render" /> - </p> + <div id="mailing_list_reactivate"> + <p tal:condition="view/list_can_be_reactivated"> + Launchpad does not support the reactivation of mailing lists. + <a id="launchpad-blog-sunset-mailing-lists" + tal:attributes="href string:https://blog.launchpad.net/general/sunsetting-launchpads-mailing-lists">Read more about it here.</a> + </p> + </div> + </div> </div> </div> diff --git a/lib/lp/registry/templates/team-portlet-mailinglist.pt b/lib/lp/registry/templates/team-portlet-mailinglist.pt index 5946ecf..287b3b7 100644 --- a/lib/lp/registry/templates/team-portlet-mailinglist.pt +++ b/lib/lp/registry/templates/team-portlet-mailinglist.pt @@ -42,7 +42,7 @@ >View subscribers</a> </div> <div tal:condition="not: view/archive_url"> - This team does not use Launchpad to host a mailing list. + Launchpad does not support the creation of new mailing lists. </div> <ul class="horizontal" tal:condition="context/menu:overview/configure_mailing_list/enabled"> diff --git a/lib/lp/testing/menu.py b/lib/lp/testing/menu.py index 61f2c83..014669b 100644 --- a/lib/lp/testing/menu.py +++ b/lib/lp/testing/menu.py @@ -20,7 +20,7 @@ from lp.services.webapp.servers import LaunchpadTestRequest def check_menu_links(menu): context = menu.context for link in menu.iterlinks(): - if link.target.startswith(("/", "http://")): + if link.target.startswith(("/", "http://", "https://")): # The context is not the context of this target. continue if "?" in link.target:
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp