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

@diffs.zipWithIndex.map { case (diff, 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 } }

} @diffs.zipWithIndex.map { case (diff, i) =>

@if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){ @diff.oldPath -> @diff.newPath @if(newCommitId.isDefined){ View file @@ @newCommitId.get.substring(0, 10) } } @if(diff.changeType == ChangeType.ADD || diff.changeType == ChangeType.MODIFY){ @diff.newPath @if(newCommitId.isDefined){ View file @@ @newCommitId.get.substring(0, 10) } } @if(diff.changeType == ChangeType.DELETE){ @diff.oldPath @if(oldCommitId.isDefined){ View file @@ @oldCommitId.get.substring(0, 10) } }
@if(diff.newContent != None || diff.oldContent != None){ @diff.newContent.getOrElse("") @diff.oldContent.getOrElse("") } else { Not supported }

}