From f1720ca884bc3fa9da1288ad955e46f165aa4168 Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 1 Jun 2011 08:09:46 -0400 Subject: Unit testing. Disable links on first commit. Initial stats page. --- src/com/gitblit/wicket/pages/CommitDiffPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/com/gitblit/wicket/pages/CommitDiffPage.java') diff --git a/src/com/gitblit/wicket/pages/CommitDiffPage.java b/src/com/gitblit/wicket/pages/CommitDiffPage.java index 1f492aca..e7af833d 100644 --- a/src/com/gitblit/wicket/pages/CommitDiffPage.java +++ b/src/com/gitblit/wicket/pages/CommitDiffPage.java @@ -24,6 +24,7 @@ import org.apache.wicket.markup.html.link.BookmarkablePageLink; import org.apache.wicket.markup.repeater.Item; import org.apache.wicket.markup.repeater.data.DataView; import org.apache.wicket.markup.repeater.data.ListDataProvider; +import org.eclipse.jgit.diff.DiffEntry.ChangeType; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; @@ -99,7 +100,7 @@ public class CommitDiffPage extends RepositoryPage { newPathParameter(entry.path))); item.add(new BookmarkablePageLink("blame", BlobPage.class).setEnabled(false)); item.add(new BookmarkablePageLink("history", HistoryPage.class, - newPathParameter(entry.path))); + newPathParameter(entry.path)).setEnabled(!entry.changeType.equals(ChangeType.ADD) && !entry.changeType.equals(ChangeType.DELETE))); WicketUtils.setAlternatingBackground(item, counter); counter++; -- cgit v1.2.3