From 5b5b31f125c33973aebbae28226163c716d2d332 Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 29 Sep 2011 17:00:12 -0400 Subject: [PATCH] Disable blame link on commit page if no file history. --- src/com/gitblit/wicket/pages/CommitPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/gitblit/wicket/pages/CommitPage.java b/src/com/gitblit/wicket/pages/CommitPage.java index 7bf78077..ad334467 100644 --- a/src/com/gitblit/wicket/pages/CommitPage.java +++ b/src/com/gitblit/wicket/pages/CommitPage.java @@ -165,7 +165,8 @@ public class CommitPage extends RepositoryPage { item.add(new BookmarkablePageLink("view", BlobPage.class, WicketUtils .newPathParameter(repositoryName, entry.commitId, entry.path))); item.add(new BookmarkablePageLink("blame", BlamePage.class, WicketUtils - .newPathParameter(repositoryName, entry.commitId, entry.path))); + .newPathParameter(repositoryName, entry.commitId, entry.path)) + .setEnabled(!entry.changeType.equals(ChangeType.ADD))); item.add(new BookmarkablePageLink("history", HistoryPage.class, WicketUtils .newPathParameter(repositoryName, entry.commitId, entry.path)) .setEnabled(!entry.changeType.equals(ChangeType.ADD))); -- 2.39.5