~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/browser/vocabulary.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-27 01:11:31 UTC
  • mfrom: (14033.2.2 target-picker-adapters-0)
  • Revision ID: launchpad@pqm.canonical.com-20110927011131-ml4hh7ux5bxmns9i
[r=benji][bug=857782] Enable the view details link for pillars and
        packages in the target picker.

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
                picker_entry.details = []
261
261
                summary = picker_entry.description
262
262
                if len(summary) > 45:
263
 
                    index =  summary.rfind(' ', 0, 45)
 
263
                    index = summary.rfind(' ', 0, 45)
264
264
                    first_line = summary[0:index + 1]
265
265
                    second_line = summary[index:]
266
266
                else:
268
268
                    second_line = ''
269
269
 
270
270
                if len(second_line) > 90:
271
 
                    index =  second_line.rfind(' ', 0, 90)
272
 
                    second_line = second_line[0:index+1] 
 
271
                    index = second_line.rfind(' ', 0, 90)
 
272
                    second_line = second_line[0:index + 1]
273
273
                picker_entry.description = first_line
274
274
                picker_entry.details.append(second_line)
275
275
                picker_entry.alt_title = target.name
 
276
                picker_entry.alt_title_link = canonical_url(
 
277
                    target, rootsite='mainsite')
276
278
                picker_entry.target_type = self.target_type
277
279
                maintainer = self.getMaintainer(target)
278
280
                if maintainer is not None:
279
 
                    picker_entry.details.append( 
 
281
                    picker_entry.details.append(
280
282
                        'Maintainer: %s' % self.getMaintainer(target))
281
283
        return entries
282
284