@(diffs: Seq[gitbucket.core.util.JGitUtil.DiffInfo], repository: gitbucket.core.service.RepositoryService.RepositoryInfo, newCommitId: Option[String], oldCommitId: Option[String], showIndex: Boolean, issueId: Option[Int], hasWritePermission: Boolean, showLineNotes: Boolean)(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.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) => <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 } }

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

@if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){ @diff.oldPath -> @diff.newPath @if(newCommitId.isDefined){
Show notes View file @@ @newCommitId.get.substring(0, 10)
} } @if(diff.changeType == ChangeType.ADD || diff.changeType == ChangeType.MODIFY){ @if(diff.changeType == ChangeType.ADD){ }else{ } @diff.newPath @if(newCommitId.isDefined){
Show notes View file @@ @newCommitId.get.substring(0, 10)
} } @if(diff.changeType == ChangeType.DELETE){ @diff.oldPath @if(oldCommitId.isDefined){
Show notes View file @@ @oldCommitId.get.substring(0, 10)
} }

@if(diff.newContent != None || diff.oldContent != None){ @diff.newContent.getOrElse("") @diff.oldContent.getOrElse("") } else { Not supported }

}