Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1450EE53 for ; Tue, 12 Feb 2013 01:39:44 +0000 (UTC) Received: (qmail 85003 invoked by uid 500); 12 Feb 2013 01:39:44 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 84986 invoked by uid 500); 12 Feb 2013 01:39:44 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 84978 invoked by uid 99); 12 Feb 2013 01:39:44 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 01:39:44 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 03CD53CF42; Tue, 12 Feb 2013 01:39:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: [#5685] Changed commit log browser to use more efficient Older link paging Message-Id: <20130212013944.03CD53CF42@tyr.zones.apache.org> Date: Tue, 12 Feb 2013 01:39:43 +0000 (UTC) Updated Branches: refs/heads/cj/5685 [created] fe0233a61 [#5685] Changed commit log browser to use more efficient Older link paging Signed-off-by: Cory Johns Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/fe0233a6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/fe0233a6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/fe0233a6 Branch: refs/heads/cj/5685 Commit: fe0233a617ec750dd7067f2818d9bab31ab9be11 Parents: 1150a67 Author: Cory Johns Authored: Tue Feb 12 01:38:58 2013 +0000 Committer: Cory Johns Committed: Tue Feb 12 01:38:58 2013 +0000 ---------------------------------------------------------------------- Allura/allura/controllers/repository.py | 8 +++----- Allura/allura/templates/repo/log.html | 2 +- Allura/allura/templates/widgets/repo/log.html | 3 ++- 3 files changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fe0233a6/Allura/allura/controllers/repository.py ---------------------------------------------------------------------- diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py index 40a9bc3..e4d0f72 100644 --- a/Allura/allura/controllers/repository.py +++ b/Allura/allura/controllers/repository.py @@ -305,7 +305,7 @@ class MergeRequestsController(object): return MergeRequestController(num), remainder class MergeRequestController(object): - log_widget=SCMLogWidget() + log_widget=SCMLogWidget(show_paging=False) thread_widget=w.Thread( page=None, limit=None, page_size=None, count=None, style='linear') @@ -428,12 +428,11 @@ class CommitBrowser(BaseController): @with_trailing_slash @validate(dict(page=validators.Int(if_empty=0), limit=validators.Int(if_empty=25))) - def log(self, limit=25, page=0, path=None, **kw): - limit, page, start = g.handle_paging(limit, page, default=25) + def log(self, limit=25, path=None, **kw): if path: path = path.lstrip('/') params = dict(path=path, rev=self._commit._id) - commits = list(c.app.repo.commits(skip=start, limit=limit, **params)) + commits = list(c.app.repo.commits(limit=limit, **params)) count = c.app.repo.commits_count(**params) revisions = M.repo.Commit.query.find({'_id': {'$in': commits}}).sort('committed.date', -1) c.log_widget = self.log_widget @@ -441,7 +440,6 @@ class CommitBrowser(BaseController): username=c.user._id and c.user.username, branch=None, log=revisions, - page=page, limit=limit, count=count, **kw) http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fe0233a6/Allura/allura/templates/repo/log.html ---------------------------------------------------------------------- diff --git a/Allura/allura/templates/repo/log.html b/Allura/allura/templates/repo/log.html index ffe1022..4336684 100644 --- a/Allura/allura/templates/repo/log.html +++ b/Allura/allura/templates/repo/log.html @@ -13,7 +13,7 @@ {% block content %}
{% if log %} - {{c.log_widget.display(value=log, limit=limit, page=page, count=count)}} + {{c.log_widget.display(value=log, limit=limit, count=count)}} {% else %}

No (more) commits

{% endif %} http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fe0233a6/Allura/allura/templates/widgets/repo/log.html ---------------------------------------------------------------------- diff --git a/Allura/allura/templates/widgets/repo/log.html b/Allura/allura/templates/widgets/repo/log.html index 86d5095..8a3bf6b 100644 --- a/Allura/allura/templates/widgets/repo/log.html +++ b/Allura/allura/templates/widgets/repo/log.html @@ -35,11 +35,12 @@ Tree + {% do c.__setattr__('last_commit', commit) %} {% endfor %} {% if show_paging %} - {{widget.fields['page_list'].display(limit=limit, page=page, count=count)}} + Older > {{widget.fields['page_size'].display(limit=limit, page=page, count=count)}} {% endif %}