From: James Moger Date: Thu, 29 Sep 2011 21:00:12 +0000 (-0400) Subject: Disable blame link on commit page if no file history. X-Git-Tag: v0.7.0~102 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5b5b31f125c33973aebbae28226163c716d2d332;p=gitblit.git Disable blame link on commit page if no file history. --- 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)));