diff options
author | James Moger <james.moger@gitblit.com> | 2013-03-29 08:38:20 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-03-29 08:38:20 -0400 |
commit | 59f09bdd4536dc3584c779c3985e4ff49d4a7e69 (patch) | |
tree | 4f4c933e385037a08cceb1e6b506154b0271865e /src | |
parent | 5a768089d86839bc352299567aa782fc42f4e109 (diff) | |
download | gitblit-59f09bdd4536dc3584c779c3985e4ff49d4a7e69.tar.gz gitblit-59f09bdd4536dc3584c779c3985e4ff49d4a7e69.zip |
Disable view and blame links for deleted blobs (issue 216)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/CommitPage.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/CommitPage.java b/src/main/java/com/gitblit/wicket/pages/CommitPage.java index c5a24c8d..540d2a21 100644 --- a/src/main/java/com/gitblit/wicket/pages/CommitPage.java +++ b/src/main/java/com/gitblit/wicket/pages/CommitPage.java @@ -200,10 +200,12 @@ public class CommitPage extends RepositoryPage { .setEnabled(!entry.changeType.equals(ChangeType.ADD)
&& !entry.changeType.equals(ChangeType.DELETE)));
item.add(new BookmarkablePageLink<Void>("view", BlobPage.class, WicketUtils
- .newPathParameter(repositoryName, entry.commitId, entry.path)));
+ .newPathParameter(repositoryName, entry.commitId, entry.path))
+ .setEnabled(!entry.changeType.equals(ChangeType.DELETE)));
item.add(new BookmarkablePageLink<Void>("blame", BlamePage.class, WicketUtils
.newPathParameter(repositoryName, entry.commitId, entry.path))
- .setEnabled(!entry.changeType.equals(ChangeType.ADD)));
+ .setEnabled(!entry.changeType.equals(ChangeType.ADD)
+ && !entry.changeType.equals(ChangeType.DELETE)));
item.add(new BookmarkablePageLink<Void>("history", HistoryPage.class, WicketUtils
.newPathParameter(repositoryName, entry.commitId, entry.path))
.setEnabled(!entry.changeType.equals(ChangeType.ADD)));
|