diff --git a/src/main/twirl/commit.scala.html b/src/main/twirl/commit.scala.html index 76ea3de..89c833b 100644 --- a/src/main/twirl/commit.scala.html +++ b/src/main/twirl/commit.scala.html @@ -1,6 +1,7 @@ @(branch: String, commit: app.CommitInfo, repository: app.RepositoryInfo, diffs: Seq[app.DiffInfo])(implicit context: app.Context) @import context._ @import view.helpers +@import org.eclipse.jgit.diff.DiffEntry.ChangeType @main(helpers.cut(commit.message, 20)){ @header(branch, repository) @navtab(branch, repository, "commits") @@ -21,11 +22,16 @@ - @diffs.map { diff => + @diffs.zipWithIndex.map { case (diff, i) =>
- @diff.newPath + @if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){ + @diff.oldPath -> @diff.newPath + } + @if(diff.changeType == ChangeType.ADD || diff.changeType == ChangeType.DELETE || diff.changeType == ChangeType.MODIFY){ + @diff.newPath + } @@ -33,9 +39,71 @@
-
@diff.newContent.getOrElse("")
+
+ +
} -} \ No newline at end of file +} + + + + + \ No newline at end of file