@(issue: model.Issue, pullreq: model.PullRequest, diffs: Seq[util.JGitUtil.DiffInfo], newCommitId: String, oldCommitId: String, hasWritePermission: Boolean, repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context) @import context._ @import view.helpers._ @import org.eclipse.jgit.diff.DiffEntry.ChangeType
Showing @diffs.size changed @plural(diffs.size, "file")

@diffs.zipWithIndex.map { case (diff, i) => <li@if(i > 0){ class="border"}> @if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){ @diff.oldPath -> @diff.newPath } @if(diff.changeType == ChangeType.ADD){ @diff.newPath } @if(diff.changeType == ChangeType.MODIFY){ @diff.newPath } @if(diff.changeType == ChangeType.DELETE){ @diff.oldPath } }

@helper.html.diff(diffs, repository, Some(newCommitId), Some(oldCommitId))