~ubuntu-branches/ubuntu/precise/trac/precise

« back to all changes in this revision

Viewing changes to trac/ticket/report.py

  • Committer: Bazaar Package Importer
  • Author(s): Luis Matos
  • Date: 2008-08-16 00:08:30 UTC
  • mfrom: (1.1.14 upstream) (14.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080816000830-q50gglu6pbj0gas2
Tags: 0.11.1-2
* Upstream version 
  "Trac 0.11.1 contains a number of bug fixes and minor enhancements."
* Patch setup.py to install the contrib dir ( Closes: #495019 )
* Modified compatible version of trac-bzr so that trac 0.11.1 an be
  used with the current trac-bzr version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
288
288
                'args': args, 'message': None, 'paginator':None}
289
289
 
290
290
        page = int(req.args.get('page', '1'))
291
 
        limit = self.items_per_page
292
 
        if req.args.get('format', '') == 'rss':
293
 
            limit = self.items_per_page_rss
 
291
        limit = {'rss': self.items_per_page_rss,
 
292
                 'csv': 0, 'tab': 0}.get(format, self.items_per_page)
294
293
        offset = (page - 1) * limit
295
294
        user = req.args.get('USER', None)
296
295
 
301
300
            numrows = len(results)
302
301
 
303
302
        except Exception, e:
 
303
            db.rollback()
304
304
            data['message'] = _('Report execution failed: %(error)s',
305
305
                                error=to_unicode(e))
306
306
            return 'report_view.html', data, None
323
323
            shown_pages = paginator.get_shown_pages(21)
324
324
            for p in shown_pages:
325
325
                pagedata.append([req.href.report(id, asc=asc, sort=sort_col, 
326
 
                                                 USER=user, page=p),
 
326
                                                 page=p, **args),
327
327
                                 None, str(p), _('Page %(num)d', num=p)])          
328
328
            fields = ['href', 'class', 'string', 'title']
329
329
            paginator.shown_pages = [dict(zip(fields, p)) for p in pagedata]
461
461
                     'sorting_enabled': len(row_groups)==1,
462
462
                     'email_map': email_map})
463
463
 
464
 
        if id:
 
464
        if id and id != -1:
465
465
            self.add_alternate_links(req, args)
466
466
 
467
467
        if format == 'rss':