@(title: String, commits: Seq[Seq[gitbucket.core.util.JGitUtil.CommitInfo]], diffs: Seq[gitbucket.core.util.JGitUtil.DiffInfo], members: List[(String, String, String)], comments: List[gitbucket.core.model.Comment], originId: String, forkedId: String, sourceId: String, commitId: String, content: String, repository: gitbucket.core.service.RepositoryService.RepositoryInfo, originRepository: gitbucket.core.service.RepositoryService.RepositoryInfo, forkedRepository: gitbucket.core.service.RepositoryService.RepositoryInfo, hasOriginWritePermission: Boolean, collaborators: List[String], milestones: List[gitbucket.core.model.Milestone], priorities: List[gitbucket.core.model.Priority], defaultPriority: Option[gitbucket.core.model.Priority], labels: List[gitbucket.core.model.Label], customFields: List[gitbucket.core.model.CustomField])(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers @gitbucket.core.html.main(s"Pull requests - ${repository.owner}/${repository.name}", Some(repository)){ @gitbucket.core.html.menu("pulls", repository){
@gitbucket.core.helper.html.dropdown(originRepository.owner + "/" + originRepository.name, "base fork", filter=("origin_repo", "Find Repository...")) { @members.map { case (owner, name, defaultBranch) =>
- @gitbucket.core.helper.html.checkicon(owner == originRepository.owner) @owner/@name
} } @gitbucket.core.helper.html.dropdown(originId, "base", filter=("origin_branch", "Find Branch...")) { @if(!originRepository.branchList.contains(originId)){
- @gitbucket.core.helper.html.checkicon(true) @originId
} @originRepository.branchList.map { branch =>
- @gitbucket.core.helper.html.checkicon(branch == originId) @branch
} } ... @gitbucket.core.helper.html.dropdown(forkedRepository.owner + "/" + forkedRepository.name, "head fork", filter=("forked_repo", "Find Repository...")) { @members.map { case (owner, name, defaultBranch) =>
- @gitbucket.core.helper.html.checkicon(owner == forkedRepository.owner) @owner/@name
} } @gitbucket.core.helper.html.dropdown(forkedId, "compare", filter=("forked_branch", "Find Branch...")) { @if(!forkedRepository.branchList.contains(forkedId)){
- @gitbucket.core.helper.html.checkicon(true) @forkedId
} @forkedRepository.branchList.map { branch =>
- @gitbucket.core.helper.html.checkicon(branch == forkedId) @branch
} }
@if(originRepository.branchList.contains(originId) && forkedRepository.branchList.contains(forkedId)){
Checking...
}
@if(commits.nonEmpty && context.loginAccount.isDefined && originRepository.branchList.contains(originId) && forkedRepository.branchList.contains(forkedId)){
Create pull request Discuss and review the changes in this comparison with others.
@gitbucket.core.helper.html.preview( repository = repository, content = content, enableWikiLink = false, enableRefsLink = true, enableLineBreaks = true, enableTaskList = true, hasWritePermission = true, completionContext = "issues", style = "height: 200px;" )
@gitbucket.core.issues.html.issueinfo( issue = None, comments = Nil, issueLabels = Nil, issueAssignees = Nil, collaborators = collaborators, milestones = milestones.map((_, 0, 0)), priorities = priorities, defaultPriority = defaultPriority, labels = labels, customFields = customFields.map((_, None)), isManageable = hasOriginWritePermission, repository = repository )
} @if(commits.isEmpty){

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

@originRepository.owner:@originId and @forkedRepository.owner:@forkedId are identical.
} else {

@defining(commits.flatten){ commits => @commits.size @helpers.plural(commits.size, "commit") } | @diffs.size @helpers.plural(diffs.size, "file") changed | @defining(comments.collect { case c: gitbucket.core.model.CommitComment => c }){ comments => @comments.size commit @helpers.plural(comments.size, "comment") } | @defining(commits.flatMap(_.map(_.authorEmailAddress)).distinct){ contributors => @contributors.size @helpers.plural(contributors.size, "contributor") }

@commits.map { day =>
Commits on @helpers.date(day.head.commitTime)

@day.map { commit =>
@helpers.avatarLink(commit, 20) @helpers.user(commit.authorName, commit.authorEmailAddress, "username strong") | @commit.shortMessage | @commit.id.substring(0, 7)
}

}
@gitbucket.core.helper.html.diff(diffs, repository, Some(commitId), Some(sourceId), true, None, false, false) @gitbucket.core.issues.html.commentlist(None, comments, false, repository, None) } } }