]> source.dussan.org Git - gitblit.git/commitdiff
Disable blame link on commit page if no file history.
authorJames Moger <james.moger@gitblit.com>
Thu, 29 Sep 2011 21:00:12 +0000 (17:00 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 29 Sep 2011 21:00:12 +0000 (17:00 -0400)
src/com/gitblit/wicket/pages/CommitPage.java

index 7bf7807718e5f984ac1ed951b9ad3b245c331728..ad3344679b15822131fb14bbc8c29ef5923a531a 100644 (file)
@@ -165,7 +165,8 @@ public class CommitPage extends RepositoryPage {
                                item.add(new BookmarkablePageLink<Void>("view", BlobPage.class, WicketUtils\r
                                                .newPathParameter(repositoryName, entry.commitId, entry.path)));\r
                                item.add(new BookmarkablePageLink<Void>("blame", BlamePage.class, WicketUtils\r
-                                               .newPathParameter(repositoryName, entry.commitId, entry.path)));\r
+                                               .newPathParameter(repositoryName, entry.commitId, entry.path))\r
+                                               .setEnabled(!entry.changeType.equals(ChangeType.ADD)));\r
                                item.add(new BookmarkablePageLink<Void>("history", HistoryPage.class, WicketUtils\r
                                                .newPathParameter(repositoryName, entry.commitId, entry.path))\r
                                                .setEnabled(!entry.changeType.equals(ChangeType.ADD)));\r