From f602a2f552e1389ee465307723b492b1af378fd5 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sat, 16 Apr 2011 16:28:19 -0400
Subject: [PATCH] Working history feature. Tweak to paging.
---
src/com/gitblit/wicket/panels/LogPanel.java | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/com/gitblit/wicket/panels/LogPanel.java b/src/com/gitblit/wicket/panels/LogPanel.java
index 2075410..954af75 100644
--- a/src/com/gitblit/wicket/panels/LogPanel.java
+++ b/src/com/gitblit/wicket/panels/LogPanel.java
@@ -29,6 +29,8 @@
public class LogPanel extends BasePanel {
private static final long serialVersionUID = 1L;
+
+ private boolean hasMore = false;
public LogPanel(String wicketId, final String repositoryName, String objectId, Repository r, int limit, int pageOffset) {
super(wicketId);
@@ -47,6 +49,10 @@
// Fixed size result set
commits = JGitUtils.getRevLog(r, objectId, 0, limit);
}
+
+ // inaccurate way to determine if there are more commits.
+ // works unless commits.size() represents the exact end.
+ hasMore = commits.size() >= itemsPerPage;
// header
if (pageResults) {
@@ -113,4 +119,8 @@
}
}
}
+
+ public boolean hasMore() {
+ return hasMore;
+ }
}
--
Gitblit v1.9.1