Mercurial > bitten > bitten-test
diff bitten/trac_ext/web_ui.py @ 230:c7ff953ebb07
Fix paging on build configuration page. Closes #55.
author | cmlenz |
---|---|
date | Wed, 28 Sep 2005 22:26:33 +0000 |
parents | a8c9dd7e3f71 |
children | b6e4896dc026 |
line wrap: on
line diff
--- a/bitten/trac_ext/web_ui.py +++ b/bitten/trac_ext/web_ui.py @@ -354,20 +354,16 @@ repos.sync() idx = 0 for platform, rev, build in collect_changes(repos, config): - if idx < (page - 1) * builds_per_page: - idx += 1 - continue - - prefix = 'config.builds.%d' % rev - req.hdf[prefix + '.href'] = self.env.href.changeset(rev) - if build and build.status != Build.PENDING: - build_hdf = _build_to_hdf(self.env, req, build) - req.hdf['%s.%s' % (prefix, platform.id)] = build_hdf - - idx += 1 if idx >= page * builds_per_page: more = True break + elif idx > (page - 1) * builds_per_page: + prefix = 'config.builds.%d' % rev + req.hdf[prefix + '.href'] = self.env.href.changeset(rev) + if build and build.status != Build.PENDING: + build_hdf = _build_to_hdf(self.env, req, build) + req.hdf['%s.%s' % (prefix, platform.id)] = build_hdf + idx += 1 if page > 1: if page == 2: