~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/translations/browser/distroseries.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2010-09-13 21:04:41 UTC
  • mfrom: (11532.6.4 templates-listing)
  • Revision ID: launchpad@pqm.canonical.com-20100913210441-40z5mzu928wycus2
[r=abentley][ui=none][bug=608349] Move DistroSeries:+templates out of
        TAL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
        self.request.response.addInfoNotification(
179
179
            'Your changes have been applied.')
180
180
        self.next_url = canonical_url(
181
 
            self.context, rootsite='translations', view_name='+language-packs')
 
181
            self.context, rootsite='translations',
 
182
            view_name='+language-packs')
182
183
 
183
184
    @action("Request", condition=is_langpack_admin)
184
185
    def request_action(self, action, data):
185
186
        self.updateContextFromData(data)
186
187
        self._request_full_export()
187
188
        self.next_url = canonical_url(
188
 
            self.context, rootsite='translations', view_name='+language-packs')
 
189
            self.context, rootsite='translations',
 
190
            view_name='+language-packs')
189
191
 
190
192
 
191
193
class DistroSeriesTemplatesView(BaseSeriesTemplatesView):
195
197
        super(DistroSeriesTemplatesView, self).initialize(
196
198
            series=self.context, is_distroseries=True)
197
199
 
 
200
    def constructTemplateURL(self, template):
 
201
        """See `BaseSeriesTemplatesView`."""
 
202
        return '+source/%s/+pots/%s' % (
 
203
            template.sourcepackagename.name, template.name)
 
204
 
198
205
 
199
206
class DistroSeriesView(LaunchpadView, TranslationsMixin):
200
207