~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/browser/buglinktarget.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-25 08:55:37 UTC
  • mfrom: (13287.1.8 bug-800652)
  • Revision ID: launchpad@pqm.canonical.com-20110625085537-moikyoo2pe98zs7r
[r=jcsackett, julian-edwards][bug=800634,
        800652] Enable and display overrides on sync package uploads.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from zope.interface import providedBy
22
22
from zope.security.interfaces import Unauthorized
23
23
 
24
 
from lp import _
 
24
from canonical.config import config
 
25
from canonical.launchpad import _
 
26
from canonical.launchpad.searchbuilder import any
 
27
from canonical.launchpad.webapp import canonical_url
 
28
from canonical.launchpad.webapp.authorization import check_permission
 
29
from canonical.launchpad.webapp.publisher import LaunchpadView
25
30
from lp.app.browser.launchpadform import (
26
31
    action,
27
32
    custom_widget,
33
38
    IBugLinkForm,
34
39
    IUnlinkBugsForm,
35
40
    )
36
 
from lp.bugs.interfaces.bugtask import (
37
 
    BugTaskSearchParams,
38
 
    IBugTaskSet,
39
 
    )
40
 
from lp.services.config import config
 
41
from lp.bugs.interfaces.bugtask import BugTaskSearchParams, IBugTaskSet
41
42
from lp.services.propertycache import (
42
43
    cachedproperty,
43
44
    get_property_cache,
44
45
    )
45
 
from lp.services.searchbuilder import any
46
 
from lp.services.webapp import canonical_url
47
 
from lp.services.webapp.authorization import check_permission
48
 
from lp.services.webapp.publisher import LaunchpadView
49
46
 
50
47
 
51
48
class BugLinkView(LaunchpadFormView):
53
50
 
54
51
    label = _('Link a bug report')
55
52
    schema = IBugLinkForm
56
 
    page_title = label
57
53
 
58
54
    focused_element_id = 'bug'
59
55
 
77
73
            # XXX flacoste 2006-08-23 bug=57470: This should use proper _().
78
74
            self.setFieldError(
79
75
                'bug',
80
 
                'You are not allowed to link to private bug #%d.' % bug.id)
 
76
                'You are not allowed to link to private bug #%d.'% bug.id)
81
77
            return
82
78
        bug_props = {'bugid': bug.id, 'title': bug.title}
83
79
        response.addNotification(
134
130
    label = _('Remove links to bug reports')
135
131
    schema = IUnlinkBugsForm
136
132
    custom_widget('bugs', LabeledMultiCheckBoxWidget)
137
 
    page_title = label
138
133
 
139
134
    @property
140
135
    def cancel_url(self):