launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #16451
[Merge] lp:~wgrant/launchpad/delayer-views into lp:launchpad
You have been requested to review the proposed merge of lp:~wgrant/launchpad/delayer-views into lp:launchpad.
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/delayer-views/+merge/83547
Code and Translations have most of their views restricted to their respective layers, limiting visibility to their own subdomains. Bugs also has one such view, +subscriptions. This is a problem if we want to shrink down to a single domain.
This branch fixes all but one view to be visible everywhere. As part of the promotion to the default layer, three redirects to a particular vhost are removed: +translate and +translations -> translations.launchpad.net, and +subscriptions -> bugs.launchpad.net. Since globalise-help-folder landed, those views function fine on any domain.
The remaining layer-specific view is TranslationsLayer:DistroSeries:+admin, which conflicts with Registry's DistroSeries:+admin. I intend to rename the former to DistroSeries:+translations-admin and promote it in a subsequent branch.
There are a few translations views with questionable namespacing, perhaps most notably +export and +import. But they don't conflict with anything now, and we can always rename them later.
--
https://code.launchpad.net/~wgrant/launchpad/delayer-views/+merge/83547
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/delayer-views into lp:launchpad.
=== modified file 'lib/lp/answers/browser/tests/test_question.py'
--- lib/lp/answers/browser/tests/test_question.py 2014-01-30 15:04:06 +0000
+++ lib/lp/answers/browser/tests/test_question.py 2014-02-19 04:03:27 +0000
@@ -11,12 +11,10 @@
from lp.answers.browser.question import QuestionTargetWidget
from lp.answers.interfaces.question import IQuestion
-from lp.answers.publisher import AnswersLayer
from lp.app.enums import ServiceUsage
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
login_person,
- logout,
person_logged_in,
TestCaseWithFactory,
)
@@ -46,16 +44,16 @@
# Titles (summary in the view) less than 250 characters are accepted.
form = self.getSearchForm('123456789 ' * 10)
view = create_initialized_view(
- self.question_target, name='+addquestion', layer=AnswersLayer,
- form=form, principal=self.user)
+ self.question_target, name='+addquestion', form=form,
+ principal=self.user)
self.assertEqual([], view.errors)
def test_question_title_exceeds_max_display_width(self):
# Titles (summary in the view) cannot exceed 250 characters.
form = self.getSearchForm('123456789 ' * 26)
view = create_initialized_view(
- self.question_target, name='+addquestion', layer=AnswersLayer,
- form=form, principal=self.user)
+ self.question_target, name='+addquestion', form=form,
+ principal=self.user)
self.assertEqual(1, len(view.errors))
self.assertEqual(
'The summary cannot exceed 250 characters.', view.errors[0])
@@ -68,13 +66,13 @@
self.question_target.answers_usage = ServiceUsage.NOT_APPLICABLE
login_person(self.user)
view = create_initialized_view(
- self.question_target, name='+addquestion', layer=AnswersLayer,
- principal=self.user)
+ self.question_target, name='+addquestion', principal=self.user)
self.assertFalse(view.context_uses_answers)
contents = view.render()
msg = "<strong>does not use</strong> Launchpad as its answer forum"
self.assertIn(msg, contents)
+
class QuestionEditViewTestCase(TestCaseWithFactory):
"""Verify the behaviour of the QuestionEditView."""
@@ -109,8 +107,7 @@
form = self.getForm(question)
form['field.whiteboard'] = 'comment'
form['field.target.product'] = other_target.name
- view = create_initialized_view(
- question, name='+edit', layer=AnswersLayer, form=form)
+ view = create_initialized_view(question, name='+edit', form=form)
self.assertEqual([], view.errors)
self.assertEqual(other_target, question.target)
self.assertEqual('comment', question.whiteboard)
=== modified file 'lib/lp/answers/browser/tests/views.txt'
--- lib/lp/answers/browser/tests/views.txt 2011-12-24 17:49:30 +0000
+++ lib/lp/answers/browser/tests/views.txt 2014-02-19 04:03:27 +0000
@@ -854,13 +854,11 @@
the question listing table. Products display the default columns of
Summary, Created, Submitter, Assignee, and Status.
- >>> from lp.answers.publisher import AnswersLayer
>>> from lp.testing.pages import (
... extract_text, find_tag_by_id)
>>> view = create_initialized_view(
- ... firefox, name="+questions", layer=AnswersLayer,
- ... principal=question_three.owner)
+ ... firefox, name="+questions", principal=question_three.owner)
>>> view.display_sourcepackage_column
False
@@ -877,8 +875,7 @@
package is displayed if it exists.
>>> view = create_initialized_view(
- ... ubuntu, name="+questions", layer=AnswersLayer,
- ... principal=question_three.owner)
+ ... ubuntu, name="+questions", principal=question_three.owner)
>>> view.display_sourcepackage_column
True
@@ -898,8 +895,7 @@
>>> mozilla = getUtility(IProjectGroupSet).getByName('mozilla')
>>> view = create_initialized_view(
- ... mozilla, name="+questions", layer=AnswersLayer,
- ... principal=question_three.owner)
+ ... mozilla, name="+questions", principal=question_three.owner)
>>> view.display_sourcepackage_column
False
@@ -919,8 +915,7 @@
>>> question_six.assignee = factory.makePerson(
... name="bob", displayname="Bob")
>>> view = create_initialized_view(
- ... firefox, name="+questions", layer=AnswersLayer,
- ... principal=question_three.owner)
+ ... firefox, name="+questions", principal=question_three.owner)
>>> view.display_sourcepackage_column
False
=== modified file 'lib/lp/app/stories/basics/notfound-traversals.txt'
--- lib/lp/app/stories/basics/notfound-traversals.txt 2012-07-06 17:58:27 +0000
+++ lib/lp/app/stories/basics/notfound-traversals.txt 2014-02-19 04:03:27 +0000
@@ -37,23 +37,11 @@
Before removing this, you must be completely sure that no supported
Ubuntu release is still pointing to this old URL (see bug #138090).
- >>> check_redirect("/mozilla/+translations", status=301)
>>> check_redirect("/products", status=301)
- >>> check_redirect("/firefox/1.0/+translations", status=301)
- >>> check_redirect("/firefox/+translations", status=301)
>>> check_redirect("/projects/firefox", status=301)
>>> check_redirect("/ubuntu/+source/evolution/+editbugcontact")
- >>> check_redirect("/ubuntu/hoary/+translations", status=301)
- >>> check_redirect("/ubuntu/hoary/+latest-full-language-pack",
- ... host="translations.launchpad.dev")
- >>> check_redirect("/ubuntu/hoary/+source/evolution/+translations",
- ... status=301)
- >>> check_redirect("/ubuntu/hoary/+source/mozilla-firefox/+pots",
- ... host='translations.launchpad.dev')
- >>> check_redirect(
- ... "/ubuntu/hoary/+source/pmount/+pots/pmount/apa/+translate",
- ... status=301)
- >>> check_redirect("/~name18/+translations", status=301)
+ >>> check_redirect("/ubuntu/hoary/+latest-full-language-pack")
+ >>> check_redirect("/ubuntu/hoary/+source/mozilla-firefox/+pots")
Viewing a bug in the context of an upstream where the bug has already
been reported (including checking the various pages that hang off that
=== modified file 'lib/lp/blueprints/browser/tests/test_specificationtarget.py'
--- lib/lp/blueprints/browser/tests/test_specificationtarget.py 2012-10-16 22:14:32 +0000
+++ lib/lp/blueprints/browser/tests/test_specificationtarget.py 2014-02-19 04:03:27 +0000
@@ -19,7 +19,6 @@
IHasSpecifications,
ISpecificationTarget,
)
-from lp.blueprints.publisher import BlueprintsLayer
from lp.testing import (
BrowserTestCase,
login_person,
@@ -81,8 +80,7 @@
def verify_involvment(self, context):
self.assertTrue(IHasSpecifications.providedBy(context))
- view = create_view(
- context, '+specs', layer=BlueprintsLayer, principal=self.user)
+ view = create_view(context, '+specs', principal=self.user)
self.assertTrue(
'<div id="involvement" class="portlet involvement">' in view())
@@ -108,8 +106,7 @@
def test_person(self):
context = self.factory.makePerson(name='pistachio')
self.assertTrue(IHasSpecifications.providedBy(context))
- view = create_view(
- context, '+specs', layer=BlueprintsLayer, principal=self.user)
+ view = create_view(context, '+specs', principal=self.user)
self.assertFalse(
'<div id="involvement" class="portlet involvement">' in view())
@@ -179,11 +176,7 @@
used_templates = list()
for config in test_configurations:
naked_target.blueprints_usage = config
- view = create_view(
- context,
- '+specs',
- layer=BlueprintsLayer,
- principal=self.user)
+ view = create_view(context, '+specs', principal=self.user)
used_templates.append(view.template.filename)
self.assertEqual(correct_templates, used_templates)
=== modified file 'lib/lp/bugs/browser/bugtarget.py'
--- lib/lp/bugs/browser/bugtarget.py 2014-02-19 00:35:25 +0000
+++ lib/lp/bugs/browser/bugtarget.py 2014-02-19 04:03:27 +0000
@@ -115,7 +115,6 @@
from lp.bugs.model.structuralsubscription import (
get_structural_subscriptions_for_target,
)
-from lp.bugs.publisher import BugsLayer
from lp.bugs.utilities.filebugdataparser import FileBugData
from lp.hardwaredb.interfaces.hwdb import IHWSubmissionSet
from lp.registry.browser.product import ProductConfigureBase
@@ -1362,14 +1361,6 @@
def initialize(self):
super(TargetSubscriptionView, self).initialize()
- # Some resources such as help files are only provided on the bugs
- # rootsite. So if we got here via another, possibly hand-crafted, URL
- # redirect to the equivalent URL on the bugs rootsite.
- if not BugsLayer.providedBy(self.request):
- new_url = urljoin(
- self.request.getRootURL('bugs'), self.request['PATH_INFO'])
- self.request.response.redirect(new_url)
- return
expose_structural_subscription_data_to_js(
self.context, self.request, self.user, self.subscriptions)
=== modified file 'lib/lp/bugs/browser/tests/test_bugs.py'
--- lib/lp/bugs/browser/tests/test_bugs.py 2013-01-03 00:27:37 +0000
+++ lib/lp/bugs/browser/tests/test_bugs.py 2014-02-19 04:03:27 +0000
@@ -6,12 +6,10 @@
__metaclass__ = type
from zope.component import getUtility
-from zope.security.proxy import removeSecurityProxy
from lp.app.enums import InformationType
from lp.bugs.interfaces.bugtask import BugTaskStatus
from lp.bugs.interfaces.malone import IMaloneApplication
-from lp.bugs.publisher import BugsLayer
from lp.registry.enums import BugSharingPolicy
from lp.registry.interfaces.product import License
from lp.services.webapp.publisher import canonical_url
@@ -38,7 +36,7 @@
bug = self.factory.makeBug()
form = dict(id=str(bug.id))
view = create_initialized_view(
- self.application, name='+index', layer=BugsLayer, form=form)
+ self.application, name='+index', form=form)
self.assertEqual(None, view.error_message)
self.assertEqual(
canonical_url(bug), view.request.response.getHeader('Location'))
@@ -50,7 +48,7 @@
bug.name = 'bingo'
form = dict(id='bingo')
view = create_initialized_view(
- self.application, name='+index', layer=BugsLayer, form=form)
+ self.application, name='+index', form=form)
self.assertEqual(None, view.error_message)
self.assertEqual(
canonical_url(bug), view.request.response.getHeader('Location'))
@@ -60,7 +58,7 @@
# found.
form = dict(id='fnord')
view = create_initialized_view(
- self.application, name='+index', layer=BugsLayer, form=form)
+ self.application, name='+index', form=form)
self.assertEqual(
"Bug 'fnord' is not registered.", view.error_message)
self.assertEqual(None, view.request.response.getHeader('Location'))
@@ -70,7 +68,7 @@
# instead of a string.
form = dict(id=['fnord', 'pting'])
view = create_initialized_view(
- self.application, name='+index', layer=BugsLayer, form=form)
+ self.application, name='+index', form=form)
self.assertEqual(
"Bug ['fnord', 'pting'] is not registered.", view.error_message)
self.assertEqual(None, view.request.response.getHeader('Location'))
=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_filebug.py'
--- lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-12-10 13:43:47 +0000
+++ lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2014-02-19 04:03:27 +0000
@@ -30,7 +30,6 @@
BugTaskImportance,
BugTaskStatus,
)
-from lp.bugs.publisher import BugsLayer
from lp.registry.enums import BugSharingPolicy
from lp.registry.interfaces.projectgroup import IProjectGroup
from lp.services.temporaryblobstorage.interfaces import (
@@ -811,7 +810,7 @@
sourcepackage.distribution.name),
'field.packagename': 'my-package',
'field.actions.submit_bug': 'Submit Bug Request',
- }, layer=BugsLayer, principal=user)
+ }, principal=user)
msg = "\n".join([
notification.message
for notification in view.request.response.notifications])
=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_subscription.py'
--- lib/lp/bugs/browser/tests/test_bugtarget_subscription.py 2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/browser/tests/test_bugtarget_subscription.py 2014-02-19 04:03:27 +0000
@@ -12,7 +12,6 @@
)
from lp.testing.deprecated import LaunchpadFormHarness
from lp.testing.layers import LaunchpadFunctionalLayer
-from lp.testing.views import create_view
class TargetSubscriptionViewTestCase(TestCaseWithFactory):
@@ -34,19 +33,3 @@
harness = LaunchpadFormHarness(
self.product, TargetSubscriptionView)
harness.view.initialize()
-
- def test_does_not_redirect(self):
- # +subscriptions on the bugs facet does not redirect.
- with person_logged_in(self.subscriber):
- view = create_view(
- self.product, name='+subscriptions', rootsite='bugs')
- view.initialize()
- self.assertFalse(view._isRedirected())
-
- def test_redirects(self):
- # +subscriptions on anything but the bugs facet redirects.
- with person_logged_in(self.subscriber):
- view = create_view(
- self.product, name='+subscriptions', rootsite='code')
- view.initialize()
- self.assertTrue(view._isRedirected())
=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_tags.py'
--- lib/lp/bugs/browser/tests/test_bugtarget_tags.py 2012-08-08 11:48:29 +0000
+++ lib/lp/bugs/browser/tests/test_bugtarget_tags.py 2014-02-19 04:03:27 +0000
@@ -3,7 +3,6 @@
__metaclass__ = type
-from lp.bugs.publisher import BugsLayer
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
from lp.testing.views import create_view
@@ -22,16 +21,14 @@
self.factory.makeBug(target=self.target_product)
view = create_view(
self.project,
- name="+bugtarget-portlet-tags-content",
- layer=BugsLayer)
+ name="+bugtarget-portlet-tags-content")
self.assertEqual([], [tag['tag'] for tag in view.tags_cloud_data])
def test_tags(self):
self.factory.makeBug(target=self.target_product, tags=['foo'])
view = create_view(
self.project,
- name="+bugtarget-portlet-tags-content",
- layer=BugsLayer)
+ name="+bugtarget-portlet-tags-content")
self.assertEqual(
[u'foo'],
[tag['tag'] for tag in view.tags_cloud_data])
@@ -47,8 +44,7 @@
target=self.target_product, tags=['tag-first'])
view = create_view(
self.project,
- name="+bugtarget-portlet-tags-content",
- layer=BugsLayer)
+ name="+bugtarget-portlet-tags-content")
self.assertEqual(
[u'tag-first', u'tag-middle', u'tag-last'],
[tag['tag'] for tag in view.tags_cloud_data])
=== modified file 'lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py'
--- lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py 2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py 2014-02-19 04:03:27 +0000
@@ -5,7 +5,6 @@
__metaclass__ = type
-from lp.bugs.publisher import BugsLayer
from lp.registry.browser.distribution import DistributionBugsMenu
from lp.registry.browser.distributionsourcepackage import (
DistributionSourcePackageBugsMenu,
@@ -30,8 +29,7 @@
login('test@xxxxxxxxxxxxx')
self.target = self.makeTarget()
self.menu = self.getMenu()
- self.view = create_initialized_view(self.target, name="+index",
- layer=BugsLayer)
+ self.view = create_initialized_view(self.target, name="+index")
def makeTarget(self):
raise NotImplementedError
=== modified file 'lib/lp/code/browser/configure.zcml'
--- lib/lp/code/browser/configure.zcml 2014-02-19 00:35:25 +0000
+++ lib/lp/code/browser/configure.zcml 2014-02-19 04:03:27 +0000
@@ -32,7 +32,6 @@
name="+project-cloud"/>
<browser:page
for="lp.registry.interfaces.product.IProductSet"
- layer="lp.code.publisher.CodeLayer"
name="+project-cloud"
class="lp.code.browser.bazaar.BazaarProductView"
template="../templates/code-in-branches.pt"
@@ -47,7 +46,6 @@
/>
<browser:page
for="lp.services.webapp.interfaces.ILaunchpadApplication"
- layer="lp.code.publisher.CodeLayer"
name="+recently-registered-branches"
class="lp.code.browser.branchlisting.RecentlyRegisteredBranchesView"
template="../templates/branch-listing-cross-product.pt"
@@ -55,7 +53,6 @@
/>
<browser:page
for="lp.services.webapp.interfaces.ILaunchpadApplication"
- layer="lp.code.publisher.CodeLayer"
name="+recently-imported-branches"
class="lp.code.browser.branchlisting.RecentlyImportedBranchesView"
template="../templates/branch-listing-cross-product.pt"
@@ -63,7 +60,6 @@
/>
<browser:page
for="lp.services.webapp.interfaces.ILaunchpadApplication"
- layer="lp.code.publisher.CodeLayer"
name="+recently-changed-branches"
class="lp.code.browser.branchlisting.RecentlyChangedBranchesView"
template="../templates/branch-listing-cross-product.pt"
@@ -77,7 +73,6 @@
rootsite="code"/>
<browser:page
for="lp.code.interfaces.codereviewvote.ICodeReviewVoteReference"
- layer="lp.code.publisher.CodeLayer"
name="+reassign"
class="lp.code.browser.codereviewvote.CodeReviewVoteReassign"
permission="launchpad.AnyPerson"
@@ -89,11 +84,9 @@
rootsite="code"/>
<browser:defaultView
for="lp.code.interfaces.codeimportmachine.ICodeImportMachine"
- name="+index"
- layer="lp.code.publisher.CodeLayer"/>
+ name="+index"/>
<browser:page
for="lp.code.interfaces.codeimportmachine.ICodeImportMachine"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codeimportmachine.CodeImportMachineView"
name="+index"
template="../templates/codeimport-machine-index.pt"
@@ -108,11 +101,9 @@
rootsite="code"/>
<browser:defaultView
for="lp.code.interfaces.codeimportmachine.ICodeImportMachineSet"
- name="+index"
- layer="lp.code.publisher.CodeLayer"/>
+ name="+index"/>
<browser:page
for="lp.code.interfaces.codeimportmachine.ICodeImportMachineSet"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codeimportmachine.CodeImportMachineSetView"
name="+index"
template="../templates/codeimport-machines.pt"
@@ -131,18 +122,15 @@
rootsite="code"/>
<browser:defaultView
for="lp.code.interfaces.codehosting.IBazaarApplication"
- layer="lp.code.publisher.CodeLayer"
name="+index"/>
<browser:page
for="lp.code.interfaces.codehosting.IBazaarApplication"
- layer="lp.code.publisher.CodeLayer"
permission="zope.Public"
class="lp.code.browser.bazaar.BazaarApplicationView"
name="+index"
template="../templates/bazaar-index.pt" />
<browser:page
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
name="+hierarchy"
class="lp.code.browser.branch.BranchHierarchy"
template="../../app/templates/launchpad-hierarchy.pt"
@@ -152,7 +140,6 @@
classes="BranchMergeProposalNavigation"/>
<browser:defaultView
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
name="+index"/>
<!-- No view needed -->
@@ -169,7 +156,6 @@
<browser:pages
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalView"
permission="launchpad.View">
<browser:page
@@ -198,7 +184,6 @@
</browser:pages>
<browser:pages
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalEditView"
permission="launchpad.Edit">
<browser:page
@@ -208,77 +193,66 @@
<browser:page
name="+edit-commit-message"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalCommitMessageEditView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+edit-description"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalDescriptionEditView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+delete"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalDeleteView"
permission="launchpad.Edit"
template="../templates/branchmergeproposal-delete.pt"/>
<browser:page
name="+edit-status"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalChangeStatusView"
permission="launchpad.Edit"
template="../templates/branchmergeproposal-editstatus.pt"/>
<browser:page
name="+request-review"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalRequestReviewView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+resubmit"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalResubmitView"
permission="launchpad.Edit"
template="../templates/branchmergeproposal-resubmit.pt"/>
<browser:page
name="+enqueue"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalEnqueueView"
permission="launchpad.Edit"
template="../templates/branchmergeproposal-enqueue.pt"/>
<browser:page
name="+dequeue"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalDequeueView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+dequeue-inline"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalInlineDequeueView"
permission="launchpad.Edit"
template="../templates/inline-form-only-buttons.pt"/>
<browser:page
name="+jump-queue"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalJumpQueueView"
permission="launchpad.Edit"
template="../templates/inline-form-only-buttons.pt"/>
<browser:page
name="+merged"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalMergedView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
@@ -291,21 +265,18 @@
<browser:page
name="+pagelet-subscribers"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalSubscribersView"
permission="launchpad.View"
template="../templates/branchmergeproposal-pagelet-subscribers.pt"/>
<browser:page
name="+comment"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codereviewcomment.CodeReviewCommentAddView"
permission="launchpad.AnyPerson"
template="../templates/codereviewcomment-reply.pt"/>
<browser:page
name="+review"
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.BranchMergeProposalAddVoteView"
permission="launchpad.AnyPerson"
template="../templates/branchmergeproposal-vote.pt"/>
@@ -316,13 +287,11 @@
rootsite="code"/>
<browser:page
for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalListingBatchNavigator"
- layer="lp.code.publisher.CodeLayer"
name="+listing"
template="../templates/branchmergeproposal-listing.pt"
permission="zope.Public"/>
<browser:page
for="*"
- layer="lp.code.publisher.CodeLayer"
name="+bmp-macros"
permission="zope.Public"
template="../templates/branchmergeproposal-macros.pt"
@@ -335,19 +304,16 @@
module="lp.code.browser.branchmergeproposal"/>
<browser:page
for="lp.code.interfaces.branchsubscription.IBranchSubscription"
- layer="lp.code.publisher.CodeLayer"
name="+hierarchy"
class="lp.code.browser.branch.BranchHierarchy"
template="../../app/templates/launchpad-hierarchy.pt"
permission="zope.Public"/>
<browser:defaultView
for="lp.code.interfaces.branchsubscription.IBranchSubscription"
- layer="lp.code.publisher.CodeLayer"
name="+index"/>
<browser:page
name="+index"
for="lp.code.interfaces.branchsubscription.IBranchSubscription"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchsubscription.BranchSubscriptionEditView"
permission="launchpad.Edit"
template="../templates/branchsubscription-edit.pt"/>
@@ -358,14 +324,12 @@
rootsite="code"/>
<browser:page
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
name="+hierarchy"
class="lp.code.browser.branch.BranchHierarchy"
template="../../app/templates/launchpad-hierarchy.pt"
permission="zope.Public"/>
<browser:defaultView
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
name="+index"/>
<browser:url
for="lp.code.interfaces.branch.IBranch"
@@ -375,7 +339,6 @@
classes="BranchNavigation"/>
<browser:pages
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
permission="zope.Public"
class="lp.code.browser.branch.BranchView">
<browser:page
@@ -414,7 +377,6 @@
</browser:pages>
<browser:pages
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
permission="zope.Public">
<browser:page
name="+heading"
@@ -423,20 +385,17 @@
<browser:page
name="+portlet-subscribers"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.BranchSubscriptionsView"
permission="zope.Public"
template="../templates/branch-portlet-subscribers.pt"/>
<browser:page
name="+branch-portlet-subscriber-content"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchsubscription.BranchPortletSubscribersContent"
template="../templates/branch-portlet-subscribers-content.pt"
permission="zope.Public" />
<browser:pages
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
facet="overview"
permission="zope.Public"
class="lp.code.browser.branch.BranchInProductView">
@@ -446,13 +405,11 @@
</browser:pages>
<browser:page
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
name="+macros"
permission="zope.Public"
template="../templates/branch-macros.pt"/>
<browser:page
for="*"
- layer="lp.code.publisher.CodeLayer"
name="branch-form-macros"
permission="zope.Public"
template="../templates/branch-form-macros.pt"
@@ -461,61 +418,52 @@
name="+whiteboard"
for="lp.code.interfaces.branch.IBranch"
class="lp.code.browser.branch.BranchEditWhiteboardView"
- layer="lp.code.publisher.CodeLayer"
permission="launchpad.AnyPerson"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+edit-status"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.BranchEditStatusView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+edit-information-type"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.BranchEditInformationTypeView"
permission="launchpad.Moderate"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+edit"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.BranchEditView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+upgrade"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.BranchUpgradeView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+reviewer"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.BranchReviewerEditView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+edit-import"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codeimport.CodeImportEditView"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+delete"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.BranchDeletionView"
permission="launchpad.Edit"
template="../templates/branch-delete.pt"/>
<browser:pages
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.BranchMirrorStatusView"
permission="launchpad.View">
<browser:page
@@ -528,69 +476,59 @@
<browser:page
name="+subscribe"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchsubscription.BranchSubscriptionAddView"
permission="launchpad.AnyPerson"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+register-merge"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.RegisterBranchMergeProposalView"
permission="launchpad.AnyPerson"
template="../templates/branch-register-merge.pt"/>
<browser:page
name="+linkbug"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.bugs.browser.bugbranch.BranchLinkToBugView"
permission="launchpad.AnyPerson"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+linkblueprint"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.blueprints.browser.specificationbranch.BranchLinkToSpecificationView"
permission="launchpad.AnyPerson"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+addsubscriber"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchsubscription.BranchSubscriptionAddOtherView"
permission="launchpad.AnyPerson"
template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+edit-subscription"
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchsubscription.BranchSubscriptionEditOwnView"
permission="launchpad.AnyPerson"
template="../templates/branch-edit-subscription.pt"/>
<browser:page
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.BranchRequestImportView"
name="+request-import"
template="../templates/inline-form-only-buttons.pt"
permission="launchpad.AnyPerson"/>
<browser:page
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branch.TryImportAgainView"
name="+try-again"
template="../templates/inline-form-only-buttons.pt"
permission="launchpad.AnyPerson"/>
<browser:page
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposallisting.BranchActiveReviewsView"
permission="zope.Public"
name="+activereviews"
template="../templates/active-reviews.pt"/>
<browser:page
for="lp.code.interfaces.branch.IBranchBatchNavigator"
- layer="lp.code.publisher.CodeLayer"
name="+branch-listing"
template="../templates/branch-listing.pt"
permission="zope.Public"/>
@@ -601,7 +539,6 @@
module="lp.code.browser.branch"/>
<browser:page
for="lp.code.interfaces.codereviewcomment.ICodeReviewComment"
- layer="lp.code.publisher.CodeLayer"
name="+hierarchy"
class="lp.code.browser.branch.BranchHierarchy"
template="../../app/templates/launchpad-hierarchy.pt"
@@ -613,11 +550,9 @@
rootsite="code"/>
<browser:defaultView
for="lp.code.interfaces.codereviewcomment.ICodeReviewComment"
- layer="lp.code.publisher.CodeLayer"
name="+index"/>
<browser:pages
for="lp.code.interfaces.codereviewcomment.ICodeReviewComment"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codereviewcomment.CodeReviewCommentView"
permission="zope.Public">
<browser:page
@@ -637,7 +572,6 @@
/>
<browser:pages
for="lp.code.browser.codereviewcomment.ICodeReviewDisplayComment"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codereviewcomment.CodeReviewCommentView"
permission="zope.Public">
<browser:page
@@ -657,7 +591,6 @@
<browser:pages
for="lp.code.browser.branchmergeproposal.ICodeReviewNewRevisions"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposal.CodeReviewNewRevisionsView"
permission="zope.Public">
<browser:page
@@ -670,7 +603,6 @@
<browser:page
name="+reply"
for="lp.code.interfaces.codereviewcomment.ICodeReviewComment"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codereviewcomment.CodeReviewCommentAddView"
permission="launchpad.AnyPerson"
template="../templates/codereviewcomment-reply.pt"/>
@@ -679,7 +611,6 @@
module="lp.code.browser.codereviewcomment"/>
<browser:page
for="lp.code.interfaces.codeimport.ICodeImport"
- layer="lp.code.publisher.CodeLayer"
name="+macros"
permission="zope.Public"
template="../templates/codeimport-macros.pt"/>
@@ -690,25 +621,21 @@
rootsite="code"/>
<browser:defaultView
for="lp.code.interfaces.codeimport.ICodeImportSet"
- name="+index"
- layer="lp.code.publisher.CodeLayer"/>
+ name="+index"/>
<browser:page
for="lp.code.interfaces.codeimport.ICodeImportSet"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codeimport.CodeImportSetView"
name="+index"
template="../templates/codeimport-list.pt"
permission="zope.Public"/>
<browser:page
for="lp.code.interfaces.codeimport.ICodeImportSet"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codeimport.CodeImportNewView"
name="+new"
template="../templates/codeimport-new.pt"
permission="launchpad.AnyPerson"/>
<browser:page
for="lp.registry.interfaces.product.IProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.codeimport.CodeImportNewView"
name="+new-import"
template="../templates/codeimport-new.pt"
@@ -727,77 +654,66 @@
layer="lp.code.publisher.CodeLayer"/>
<browser:page
for="lp.registry.interfaces.sourcepackage.ISourcePackage"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.SourcePackageBranchesView"
permission="zope.Public"
name="+branches"
template="../templates/sourcepackage-branches.pt"/>
<browser:page
for="lp.registry.interfaces.sourcepackage.ISourcePackage"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.summary.BranchCountSummaryView"
permission="zope.Public"
name="+count-summary"
template="../templates/branch-count-summary.pt"/>
<browser:page
for="lp.registry.interfaces.distribution.IDistribution"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.DistributionBranchListingView"
permission="zope.Public"
name="+branches"
template="../templates/generic-branch-listing.pt"/>
<browser:page
for="lp.registry.interfaces.distribution.IDistribution"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.summary.BranchCountSummaryView"
permission="zope.Public"
name="+count-summary"
template="../templates/branch-count-summary.pt"/>
<browser:page
for="lp.registry.interfaces.distroseries.IDistroSeries"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.DistroSeriesBranchListingView"
permission="zope.Public"
name="+branches"
template="../templates/generic-branch-listing.pt"/>
<browser:page
for="lp.registry.interfaces.distroseries.IDistroSeries"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.summary.BranchCountSummaryView"
permission="zope.Public"
name="+count-summary"
template="../templates/branch-count-summary.pt"/>
<browser:page
for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.DistributionSourcePackageBranchesView"
permission="zope.Public"
name="+branches"
template="../templates/generic-branch-listing.pt"/>
<browser:page
for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.GroupedDistributionSourcePackageBranchesView"
permission="zope.Public"
name="+code-index"
template="../templates/distributionsourcepackage-branches-grouped.pt"/>
<browser:page
for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.summary.BranchCountSummaryView"
permission="zope.Public"
name="+count-summary"
template="../templates/branch-count-summary.pt"/>
<browser:page
for="lp.registry.interfaces.projectgroup.IProjectGroup"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.ProjectBranchesView"
permission="zope.Public"
name="+branches"
template="../templates/project-branches.pt"/>
<browser:page
for="lp.registry.interfaces.projectgroup.IProjectGroup"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.summary.BranchCountSummaryView"
permission="zope.Public"
name="+count-summary"
@@ -814,48 +730,41 @@
<browser:page
for="lp.registry.interfaces.person.IPerson"
class="lp.code.browser.branchlisting.PersonOwnedBranchesView"
- layer="lp.code.publisher.CodeLayer"
permission="zope.Public"
name="+branches"
template="../templates/person-branches.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
class="lp.code.browser.branchlisting.PersonOwnedBranchesView"
- layer="lp.code.publisher.CodeLayer"
permission="zope.Public"
name="+ownedbranches"
template="../templates/person-branches.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
class="lp.code.browser.branchlisting.PersonSubscribedBranchesView"
- layer="lp.code.publisher.CodeLayer"
permission="zope.Public"
name="+subscribedbranches"
template="../templates/person-branches.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.PersonRegisteredBranchesView"
permission="zope.Public"
name="+registeredbranches"
template="../templates/person-branches.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.PersonCodeSummaryView"
permission="zope.Public"
name="+codesummary"
template="../templates/person-codesummary.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposallisting.PersonActiveReviewsView"
permission="zope.Public"
name="+activereviews"
template="../templates/active-reviews.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.PersonTeamBranchesView"
name="+portlet-teambranches"
template="../templates/person-portlet-teambranches.pt"
@@ -863,14 +772,12 @@
<browser:page
for="lp.registry.interfaces.product.IProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.ProductBranchesView"
permission="zope.Public"
name="+branches"
template="../templates/product-branches.pt"/>
<browser:page
for="lp.registry.interfaces.product.IProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.ProductCodeIndexView"
permission="zope.Public"
name="+code-index"
@@ -883,14 +790,12 @@
template="../templates/product-portlet-codestatistics.pt"/>
<browser:page
for="lp.registry.interfaces.product.IProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.ProductCodeIndexView"
permission="zope.Public"
name="+branch-summary"
template="../templates/product-branch-summary.pt"/>
<browser:page
for="lp.registry.interfaces.product.IProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.summary.BranchCountSummaryView"
permission="zope.Public"
name="+count-summary"
@@ -948,7 +853,6 @@
<browser:page
for="lp.registry.interfaces.personproduct.IPersonProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.PersonProductOwnedBranchesView"
permission="zope.Public"
name="+branches"
@@ -956,7 +860,6 @@
/>
<browser:page
for="lp.registry.interfaces.personproduct.IPersonProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.PersonProductSubscribedBranchesView"
permission="zope.Public"
name="+subscribedbranches"
@@ -964,7 +867,6 @@
/>
<browser:page
for="lp.registry.interfaces.personproduct.IPersonProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.PersonProductRegisteredBranchesView"
permission="zope.Public"
name="+registeredbranches"
@@ -972,7 +874,6 @@
/>
<browser:page
for="lp.registry.interfaces.personproduct.IPersonProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposallisting.PersonProductActiveReviewsView"
permission="zope.Public"
name="+activereviews"
@@ -980,7 +881,6 @@
<browser:page
for="lp.registry.interfaces.personproduct.IPersonProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.PersonProductTeamBranchesView"
name="+portlet-teambranches"
template="../templates/person-portlet-teambranches.pt"
@@ -989,7 +889,6 @@
<browser:page
for="lp.registry.interfaces.personproduct.IPersonProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchlisting.PersonProductCodeSummaryView"
name="+codesummary"
template="../templates/person-codesummary.pt"
@@ -998,7 +897,6 @@
<browser:page
for="lp.code.interfaces.hasbranches.IHasMergeProposals"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposallisting.BranchMergeProposalListingView"
permission="zope.Public"
name="+merges"
@@ -1006,7 +904,6 @@
<browser:page
for="lp.code.interfaces.hasbranches.IHasMergeProposals"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergeproposallisting.ActiveReviewsView"
permission="zope.Public"
name="+activereviews"
@@ -1080,32 +977,27 @@
<browser:defaultView
for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe"
- name="+index"
- layer="lp.code.publisher.CodeLayer"/>
+ name="+index" />
<browser:page
for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeView"
name="+index"
template="../templates/sourcepackagerecipe-index.pt"
permission="launchpad.View"/>
<browser:page
for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeRequestBuildsHtmlView"
name="+request-builds"
template="../templates/sourcepackagerecipe-request-builds.pt"
permission="launchpad.AnyPerson"/>
<browser:page
for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeRequestBuildsAjaxView"
name="+builds"
template="../templates/sourcepackagerecipe-builds.pt"
permission="launchpad.View"/>
<browser:page
for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeRequestDailyBuildView"
name="+request-daily-build"
permission="launchpad.Edit"/>
@@ -1139,21 +1031,18 @@
<browser:page
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView"
permission="launchpad.AnyPerson"
name="+new-recipe"
template="../templates/sourcepackagerecipe-new.pt"/>
<browser:page
for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeEditView"
permission="launchpad.Edit"
name="+edit"
template="../../app/templates/generic-edit.pt"/>
<browser:page
for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeDeleteView"
permission="launchpad.Edit"
name="+delete"
@@ -1161,21 +1050,18 @@
<browser:page
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipelisting.BranchRecipeListingView"
permission="zope.Public"
name="+recipes"
template="../templates/sourcepackagerecipe-listing.pt"/>
<browser:page
for="lp.registry.interfaces.product.IProduct"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipelisting.ProductRecipeListingView"
permission="zope.Public"
name="+recipes"
template="../templates/sourcepackagerecipe-listing.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.sourcepackagerecipelisting.PersonRecipeListingView"
permission="zope.Public"
name="+recipes"
@@ -1183,7 +1069,6 @@
<browser:page
for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe"
- layer="lp.code.publisher.CodeLayer"
name="+hierarchy"
class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeHierarchy"
template="../../app/templates/launchpad-hierarchy.pt"
@@ -1197,7 +1082,6 @@
<browser:page
for="lp.registry.interfaces.person.IPerson"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergequeuelisting.PersonMergeQueueListingView"
permission="zope.Public"
name="+merge-queues"
@@ -1205,7 +1089,6 @@
<browser:page
for="*"
- layer="lp.code.publisher.CodeLayer"
name="+bmq-macros"
permission="zope.Public"
template="../templates/branchmergequeue-macros.pt"
@@ -1224,18 +1107,15 @@
<browser:defaultView
for="lp.code.interfaces.branchmergequeue.IBranchMergeQueue"
- name="+index"
- layer="lp.code.publisher.CodeLayer" />
+ name="+index" />
<browser:page
for="lp.code.interfaces.branchmergequeue.IBranchMergeQueue"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergequeue.BranchMergeQueueView"
name="+index"
template="../templates/branchmergequeue-index.pt"
permission="zope.Public" />
<browser:page
for="lp.code.interfaces.branch.IBranch"
- layer="lp.code.publisher.CodeLayer"
class="lp.code.browser.branchmergequeue.BranchMergeQueueAddView"
name="+create-queue"
template="../../app/templates/generic-edit.pt"
=== modified file 'lib/lp/code/browser/tests/test_product.py'
--- lib/lp/code/browser/tests/test_product.py 2012-10-12 14:53:10 +0000
+++ lib/lp/code/browser/tests/test_product.py 2014-02-19 04:03:27 +0000
@@ -20,7 +20,6 @@
)
from lp.code.enums import BranchType
from lp.code.interfaces.revision import IRevisionSet
-from lp.code.publisher import CodeLayer
from lp.registry.enums import BranchSharingPolicy
from lp.services.webapp import canonical_url
from lp.testing import (
@@ -398,11 +397,11 @@
def test_cannot_configure_branches_product_no_edit_permission(self):
product = self.factory.makeProduct()
- view = create_view(product, '+branches', layer=CodeLayer)
+ view = create_view(product, '+branches')
self.assertEqual(False, view.can_configure_branches())
def test_can_configure_branches_product_with_edit_permission(self):
product = self.factory.makeProduct()
login_person(product.owner)
- view = create_view(product, '+branches', layer=CodeLayer)
+ view = create_view(product, '+branches')
self.assertTrue(view.can_configure_branches())
=== modified file 'lib/lp/translations/browser/configure.zcml'
--- lib/lp/translations/browser/configure.zcml 2013-11-15 06:12:32 +0000
+++ lib/lp/translations/browser/configure.zcml 2014-02-19 04:03:27 +0000
@@ -15,8 +15,7 @@
parent_utility="lp.services.webapp.interfaces.ILaunchpadRoot"/>
<browser:defaultView
for="lp.translations.interfaces.translations.IRosettaApplication"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:navigation
module="lp.translations.browser.translations"
classes="
@@ -24,8 +23,7 @@
<browser:pages
for="lp.translations.interfaces.translations.IRosettaApplication"
permission="zope.Public"
- class="lp.translations.browser.translations.RosettaApplicationView"
- layer="lp.translations.publisher.TranslationsLayer">
+ class="lp.translations.browser.translations.RosettaApplicationView">
<browser:page
name="+index"
template="../templates/rosetta-index.pt"/>
@@ -43,7 +41,6 @@
for="lp.translations.interfaces.translations.IRosettaApplication"
permission="zope.Public"
class="lp.translations.browser.translations.TranslatableProductsView"
- layer="lp.translations.publisher.TranslationsLayer"
name="+products-with-translations"
template="../templates/rosetta-products.pt"/>
<browser:page
@@ -56,46 +53,39 @@
class="lp.translations.browser.translations.RosettaStatsView"
permission="zope.Public"
name="+barchart"
- template="../templates/rosettastats-barchart.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/rosettastats-barchart.pt"/>
<browser:page
for="*"
name="+translations-macros"
permission="zope.Public"
template="../templates/translations-macros.pt"
- layer="lp.translations.publisher.TranslationsLayer"
class="lp.app.browser.launchpad.Macro"/>
<browser:page
for="lp.translations.interfaces.translationpolicy.ITranslationPolicy"
permission="zope.Public"
name="+portlet-translation-groups-and-permission"
- template="../templates/hastranslationgroup-portlet-translation-groups-and-permission.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/hastranslationgroup-portlet-translation-groups-and-permission.pt"/>
<browser:defaultView
for="lp.translations.interfaces.translator.ITranslator"
- name="+admin"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+admin"/>
<browser:page
name="+admin"
for="lp.translations.interfaces.translator.ITranslator"
permission="launchpad.Admin"
class="lp.translations.browser.translator.TranslatorAdminView"
- template="../../app/templates/generic-edit.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+edit"
for="lp.translations.interfaces.translator.IEditTranslator"
permission="launchpad.Edit"
class="lp.translations.browser.translator.TranslatorEditView"
- template="../../app/templates/generic-edit.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+remove"
for="lp.translations.interfaces.translator.ITranslator"
permission="launchpad.Edit"
class="lp.translations.browser.translator.TranslatorRemoveView"
- template="../../app/templates/generic-edit.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/generic-edit.pt"/>
<browser:navigation
module="lp.translations.browser.translationimportqueue"
classes="
@@ -103,8 +93,7 @@
TranslationImportQueueNavigation"/>
<browser:defaultView
for="lp.translations.interfaces.translationimportqueue.ITranslationImportQueueEntry"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:url
for="lp.translations.interfaces.translationimportqueue.ITranslationImportQueueEntry"
path_expression="string:${id}"
@@ -114,12 +103,10 @@
for="lp.translations.interfaces.translationimportqueue.ITranslationImportQueueEntry"
class="lp.translations.browser.translationimportqueue.TranslationImportQueueEntryView"
permission="launchpad.Admin"
- template="../templates/translationimportqueueentry-index.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/translationimportqueueentry-index.pt"/>
<browser:page
for="lp.translations.interfaces.translationimportqueue.ITranslationImportQueueEntry"
permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer"
name="+portlet-details"
class="lp.translations.browser.translationimportqueue.TranslationImportQueueEntryView"
template="../templates/translationimportqueueentry-portlet-details.pt"/>
@@ -129,15 +116,13 @@
parent_utility="lp.services.webapp.interfaces.ILaunchpadRoot"/>
<browser:defaultView
for="lp.translations.interfaces.translationimportqueue.ITranslationImportQueue"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:page
for="lp.translations.interfaces.translationimportqueue.ITranslationImportQueue"
name="+index"
class="lp.translations.browser.translationimportqueue.TranslationImportQueueView"
permission="zope.Public"
- template="../templates/translationimportqueue-index.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/translationimportqueue-index.pt"/>
<browser:url
for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"
path_expression="string:+lang/${language/code}"
@@ -148,12 +133,10 @@
classes="DistroSeriesLanguageNavigation"/>
<browser:defaultView
for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:pages
for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"
- permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer">
+ permission="zope.Public">
<browser:page
name="+rosetta-status-legend"
template="../templates/rosetta-status-legend.pt"/>
@@ -163,8 +146,7 @@
permission="zope.Public"
for="lp.translations.interfaces.distroserieslanguage.IDistroSeriesLanguage"
template="../templates/serieslanguage-index.pt"
- class="lp.translations.browser.serieslanguage.DistroSeriesLanguageView"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ class="lp.translations.browser.serieslanguage.DistroSeriesLanguageView"/>
<browser:navigation
module="lp.translations.browser.pofile"
classes="
@@ -181,20 +163,17 @@
POFileNavigationMenu"/>
<browser:defaultView
for="lp.translations.interfaces.pofile.IPOFile"
- name="+translate"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+translate"/>
<browser:page
for="lp.translations.interfaces.pofile.IPOFile"
name="+details"
permission="zope.Public"
class="lp.translations.browser.pofile.POFileDetailsView"
- layer="lp.translations.publisher.TranslationsLayer"
template="../templates/pofile-details.pt"/>
<browser:pages
for="lp.translations.interfaces.pofile.IPOFile"
permission="zope.Public"
- class="lp.translations.browser.pofile.POFileView"
- layer="lp.translations.publisher.TranslationsLayer">
+ class="lp.translations.browser.pofile.POFileView">
<!-- POFile Portlets -->
<browser:page
name="+contributors"
@@ -214,34 +193,25 @@
permission="launchpad.Edit"
class="lp.translations.browser.pofile.POFileUploadView"
for="lp.translations.interfaces.pofile.IPOFile"
- template="../templates/pofile-upload.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
- <browser:page
- name="+translate"
- for="lp.translations.interfaces.pofile.IPOFile"
- class="lp.translations.browser.translations.TranslateRedirectView"
- permission="zope.Public"/>
+ template="../templates/pofile-upload.pt"/>
<browser:page
name="+translate"
for="lp.translations.interfaces.pofile.IPOFile"
permission="zope.Public"
template="../templates/pofile-translate.pt"
- class="lp.translations.browser.pofile.POFileTranslateView"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ class="lp.translations.browser.pofile.POFileTranslateView"/>
<browser:page
name="+export"
for="lp.translations.interfaces.pofile.IPOFile"
permission="launchpad.AnyPerson"
template="../templates/pofile-export.pt"
- class="lp.translations.browser.pofile.POExportView"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ class="lp.translations.browser.pofile.POExportView"/>
<browser:page
name="+filter"
for="lp.translations.interfaces.pofile.IPOFile"
permission="zope.Public"
template="../templates/pofile-filter.pt"
- class="lp.translations.browser.pofile.POFileFilteredView"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ class="lp.translations.browser.pofile.POFileFilteredView"/>
<browser:url
for="lp.translations.interfaces.productserieslanguage.IProductSeriesLanguage"
path_expression="string:+lang/${language/code}"
@@ -256,8 +226,7 @@
name="+index"/>
<browser:pages
for="lp.translations.interfaces.productserieslanguage.IProductSeriesLanguage"
- permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer">
+ permission="zope.Public">
<browser:page
name="+rosetta-status-legend"
template="../templates/rosetta-status-legend.pt"/>
@@ -267,16 +236,14 @@
permission="zope.Public"
for="lp.translations.interfaces.productserieslanguage.IProductSeriesLanguage"
template="../templates/serieslanguage-index.pt"
- class="lp.translations.browser.serieslanguage.ProductSeriesLanguageView"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ class="lp.translations.browser.serieslanguage.ProductSeriesLanguageView"/>
<browser:navigation
module="lp.translations.browser.language"
classes="
LanguageSetNavigation"/>
<browser:defaultView
for="lp.services.worlddata.interfaces.language.ILanguage"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:menus
module="lp.translations.browser.language"
classes="
@@ -292,20 +259,17 @@
class="lp.translations.browser.language.LanguageView"
permission="zope.Public"
template="../templates/language-index.pt"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:page
for="lp.services.worlddata.interfaces.language.ILanguage"
class="lp.translations.browser.language.LanguageAdminView"
permission="launchpad.Admin"
template="../../app/templates/generic-edit.pt"
- name="+admin"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+admin"/>
<browser:pages
for="lp.services.worlddata.interfaces.language.ILanguage"
class="lp.translations.browser.language.LanguageView"
- permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer">
+ permission="zope.Public">
<browser:page
name="+portlet-details"
template="../templates/language-portlet-details.pt"/>
@@ -315,8 +279,7 @@
</browser:pages>
<browser:defaultView
for="lp.services.worlddata.interfaces.language.ILanguageSet"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:url
for="lp.services.worlddata.interfaces.language.ILanguageSet"
path_expression="string:+languages"
@@ -327,15 +290,13 @@
class="lp.translations.browser.language.LanguageSetView"
permission="zope.Public"
template="../templates/languageset-index.pt"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:page
for="lp.services.worlddata.interfaces.language.ILanguageSet"
class="lp.translations.browser.language.LanguageAddView"
permission="launchpad.Admin"
template="../../app/templates/generic-edit.pt"
- name="+add"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+add"/>
<browser:navigation
module="lp.translations.browser.potemplate"
classes="
@@ -344,20 +305,17 @@
POTemplateSetNavigation"/>
<browser:defaultView
for="lp.translations.interfaces.potemplate.IPOTemplate"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:page
name="+preferred-chart"
for="lp.translations.interfaces.potemplate.IPOTemplate"
class="lp.translations.browser.potemplate.POTemplateViewPreferred"
permission="zope.Public"
- template="../templates/potemplate-chart.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/potemplate-chart.pt"/>
<browser:pages
for="lp.translations.interfaces.potemplate.IPOTemplate"
class="lp.translations.browser.potemplate.POTemplateView"
- permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer">
+ permission="zope.Public">
<browser:page
name="+index"
template="../templates/potemplate-index.pt"/>
@@ -379,29 +337,25 @@
for="lp.translations.interfaces.potemplate.IPOTemplate"
permission="launchpad.TranslationsAdmin"
template="../templates/potemplate-upload.pt"
- class="lp.translations.browser.potemplate.POTemplateUploadView"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ class="lp.translations.browser.potemplate.POTemplateUploadView"/>
<browser:page
name="+edit"
for="lp.translations.interfaces.potemplate.IPOTemplate"
class="lp.translations.browser.potemplate.POTemplateEditView"
permission="launchpad.TranslationsAdmin"
- template="../../app/templates/generic-edit.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+admin"
for="lp.translations.interfaces.potemplate.IPOTemplate"
class="lp.translations.browser.potemplate.POTemplateAdminView"
permission="launchpad.Admin"
- template="../../app/templates/generic-edit.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+export"
for="lp.translations.interfaces.potemplate.IPOTemplate"
permission="launchpad.AnyPerson"
template="../templates/potemplate-export.pt"
- class="lp.translations.browser.potemplate.POTemplateExportView"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ class="lp.translations.browser.potemplate.POTemplateExportView"/>
<browser:menus
module="lp.translations.browser.potemplate"
classes="
@@ -415,15 +369,13 @@
urldata="lp.translations.browser.potemplate.POTemplateURL"/>
<browser:defaultView
for="lp.translations.interfaces.potemplate.IPOTemplateSubset"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:page
name="+index"
for="lp.translations.interfaces.potemplate.IPOTemplateSubset"
permission="zope.Public"
class="lp.translations.browser.potemplate.POTemplateSubsetView"
- attribute="__call__"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ attribute="__call__"/>
<browser:navigation
module="lp.translations.browser.translationgroup"
classes="
@@ -431,8 +383,7 @@
TranslationGroupSetNavigation"/>
<browser:defaultView
for="lp.translations.interfaces.translationgroup.ITranslationGroup"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:url
for="lp.translations.interfaces.translationgroup.ITranslationGroup"
path_expression="name"
@@ -441,8 +392,7 @@
<browser:pages
for="lp.translations.interfaces.translationgroup.ITranslationGroup"
class="lp.translations.browser.translationgroup.TranslationGroupView"
- permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer">
+ permission="zope.Public">
<browser:page
template="../templates/translationgroup-index.pt"
name="+index"/>
@@ -458,28 +408,24 @@
for="lp.translations.interfaces.translationgroup.ITranslationGroup"
permission="launchpad.Edit"
class="lp.translations.browser.translationgroup.TranslationGroupEditView"
- template="../../app/templates/generic-edit.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+appoint"
for="lp.translations.interfaces.translationgroup.ITranslationGroup"
permission="launchpad.Edit"
class="lp.translations.browser.translationgroup.TranslationGroupAddTranslatorView"
- template="../../app/templates/generic-edit.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/generic-edit.pt"/>
<browser:page
name="+reassign"
for="lp.translations.interfaces.translationgroup.ITranslationGroup"
permission="launchpad.Edit"
class="lp.translations.browser.translationgroup.TranslationGroupReassignmentView"
- template="../templates/translationgroup-reassignment.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/translationgroup-reassignment.pt"/>
<browser:page
for="lp.translations.interfaces.translationgroup.ITranslationGroup"
permission="launchpad.Edit"
name="+object-reassignment"
- template="../../app/templates/object-reassignment.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/object-reassignment.pt"/>
<browser:url
for="lp.translations.interfaces.translationgroup.ITranslationGroupSet"
path_expression="string:+groups"
@@ -487,22 +433,19 @@
rootsite="translations" />
<browser:defaultView
for="lp.translations.interfaces.translationgroup.ITranslationGroupSet"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:page
name="+new"
for="lp.translations.interfaces.translationgroup.ITranslationGroupSet"
class="lp.translations.browser.translationgroup.TranslationGroupAddView"
permission="launchpad.Admin"
- template="../../app/templates/generic-edit.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/generic-edit.pt"/>
<browser:page
for="lp.translations.interfaces.translationgroup.ITranslationGroupSet"
class="lp.translations.browser.translationgroup.TranslationGroupSetView"
permission="zope.Public"
template="../templates/translationgroups-index.pt"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:url
for="lp.translations.interfaces.translationmessage.ITranslationMessage"
path_expression="string:${sequence}"
@@ -515,32 +458,23 @@
CurrentTranslationMessageAppMenus"/>
<browser:defaultView
for="lp.translations.interfaces.translationmessage.ITranslationMessage"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:page
for="lp.translations.interfaces.translationmessage.ITranslationMessage"
class="lp.translations.browser.translationmessage.CurrentTranslationMessageIndexView"
permission="zope.Public"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
- <browser:page
- name="+translate"
- for="lp.translations.interfaces.translationmessage.ITranslationMessage"
- class="lp.translations.browser.translations.TranslateRedirectView"
- permission="zope.Public"/>
+ name="+index"/>
<browser:page
name="+translate"
for="lp.translations.interfaces.translationmessage.ITranslationMessage"
permission="zope.Public"
template="../templates/translationmessage-translate.pt"
- class="lp.translations.browser.translationmessage.CurrentTranslationMessagePageView"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ class="lp.translations.browser.translationmessage.CurrentTranslationMessagePageView"/>
<browser:page
name="+display"
for="lp.translations.interfaces.translationmessage.ITranslationMessageSuggestions"
permission="launchpad.AnyPerson"
- template="../templates/translationmessage-suggestions.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/translationmessage-suggestions.pt"/>
<!-- SourcePackage translation pages -->
@@ -557,22 +491,15 @@
name="+imports"
class="lp.translations.browser.hastranslationimports.HasTranslationImportsView"
permission="zope.Public"
- template="../templates/hastranslationimports-index.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/hastranslationimports-index.pt"/>
<browser:page
for="lp.registry.interfaces.sourcepackage.ISourcePackage"
name="+export"
- layer="lp.translations.publisher.TranslationsLayer"
permission="launchpad.ExpensiveRequest"
template="../templates/translations-export.pt"
class="
lp.translations.browser.sourcepackage.SourcePackageTranslationsExportView"/>
<browser:page
- name="+translations"
- for="lp.registry.interfaces.sourcepackage.ISourcePackage"
- class="lp.translations.browser.translations.TranslationsRedirectView"
- permission="zope.Public"/>
- <browser:page
name="+translate"
for="lp.registry.interfaces.sourcepackage.ISourcePackage"
class="lp.translations.browser.translations.TranslationsRedirectView"
@@ -582,13 +509,11 @@
name="+sharing-details"
class="lp.translations.browser.sourcepackage.SourcePackageTranslationSharingDetailsView"
permission="zope.Public"
- template="../templates/sourcepackage-sharing-details.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/sourcepackage-sharing-details.pt"/>
<browser:pages
for="lp.registry.interfaces.sourcepackage.ISourcePackage"
permission="zope.Public"
- class="lp.translations.browser.sourcepackage.SourcePackageTranslationsView"
- layer="lp.translations.publisher.TranslationsLayer">
+ class="lp.translations.browser.sourcepackage.SourcePackageTranslationsView">
<browser:page
name="+potlist"
template="../templates/object-pots.pt"/>
@@ -606,16 +531,10 @@
<browser:menus
classes="ProductSeriesTranslationsMenu"
module="lp.translations.browser.productseries"/>
- <browser:page
- name="+translations"
- for="lp.registry.interfaces.productseries.IProductSeries"
- class="lp.translations.browser.translations.TranslationsRedirectView"
- permission="zope.Public"/>
<browser:pages
for="lp.registry.interfaces.productseries.IProductSeries"
class="lp.translations.browser.productseries.ProductSeriesView"
- permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer" >
+ permission="zope.Public">
<browser:page
name="+translations"
template="../templates/productseries-translations.pt"
@@ -637,8 +556,7 @@
<browser:pages
for="lp.registry.interfaces.productseries.IProductSeries"
class="lp.translations.browser.productseries.ProductSeriesUploadView"
- permission="launchpad.Edit"
- layer="lp.translations.publisher.TranslationsLayer">
+ permission="launchpad.Edit">
<browser:page
name="+translations-upload"
template="../templates/productseries-translations-upload.pt"/>
@@ -648,39 +566,33 @@
name="+imports"
class="lp.translations.browser.hastranslationimports.HasTranslationImportsView"
permission="zope.Public"
- template="../templates/hastranslationimports-index.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/hastranslationimports-index.pt"/>
<browser:page
for="lp.registry.interfaces.productseries.IProductSeries"
name="+translations-settings"
class="lp.translations.browser.productseries.ProductSeriesTranslationsSettingsView"
permission="launchpad.Edit"
- template="../templates/productseries-translations-settings.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/productseries-translations-settings.pt"/>
<browser:page
for="lp.registry.interfaces.productseries.IProductSeries"
name="+templates"
class="lp.translations.browser.productseries.ProductSeriesTemplatesView"
permission="zope.Public"
- template="../templates/object-templates.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/object-templates.pt"/>
<browser:page
for="lp.registry.interfaces.productseries.IProductSeries"
name="+request-bzr-import"
class="lp.translations.browser.productseries.ProductSeriesTranslationsBzrImportView"
permission="launchpad.Edit"
- template="../templates/productseries-translations-bzr-import.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/productseries-translations-bzr-import.pt"/>
<browser:page
name="+export"
- layer="lp.translations.publisher.TranslationsLayer"
for="lp.registry.interfaces.productseries.IProductSeries"
permission="launchpad.AnyPerson"
template="../templates/translations-export.pt"
class="lp.translations.browser.productseries.ProductSeriesTranslationsExportView"/>
<browser:page
name="+link-translations-branch"
- layer="lp.translations.publisher.TranslationsLayer"
for="lp.registry.interfaces.productseries.IProductSeries"
permission="launchpad.Edit"
template="../../app/templates/generic-edit.pt"
@@ -697,32 +609,24 @@
classes="
PersonTranslationsMenu"/>
<browser:page
- name="+translations"
- for="lp.registry.interfaces.person.IPerson"
- class="lp.translations.browser.translations.TranslationsRedirectView"
- permission="zope.Public"/>
- <browser:page
for="lp.registry.interfaces.person.IPerson"
name="+translations"
class="lp.translations.browser.person.PersonTranslationView"
permission="zope.Public"
- template="../templates/person-translations.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/person-translations.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
name="+licensing"
class="
lp.translations.browser.person.PersonTranslationRelicensingView"
permission="launchpad.Edit"
- template="../templates/person-translations-relicensing.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/person-translations-relicensing.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
name="+imports"
class="lp.translations.browser.hastranslationimports.HasTranslationImportsView"
permission="zope.Public"
- template="../templates/hastranslationimports-index.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/hastranslationimports-index.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
class="lp.translations.browser.person.PersonTranslationView"
@@ -734,15 +638,13 @@
name="+activity"
class="lp.translations.browser.person.TranslationActivityView"
permission="zope.Public"
- template="../templates/person-translation-activity.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/person-translation-activity.pt"/>
<browser:page
for="lp.registry.interfaces.person.IPerson"
name="+translations-to-review"
class="lp.translations.browser.person.PersonTranslationReviewView"
permission="zope.Public"
- template="../templates/person-translations-to-review.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/person-translations-to-review.pt"/>
<!-- Product views -->
@@ -756,17 +658,11 @@
ProductTranslationsMenu"
module="lp.translations.browser.product"/>
<browser:page
- name="+translations"
- for="lp.registry.interfaces.product.IProduct"
- class="lp.translations.browser.translations.TranslationsRedirectView"
- permission="zope.Public"/>
- <browser:page
for="lp.registry.interfaces.product.IProduct"
name="+imports"
class="lp.translations.browser.hastranslationimports.HasTranslationImportsView"
permission="zope.Public"
- template="../templates/hastranslationimports-index.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/hastranslationimports-index.pt"/>
<browser:page
name="+configure-translations"
for="lp.registry.interfaces.product.IProduct"
@@ -776,8 +672,7 @@
<browser:pages
for="lp.registry.interfaces.product.IProduct"
permission="zope.Public"
- class="lp.translations.browser.product.ProductView"
- layer="lp.translations.publisher.TranslationsLayer">
+ class="lp.translations.browser.product.ProductView">
<browser:page
name="+translations"
template="../templates/product-translations.pt"/>
@@ -809,24 +704,17 @@
ProjectTranslationsMenu"
module="lp.translations.browser.project"/>
<browser:page
- name="+translations"
- for="lp.registry.interfaces.projectgroup.IProjectGroup"
- class="lp.translations.browser.translations.TranslationsRedirectView"
- permission="zope.Public"/>
- <browser:page
for="lp.registry.interfaces.projectgroup.IProjectGroup"
permission="zope.Public"
name="+translations"
class="lp.translations.browser.project.ProjectView"
- template="../templates/project-translations.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/project-translations.pt"/>
<browser:page
name="+settings"
for="lp.registry.interfaces.projectgroup.IProjectGroup"
class="lp.translations.browser.project.ProjectSettingsView"
permission="launchpad.TranslationsAdmin"
- template="../templates/configure-translations.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/configure-translations.pt"/>
<!-- Distribution -->
@@ -839,63 +727,50 @@
DistributionTranslationsMenu"
module="lp.translations.browser.distribution"/>
<browser:page
- name="+translations"
- for="lp.registry.interfaces.distribution.IDistribution"
- class="lp.translations.browser.translations.TranslationsRedirectView"
- permission="zope.Public"/>
- <browser:page
for="lp.registry.interfaces.distribution.IDistribution"
class="lp.translations.browser.distribution.DistributionView"
permission="zope.Public"
name="+translations"
- template="../templates/distribution-translations.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/distribution-translations.pt"/>
<browser:page
name="+configure-translations"
for="lp.registry.interfaces.distribution.IDistribution"
class="lp.translations.browser.distribution.DistributionSettingsView"
permission="launchpad.TranslationsAdmin"
- template="../templates/configure-translations.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/configure-translations.pt"/>
<browser:page
for="lp.registry.interfaces.distribution.IDistribution"
name="+imports"
class="lp.translations.browser.hastranslationimports.HasTranslationImportsView"
permission="zope.Public"
- template="../templates/hastranslationimports-index.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/hastranslationimports-index.pt"/>
<browser:page
for="lp.registry.interfaces.distribution.IDistribution"
name="+select-language-pack-admin"
class="lp.translations.browser.distribution.DistributionLanguagePackAdminView"
permission="launchpad.TranslationsAdmin"
- template="../../app/templates/generic-edit.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../../app/templates/generic-edit.pt"/>
<!-- Language pack admin portlet -->
<browser:page
name="+language-pack-admin-info"
for="lp.registry.interfaces.distribution.IDistribution"
permission="launchpad.View"
- template="../templates/distribution-language-pack-admin-info.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/distribution-language-pack-admin-info.pt"/>
<browser:page
name="+portlet-not-using-launchpad"
for="lp.registry.interfaces.distribution.IDistribution"
permission="zope.Public"
- template="../templates/translations-portlet-not-using-launchpad.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/translations-portlet-not-using-launchpad.pt"/>
<browser:page
name="+portlet-not-using-launchpad-extra"
for="lp.registry.interfaces.distribution.IDistribution"
permission="zope.Public"
- template="../templates/translations-portlet-not-using-launchpad-extra.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/translations-portlet-not-using-launchpad-extra.pt"/>
<browser:page
name="+portlet-configuration"
for="lp.registry.interfaces.distribution.IDistribution"
permission="zope.Public"
- template="../templates/translations-portlet-configuration.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/translations-portlet-configuration.pt"/>
<!-- DistroSeries -->
<browser:defaultView
@@ -907,16 +782,10 @@
DistroSeriesTranslationsMenu"
module="lp.translations.browser.distroseries"/>
- <browser:page
- name="+translations"
- for="lp.registry.interfaces.distroseries.IDistroSeries"
- class="lp.translations.browser.translations.TranslationsRedirectView"
- permission="zope.Public"/>
<browser:pages
for="lp.registry.interfaces.distroseries.IDistroSeries"
class="lp.translations.browser.distroseries.DistroSeriesView"
- permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer">
+ permission="zope.Public">
<browser:page
name="+translations"
template="../templates/distroseries-translations.pt"/>
@@ -937,7 +806,6 @@
for="lp.registry.interfaces.distroseries.IDistroSeries"
class="lp.translations.browser.distroseries.DistroSeriesTemplatesView"
permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer"
name="+templates"
template="../templates/object-templates.pt" />
<browser:page
@@ -952,13 +820,11 @@
name="+imports"
class="lp.translations.browser.hastranslationimports.HasTranslationImportsView"
permission="zope.Public"
- template="../templates/hastranslationimports-index.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/hastranslationimports-index.pt"/>
<browser:page
for="lp.registry.interfaces.distroseries.IDistroSeries"
class="lp.translations.browser.distroseries.DistroSeriesLanguagePackView"
permission="zope.Public"
- layer="lp.translations.publisher.TranslationsLayer"
name="+language-packs"
template="../templates/distroseries-language-packs.pt"/>
@@ -967,8 +833,7 @@
<browser:defaultView
for="lp.translations.interfaces.customlanguagecode.ICustomLanguageCode"
- name="+index"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ name="+index"/>
<browser:url
for="lp.translations.interfaces.customlanguagecode.ICustomLanguageCode"
path_expression="string:+customcode/${language_code}"
@@ -979,30 +844,26 @@
for="lp.translations.interfaces.customlanguagecode.ICustomLanguageCode"
permission="zope.Public"
class="lp.translations.browser.customlanguagecode.CustomLanguageCodeView"
- template="../templates/customlanguagecode-index.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/customlanguagecode-index.pt"/>
<browser:page
name="+remove"
for="lp.translations.interfaces.customlanguagecode.ICustomLanguageCode"
permission="launchpad.TranslationsAdmin"
class="lp.translations.browser.customlanguagecode.CustomLanguageCodeRemoveView"
- template="../templates/customlanguagecode-remove.pt"
- layer="lp.translations.publisher.TranslationsLayer"/>
+ template="../templates/customlanguagecode-remove.pt"/>
<!-- IHasCustomLanguageCodes -->
<browser:page
name="+custom-language-codes"
for="lp.translations.interfaces.customlanguagecode.IHasCustomLanguageCodes"
- layer="lp.translations.publisher.TranslationsLayer"
class="lp.translations.browser.customlanguagecode.CustomLanguageCodesIndexView"
template="../templates/customlanguagecodes-index.pt"
permission="zope.Public"/>
<browser:page
name="+add-custom-language-code"
for="lp.translations.interfaces.customlanguagecode.IHasCustomLanguageCodes"
- layer="lp.translations.publisher.TranslationsLayer"
class="lp.translations.browser.customlanguagecode.CustomLanguageCodeAddView"
template="../templates/customlanguagecode-add.pt"
permission="launchpad.TranslationsAdmin"/>
=== modified file 'lib/lp/translations/browser/tests/language-views.txt'
--- lib/lp/translations/browser/tests/language-views.txt 2012-04-10 14:01:17 +0000
+++ lib/lp/translations/browser/tests/language-views.txt 2014-02-19 04:03:27 +0000
@@ -6,12 +6,10 @@
>>> from zope.component import getUtility
>>> from lp.services.worlddata.interfaces.language import ILanguageSet
- >>> from lp.translations.publisher import TranslationsLayer
>>> language_set = getUtility(ILanguageSet)
>>> portuguese = language_set.getLanguageByCode('pt_BR')
- >>> language_admin_view = create_view(
- ... portuguese, '+admin', layer=TranslationsLayer)
+ >>> language_admin_view = create_view(portuguese, '+admin')
>>> language_admin_view.initialize()
The language +admin view provides a label and a page_title for the page.
@@ -50,8 +48,7 @@
Add Language
------------
- >>> language_add_view = create_view(language_set, '+add',
- ... layer=TranslationsLayer)
+ >>> language_add_view = create_view(language_set, '+add')
>>> print language_add_view.label
Register a language in Launchpad
@@ -81,8 +78,7 @@
... }
>>> language_add_view = create_initialized_view(
- ... language_set, '+add', form=form,
- ... layer=TranslationsLayer)
+ ... language_set, '+add', form=form)
>>> language_add_view.errors
[]
@@ -105,8 +101,7 @@
>>> translators_method = Language.translators
>>> del Language.translators
>>> serbian = language_set.getLanguageByCode('sr')
- >>> language_view = create_initialized_view(serbian, '+index',
- ... layer=TranslationsLayer)
+ >>> language_view = create_initialized_view(serbian, '+index')
The 'friendly_plural_forms' function shows us a list of plural forms and
a set of examples for each one, so one won't need to understand the plural
@@ -168,8 +163,7 @@
according to their karma value.
>>> serbian.translators = translators
- >>> language_view = create_initialized_view(serbian, '+index',
- ... layer=TranslationsLayer)
+ >>> language_view = create_initialized_view(serbian, '+index')
>>> top_contributors = language_view.top_contributors
>>> translator_main in top_contributors
True
@@ -191,8 +185,7 @@
------------------
>>> login('carlos@xxxxxxxxxxxxx')
- >>> languageset_view = create_initialized_view(language_set, '+index',
- ... layer=TranslationsLayer)
+ >>> languageset_view = create_initialized_view(language_set, '+index')
The user_languages property contains a list of the current user's preferred
languages formated as links.
@@ -208,8 +201,7 @@
>>> print person.languages
[]
>>> ignored = login_person(person)
- >>> languageset_view = create_initialized_view(language_set, '+index',
- ... layer=TranslationsLayer)
+ >>> languageset_view = create_initialized_view(language_set, '+index')
>>> print languageset_view.user_languages
<a href=".../en" ...>English</a>
=== modified file 'lib/lp/translations/browser/tests/pofile-views.txt'
--- lib/lp/translations/browser/tests/pofile-views.txt 2011-12-30 06:14:56 +0000
+++ lib/lp/translations/browser/tests/pofile-views.txt 2014-02-19 04:03:27 +0000
@@ -14,7 +14,6 @@
... ITranslationImportQueue)
>>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from lp.translations.interfaces.potemplate import IPOTemplateSet
- >>> from lp.translations.publisher import TranslationsLayer
>>> from lp.registry.interfaces.sourcepackagename import (
... ISourcePackageNameSet)
>>> from lp.services.worlddata.interfaces.language import ILanguageSet
@@ -36,8 +35,7 @@
>>> potemplate = potemplatesubset['evolution-2.2']
>>> pofile_es = potemplate.getPOFileByLang('es')
>>> form = {'show': 'all' }
- >>> pofile_view = create_view(
- ... pofile_es, '+translate', form=form, layer=TranslationsLayer)
+ >>> pofile_view = create_view(pofile_es, '+translate', form=form)
>>> pofile_view.initialize()
An IPOFile knows (or sometimes has to guess) its number of pluralforms. In
@@ -62,8 +60,7 @@
>>> language_tlh = getUtility(ILanguageSet).getLanguageByCode('tlh')
>>> pofile_tlh = potemplate.getDummyPOFile(language_tlh)
>>> form = {'show': 'all' }
- >>> pofile_view = create_view(
- ... pofile_tlh, '+translate', form=form, layer=TranslationsLayer)
+ >>> pofile_view = create_view(pofile_tlh, '+translate', form=form)
>>> pofile_view.initialize()
Here we can see that it's lacking that information.
@@ -79,8 +76,7 @@
Check the argument to filter messagesets.
>>> form = {'show': 'translated'}
- >>> pofile_view = create_view(
- ... pofile_es, '+translate', form=form, layer=TranslationsLayer)
+ >>> pofile_view = create_view(pofile_es, '+translate', form=form)
>>> pofile_view.initialize()
Yeah, it detects it correctly and stores the attribute as it should be.
@@ -93,15 +89,13 @@
We get a request without any argument.
>>> form = {'show': 'all' }
- >>> pofile_view = create_view(
- ... pofile_es, '+translate', form=form, layer=TranslationsLayer)
+ >>> pofile_view = create_view(pofile_es, '+translate', form=form)
>>> pofile_view.initialize()
It's time to test that we get the right message sets from the submitted form.
>>> form = {'show': 'all' }
- >>> pofile_view = create_view(
- ... pofile_es, '+translate', form=form, layer=TranslationsLayer)
+ >>> pofile_view = create_view(pofile_es, '+translate', form=form)
>>> pofile_view.initialize()
We get the first entry that should be in the form, the one with id == 130.
@@ -197,8 +191,7 @@
... 'msgset_138_es_translation_0_new',
... 'msgset_138_es_translation_0_new': 'Bar',
... 'submit_translations': 'Save & Continue'}
- >>> pofile_view = create_view(
- ... pofile_es, '+translate', form=form, layer=TranslationsLayer)
+ >>> pofile_view = create_view(pofile_es, '+translate', form=form)
>>> pofile_view.request.method = 'POST'
>>> pofile_view.initialize()
@@ -272,8 +265,7 @@
... 'msgset_161_es_translation_0_new',
... 'msgset_161_es_translation_0_new': 'Foo',
... 'submit_translations': 'Save & Continue'}
- >>> pofile_view = create_view(
- ... pofile_es, '+translate', form=form, layer=TranslationsLayer)
+ >>> pofile_view = create_view(pofile_es, '+translate', form=form)
>>> pofile_view.request.method = 'POST'
>>> pofile_view.initialize()
>>> flush_database_caches()
@@ -359,8 +351,7 @@
# ... 'start': '10',
# ... 'field.alternative_language': 'fr',
# ... 'select_alternate_language': 'Change'}
-# >>> pofile_view = create_view(
-# ... pofile_es, '+translate', form=form, layer=TranslationsLayer)
+# >>> pofile_view = create_view(pofile_es, '+translate', form=form)
# >>> pofile_view.initialize()
# >>> pofile_view.second_lang_code
# 'fr'
@@ -395,8 +386,7 @@
... 'file': FileUpload(FileUploadArgument()),
... 'upload_type': 'upstream',
... 'pofile_upload': 'Upload'}
- >>> pofile_view = create_view(
- ... pofile_es, '+upload', form=form, layer=TranslationsLayer)
+ >>> pofile_view = create_view(pofile_es, '+upload', form=form)
>>> pofile_view.request.method = 'POST'
>>> pofile_view.initialize()
@@ -498,8 +488,7 @@
# Request the download.
>>> form = {'format': 'PO' }
- >>> pofile_view = create_view(
- ... pofile_es, '+export', form=form, layer=TranslationsLayer)
+ >>> pofile_view = create_view(pofile_es, '+export', form=form)
>>> pofile_view.request.method = 'POST'
>>> pofile_view.initialize()
=== modified file 'lib/lp/translations/browser/tests/potemplate-views.txt'
--- lib/lp/translations/browser/tests/potemplate-views.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/translations/browser/tests/potemplate-views.txt 2014-02-19 04:03:27 +0000
@@ -13,7 +13,6 @@
>>> from lp.translations.interfaces.potemplate import IPOTemplateSet
>>> from lp.registry.interfaces.sourcepackagename import (
... ISourcePackageNameSet)
- >>> from lp.translations.publisher import TranslationsLayer
All the tests will be submitted as comming from the No Privilege person.
@@ -53,8 +52,7 @@
>>> form = {
... 'file': FileUpload(FileUploadArgument()),
... 'UPLOAD': 'Upload'}
- >>> potemplate_view = create_view(
- ... potemplate, '+upload', form=form, layer=TranslationsLayer)
+ >>> potemplate_view = create_view(potemplate, '+upload', form=form)
>>> potemplate_view.request.method = 'POST'
>>> potemplate_view.initialize()
@@ -83,8 +81,7 @@
>>> form = {
... 'file': FileUpload(FileUploadArgument()),
... 'UPLOAD': 'Upload'}
- >>> potemplate_view = create_view(
- ... potemplate, '+upload', form=form, layer=TranslationsLayer)
+ >>> potemplate_view = create_view(potemplate, '+upload', form=form)
>>> potemplate_view.request.method = 'POST'
>>> potemplate_view.initialize()
=== modified file 'lib/lp/translations/browser/tests/test_product_view.py'
--- lib/lp/translations/browser/tests/test_product_view.py 2012-12-26 01:04:05 +0000
+++ lib/lp/translations/browser/tests/test_product_view.py 2014-02-19 04:03:27 +0000
@@ -33,7 +33,6 @@
create_view,
)
from lp.translations.browser.product import ProductView
-from lp.translations.publisher import TranslationsLayer
class TestProduct(TestCaseWithFactory):
@@ -115,20 +114,19 @@
def test_cannot_configure_translations_product_no_edit_permission(self):
product = self.factory.makeProduct()
- view = create_view(product, '+translations', layer=TranslationsLayer)
+ view = create_view(product, '+translations')
self.assertEqual(False, view.can_configure_translations())
def test_can_configure_translations_product_with_edit_permission(self):
product = self.factory.makeProduct()
login_person(product.owner)
- view = create_view(product, '+translations', layer=TranslationsLayer)
+ view = create_view(product, '+translations')
self.assertEqual(True, view.can_configure_translations())
def test_rosetta_expert_can_configure_translations(self):
product = self.factory.makeProduct()
with celebrity_logged_in('rosetta_experts'):
- view = create_view(product, '+translations',
- layer=TranslationsLayer)
+ view = create_view(product, '+translations')
self.assertEqual(True, view.can_configure_translations())
def test_launchpad_not_listed_for_proprietary(self):
@@ -137,8 +135,7 @@
for info_type in PUBLIC_PROPRIETARY_INFORMATION_TYPES:
product.information_type = info_type
view = create_initialized_view(
- product, '+configure-translations',
- layer=TranslationsLayer)
+ product, '+configure-translations')
if product.private:
self.assertNotIn(
ServiceUsage.LAUNCHPAD,
@@ -159,9 +156,8 @@
@classmethod
def getTranslationsContent(cls, product):
- view = create_initialized_view(product, '+translations',
- layer=TranslationsLayer,
- principal=product.owner)
+ view = create_initialized_view(
+ product, '+translations', principal=product.owner)
return cls.getViewContent(view)
def test_no_sync_links_for_proprietary(self):
=== modified file 'lib/lp/translations/browser/tests/test_translationimportqueueentry.py'
--- lib/lp/translations/browser/tests/test_translationimportqueueentry.py 2012-01-01 02:58:52 +0000
+++ lib/lp/translations/browser/tests/test_translationimportqueueentry.py 2014-02-19 04:03:27 +0000
@@ -6,26 +6,21 @@
from datetime import datetime
from pytz import timezone
-from zope.component import (
- getMultiAdapter,
- getUtility,
- )
+from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
from lp.app.enums import ServiceUsage
-from lp.layers import setFirstLayer
from lp.services.webapp import canonical_url
-from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
TestCase,
TestCaseWithFactory,
)
from lp.testing.layers import LaunchpadFunctionalLayer
+from lp.testing.views import create_initialized_view
from lp.translations.browser.translationimportqueue import escape_js_string
from lp.translations.interfaces.translationimportqueue import (
ITranslationImportQueue,
)
-from lp.translations.publisher import TranslationsLayer
class TestTranslationImportQueueEntryView(TestCaseWithFactory):
@@ -45,14 +40,6 @@
product.translations_usage = ServiceUsage.LAUNCHPAD
return product.getSeries('trunk')
- def _makeView(self, entry):
- """Create view for a queue entry."""
- request = LaunchpadTestRequest()
- setFirstLayer(request, TranslationsLayer)
- view = getMultiAdapter((entry, request), name='+index')
- view.initialize()
- return view
-
def _makeEntry(self, productseries=None, distroseries=None,
sourcepackagename=None, filename=None, potemplate=None):
if filename is None:
@@ -69,7 +56,7 @@
# import_target returns.
series = self._makeProductSeries()
entry = self._makeEntry(productseries=series)
- view = self._makeView(entry)
+ view = create_initialized_view(entry, '+index')
self.assertEqual(series, view.import_target)
@@ -81,7 +68,7 @@
package = self.factory.makeSourcePackage(packagename, series)
entry = self._makeEntry(
distroseries=series, sourcepackagename=packagename)
- view = self._makeView(entry)
+ view = create_initialized_view(entry, '+index')
self.assertEqual(package, view.import_target)
@@ -90,7 +77,7 @@
# to, the series' templates.
series = self._makeProductSeries()
entry = self._makeEntry(productseries=series)
- view = self._makeView(entry)
+ view = create_initialized_view(entry, '+index')
# If there are no templates, there is no link.
self.assertEqual("no templates", view.productseries_templates_link)
@@ -109,7 +96,7 @@
series = self._makeProductSeries()
product = series.product
entry = self._makeEntry(productseries=series)
- view = self._makeView(entry)
+ view = create_initialized_view(entry, '+index')
# No translatable series.
series_text = view.product_translatable_series
@@ -152,7 +139,7 @@
# status change.
series = self._makeProductSeries()
entry = self._makeEntry(productseries=series)
- view = self._makeView(entry)
+ view = create_initialized_view(entry, '+index')
# If the date equals the upload date, there's no need to show
# anything.
@@ -173,7 +160,7 @@
series = self._makeProductSeries()
entry = self._makeEntry(
productseries=series, filename="My_Domain.pot")
- view = self._makeView(entry)
+ view = create_initialized_view(entry, '+index')
self.assertEqual(
"My_Domain", view.initial_values['translation_domain'])
@@ -187,7 +174,7 @@
productseries=series, translation_domain=domain)
entry = self._makeEntry(
productseries=series, potemplate=potemplate)
- view = self._makeView(entry)
+ view = create_initialized_view(entry, '+index')
self.assertEqual(domain, view.initial_values['translation_domain'])
@@ -197,7 +184,7 @@
series = self._makeProductSeries()
entry = self._makeEntry(
productseries=series, filename="My_Domain.pot")
- view = self._makeView(entry)
+ view = create_initialized_view(entry, '+index')
self.assertEqual("my-domain", view.initial_values['name'])
@@ -210,7 +197,7 @@
productseries=series, name=name)
entry = self._makeEntry(
productseries=series, potemplate=potemplate)
- view = self._makeView(entry)
+ view = create_initialized_view(entry, '+index')
self.assertEqual(name, view.initial_values['name'])
=== modified file 'lib/lp/translations/browser/tests/test_translationmessage_view.py'
--- lib/lp/translations/browser/tests/test_translationmessage_view.py 2012-11-26 08:33:03 +0000
+++ lib/lp/translations/browser/tests/test_translationmessage_view.py 2014-02-19 04:03:27 +0000
@@ -38,7 +38,6 @@
from lp.translations.interfaces.side import ITranslationSideTraitsSet
from lp.translations.interfaces.translations import TranslationConstants
from lp.translations.interfaces.translationsperson import ITranslationsPerson
-from lp.translations.publisher import TranslationsLayer
class TestCurrentTranslationMessage_can_dismiss(TestCaseWithFactory):
@@ -266,8 +265,7 @@
url = canonical_url(self.current_translation) + '/+translate'
view = create_view(
- self.current_translation, '+translate', form=form,
- layer=TranslationsLayer, server_url=url)
+ self.current_translation, '+translate', form=form, server_url=url)
view.request.method = 'POST'
view.initialize()
=== modified file 'lib/lp/translations/browser/tests/translationimportqueue-views.txt'
--- lib/lp/translations/browser/tests/translationimportqueue-views.txt 2011-12-24 17:49:30 +0000
+++ lib/lp/translations/browser/tests/translationimportqueue-views.txt 2014-02-19 04:03:27 +0000
@@ -4,14 +4,11 @@
On this section, we are going to test the edit view class for an
ITranslationImportQueueEntry object.
- >>> from zope.component import getUtility, getMultiAdapter
- >>> from lp.layers import setFirstLayer
- >>> from lp.services.webapp.servers import LaunchpadTestRequest
+ >>> from zope.component import getUtility
>>> from lp.translations.interfaces.translationimportqueue import (
... ITranslationImportQueue)
>>> from lp.translations.browser.translationimportqueue import (
... TranslationImportQueueEntryView)
- >>> from lp.translations.publisher import TranslationsLayer
This view is only accessible for administrators.
@@ -49,13 +46,8 @@
The view is named "+index" and it is found on the TranslationsLayer. We want
to get it new for each subsequent test.
- >>> def getTranslationEntryView(entry):
- ... request = LaunchpadTestRequest()
- ... setFirstLayer(request, TranslationsLayer)
- ... view = getMultiAdapter((entry, request), name='+index')
- ... view.initialize()
- ... return view
- >>> view = getTranslationEntryView(pot_entry)
+ >>> from lp.testing.views import create_initialized_view
+ >>> view = create_initialized_view(pot_entry, '+index')
>>> isinstance(view, TranslationImportQueueEntryView)
True
@@ -82,7 +74,7 @@
But declaring a different file type would require different data, so we get
some errors.
- >>> view = getTranslationEntryView(pot_entry)
+ >>> view = create_initialized_view(pot_entry, '+index')
>>> data = {
... 'file_type': TranslationFileType.PO,
... 'path': 'demo.pot',
@@ -94,7 +86,7 @@
Also, the filename must be given and the template name must be a valid name.
- >>> view = getTranslationEntryView(pot_entry)
+ >>> view = create_initialized_view(pot_entry, '+index')
>>> data = {
... 'file_type': TranslationFileType.POT,
... 'path': None,
@@ -111,7 +103,7 @@
>>> from lp.translations.interfaces.potemplate import IPOTemplateSet
>>> potemplate = getUtility(IPOTemplateSet).getPOTemplateByPathAndOrigin(
... 'po/evolution-2.2.pot', productseries)
- >>> view = getTranslationEntryView(pot_entry)
+ >>> view = create_initialized_view(pot_entry, '+index')
>>> data = {
... 'file_type': TranslationFileType.POT,
... 'path': 'demo.po',
@@ -124,7 +116,7 @@
But if it works if you decide that the file in question really is a po file.
- >>> view = getTranslationEntryView(pot_entry)
+ >>> view = create_initialized_view(pot_entry, '+index')
>>> data = {
... 'file_type': TranslationFileType.PO,
... 'path': 'demo.po',
@@ -137,7 +129,7 @@
>>> from lp.translations.interfaces.translationimportqueue import (
... RosettaImportStatus)
- >>> view = getTranslationEntryView(pot_entry)
+ >>> view = create_initialized_view(pot_entry, '+index')
>>> view.context.potemplate == None
True
>>> data = {
@@ -165,7 +157,7 @@
... 'demo.pot', '# foo', True,
... importer, distroseries=ubuntuseries,
... sourcepackagename=packagename)
- >>> ubuntu_view = getTranslationEntryView(ubuntu_entry)
+ >>> ubuntu_view = create_initialized_view(ubuntu_entry, '+index')
The form now has a field for languagepacks. The value of the field defaults
to "True" as no potemplate has been set yet.
@@ -195,7 +187,7 @@
as the default value.
>>> ubuntu_entry.potemplate.languagepack = False
- >>> ubuntu_view = getTranslationEntryView(ubuntu_entry)
+ >>> ubuntu_view = create_initialized_view(ubuntu_entry, '+index')
>>> ubuntu_view.initial_values['languagepack'] == False
True
@@ -206,7 +198,7 @@
... 'demo.pot', '# foo', True,
... importer, distroseries=other_series,
... sourcepackagename=packagename)
- >>> other_view = getTranslationEntryView(other_entry)
+ >>> other_view = create_initialized_view(other_entry, '+index')
>>> 'languagepack' in other_view.field_names
False
=== modified file 'lib/lp/translations/browser/tests/translationmessage-views.txt'
--- lib/lp/translations/browser/tests/translationmessage-views.txt 2012-10-24 15:55:49 +0000
+++ lib/lp/translations/browser/tests/translationmessage-views.txt 2014-02-19 04:03:27 +0000
@@ -10,7 +10,6 @@
... TranslationMessage)
>>> from lp.services.webapp import canonical_url
>>> from lp.services.worlddata.interfaces.language import ILanguageSet
- >>> from lp.translations.publisher import TranslationsLayer
All the tests will be submitted as coming from Kurem, an editor for the
POFile that we are going to edit.
@@ -33,7 +32,7 @@
>>> current_translationmessage = (
... potmsgset.getCurrentTranslationMessageOrDummy(pofile_tlh))
>>> translationmessage_page_view = create_view(
- ... current_translationmessage, "+translate", layer=TranslationsLayer)
+ ... current_translationmessage, "+translate")
>>> translationmessage_page_view.initialize()
Here we can see that it's lacking that information.
@@ -57,8 +56,7 @@
... [canonical_url(current_translationmessage), '+translate'])
>>> translationmessage.setPOFile(pofile)
>>> translationmessage_page_view = create_view(
- ... translationmessage, "+translate", layer=TranslationsLayer,
- ... server_url=server_url)
+ ... translationmessage, "+translate", server_url=server_url)
>>> translationmessage_page_view.initialize()
We have the plural form information for this language.
@@ -246,7 +244,7 @@
... 'submit_translations': 'Save & Continue'}
>>> translationmessage_page_view = create_view(
... translationmessage, "+translate", form=form,
- ... layer=TranslationsLayer, server_url=server_url)
+ ... server_url=server_url)
>>> translationmessage_page_view.request.method = 'POST'
>>> translationmessage_page_view.initialize()
>>> transaction.commit()
@@ -284,7 +282,7 @@
... 'submit_translations': 'Save & Continue'}
>>> translationmessage_page_view = create_view(
... translationmessage, "+translate", form=form,
- ... layer=TranslationsLayer, server_url=server_url)
+ ... server_url=server_url)
>>> translationmessage_page_view.request.method = 'POST'
>>> translationmessage_page_view.initialize()
>>> for notification in (
@@ -329,7 +327,7 @@
... 'submit_translations': 'Save & Continue'}
>>> translationmessage_page_view = create_view(
... translationmessage, "+translate", form=form,
- ... layer=TranslationsLayer, server_url=server_url)
+ ... server_url=server_url)
>>> translationmessage_page_view.request.method = 'POST'
>>> translationmessage_page_view.initialize()
@@ -540,8 +538,7 @@
>>> server_url = '/'.join(
... [canonical_url(translationmessage), '+translate'])
>>> translationmessage_page_view = create_view(
- ... translationmessage, "+translate", layer=TranslationsLayer,
- ... server_url=server_url)
+ ... translationmessage, "+translate", server_url=server_url)
>>> translationmessage_page_view.initialize()
>>> subview = translationmessage_page_view.translationmessage_view
>>> subview.initialize()
@@ -566,8 +563,7 @@
>>> server_url = '/'.join(
... [canonical_url(translationmessage), '+translate'])
>>> translationmessage_page_view = create_view(
- ... translationmessage, "+translate", layer=TranslationsLayer,
- ... server_url=server_url)
+ ... translationmessage, "+translate", server_url=server_url)
>>> translationmessage_page_view.initialize()
>>> subview = translationmessage_page_view.translationmessage_view
>>> subview.initialize()
@@ -587,8 +583,7 @@
>>> server_url = '/'.join(
... [canonical_url(pofile), '+translate'])
>>> pofile_view = create_view(
- ... pofile, "+translate", layer=TranslationsLayer,
- ... server_url=server_url)
+ ... pofile, "+translate", server_url=server_url)
>>> pofile_view.initialize()
>>> subview = pofile_view.translationmessage_views[0]
>>> subview.initialize()
@@ -606,8 +601,7 @@
... translations=[u"diverged translation"])
>>> diverged_message.setPOFile(pofile)
>>> translationmessage_page_view = create_view(
- ... diverged_message, "+translate", layer=TranslationsLayer,
- ... server_url=server_url)
+ ... diverged_message, "+translate", server_url=server_url)
>>> translationmessage_page_view.initialize()
>>> subview = translationmessage_page_view.translationmessage_view
>>> subview.initialize()
=== modified file 'lib/lp/translations/browser/tests/translator-views.txt'
--- lib/lp/translations/browser/tests/translator-views.txt 2010-07-16 16:51:52 +0000
+++ lib/lp/translations/browser/tests/translator-views.txt 2014-02-19 04:03:27 +0000
@@ -23,9 +23,7 @@
Translator +admin view provides a nice page title and a form label.
- >>> from lp.translations.publisher import TranslationsLayer
- >>> view = create_initialized_view(translator, '+admin',
- ... layer=TranslationsLayer)
+ >>> view = create_initialized_view(translator, '+admin')
>>> print view.label
Edit Serbian translation team in Test translators
@@ -45,9 +43,7 @@
for a language in a TranslationGroup, and page title and form label
describe that appropriately.
- >>> from lp.translations.publisher import TranslationsLayer
- >>> view = create_initialized_view(translator, '+edit',
- ... layer=TranslationsLayer)
+ >>> view = create_initialized_view(translator, '+edit')
>>> print view.label
Set Serbian guidelines for Test translators
@@ -66,9 +62,7 @@
Translator +edit view allows one to only set translation guidelines
for a language in a TranslationGroup.
- >>> from lp.translations.publisher import TranslationsLayer
- >>> view = create_initialized_view(translator, '+remove',
- ... layer=TranslationsLayer)
+ >>> view = create_initialized_view(translator, '+remove')
>>> print view.label
Unset 'Bad translators' as the Serbian translator in Test translators
=== modified file 'lib/lp/translations/browser/translations.py'
--- lib/lp/translations/browser/translations.py 2014-02-19 00:35:25 +0000
+++ lib/lp/translations/browser/translations.py 2014-02-19 04:03:27 +0000
@@ -7,7 +7,6 @@
'RosettaApplicationView',
'RosettaStatsView',
'RosettaApplicationNavigation',
- 'TranslateRedirectView',
'TranslationsLanguageBreadcrumb',
'TranslationsMixin',
'TranslationsRedirectView',
@@ -155,16 +154,6 @@
return getUtility(IProductSet)
-class TranslateRedirectView(RedirectionView):
- """Redirects to translations site for +translate page."""
-
- def __init__(self, context, request):
- target = canonical_url(
- context, rootsite='translations', view_name='+translate')
- super(TranslateRedirectView, self).__init__(
- target, request, status=301)
-
-
class TranslationsRedirectView(RedirectionView):
"""Redirects to translations site for +translations page."""
=== modified file 'lib/lp/translations/doc/rosetta-karma.txt'
--- lib/lp/translations/doc/rosetta-karma.txt 2011-12-30 06:14:56 +0000
+++ lib/lp/translations/doc/rosetta-karma.txt 2014-02-19 04:03:27 +0000
@@ -361,7 +361,6 @@
product from where the IPOTemplate is and he has rights to change the
description.
- >>> from lp.translations.publisher import TranslationsLayer
>>> sample_person = personset.getByEmail('test@xxxxxxxxxxxxx')
>>> login('test@xxxxxxxxxxxxx')
>>> form = {
@@ -370,8 +369,7 @@
... u'field.priority': u'0',
... u'field.description': u'This is a new description',
... u'field.actions.change': u'Change'}
- >>> potemplate_view = create_view(
- ... potemplate, '+edit', form=form, layer=TranslationsLayer)
+ >>> potemplate_view = create_view(potemplate, '+edit', form=form)
>>> potemplate_view.request.method = 'POST'
Let's see the description we have atm:
References