@(commits: Seq[Seq[util.JGitUtil.CommitInfo]], diffs: Seq[util.JGitUtil.DiffInfo], members: List[String], originId: String, forkedId: String, sourceId: String, commitId: String, hasConflict: Boolean, repository: service.RepositoryService.RepositoryInfo, originRepository: service.RepositoryService.RepositoryInfo, forkedRepository: service.RepositoryService.RepositoryInfo, hasWritePermission: Boolean)(implicit context: app.Context) @import context._ @import view.helpers._ @import org.eclipse.jgit.diff.DiffEntry.ChangeType @html.main("Pull Requests - " + repository.owner + "/" + repository.name){ @html.header("pulls", repository)
Edit @originRepository.owner:@originId ... @forkedRepository.owner:@forkedId
@helper.html.dropdown(originRepository.owner + "/" + repository.name, "base fork") { @members.map { member =>
- @helper.html.checkicon(member == originRepository.owner) @member/@repository.name
} } @helper.html.dropdown(originId, "base") { @originRepository.branchList.map { branch =>
- @helper.html.checkicon(branch == originId) @branch
} } ... @helper.html.dropdown(forkedRepository.owner + "/" + repository.name, "head fork") { @members.map { member =>
- @helper.html.checkicon(member == forkedRepository.owner) @member/@repository.name
} } @helper.html.dropdown(forkedId, "compare") { @forkedRepository.branchList.map { branch =>
- @helper.html.checkicon(branch == forkedId) @branch
} }
@if(commits.nonEmpty && hasWritePermission){
Click to create a pull request for this comparison
@if(hasConflict){

#### We can’t automatically merge these branches

Don't worry, you can still submit the pull request.

} else {

#### Able to merge

These branches can be automatically merged.

}
@helper.html.preview(repository, "", false, true, "width: 600px; height: 200px;")
} @if(commits.isEmpty){

#### There isn't anything to compare.

@originRepository.owner:@originId and @forkedRepository.owner:@forkedId are identical.

} else {

@commits.map { day =>
@date(day.head.time)
@day.map { commit =>
@avatar(commit.committer, 20) @commit.committer | @commit.shortMessage | @commit.id.substring(0, 7)
} }

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(commitId), Some(sourceId)) } }