@(issue: gitbucket.core.model.Issue, pullreq: gitbucket.core.model.PullRequest, comments: List[gitbucket.core.model.Comment], issueLabels: List[gitbucket.core.model.Label], collaborators: List[String], milestones: List[(gitbucket.core.model.Milestone, Int, Int)], labels: List[gitbucket.core.model.Label], dayByDayCommits: Seq[Seq[gitbucket.core.util.JGitUtil.CommitInfo]], diffs: Seq[gitbucket.core.util.JGitUtil.DiffInfo], hasWritePermission: Boolean, repository: gitbucket.core.service.RepositoryService.RepositoryInfo, flash: Map[String, String])(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers @import gitbucket.core.model.IssueComment @import gitbucket.core.model.CommitComment @gitbucket.core.html.main(s"${issue.title} - Pull Request #${issue.issueId} - ${repository.owner}/${repository.name}", Some(repository)){ @gitbucket.core.html.menu("pulls", repository){ @defining(dayByDayCommits.flatten){ commits =>
@if(hasWritePermission || context.loginAccount.map(_.userName == issue.openedUserName).getOrElse(false)){ Edit } @if(context.loginAccount.isDefined){ New pull request }
Save Cancel

# @issue.title #@issue.issueId

@if(issue.closed) { @comments.flatMap @{ case comment: IssueComment => Some(comment) case _ => None }.find(_.action == "merge").map{ comment => Merged @helpers.user(comment.commentedUserName, styleClass="username strong") merged @commits.size @helpers.plural(commits.size, "commit") into `@pullreq.userName:@pullreq.branch` from `@pullreq.requestUserName:@pullreq.requestBranch` @gitbucket.core.helper.html.datetimeago(comment.registeredDate) }.getOrElse { Closed @helpers.user(issue.openedUserName, styleClass="username strong") wants to merge @commits.size @helpers.plural(commits.size, "commit") into `@pullreq.userName:@pullreq.branch` from `@pullreq.requestUserName:@pullreq.requestBranch` } } else { Open @helpers.user(issue.openedUserName, styleClass="username strong") wants to merge @commits.size @helpers.plural(commits.size, "commit") into `@pullreq.userName:@pullreq.branch` from `@pullreq.requestUserName:@pullreq.requestBranch` }
@flash.get("error").map{ error =>
@error
} @flash.get("info").map{ info =>
@info
} @gitbucket.core.pulls.html.conversation(issue, pullreq, comments, issueLabels, collaborators, milestones, labels, hasWritePermission, repository)
@gitbucket.core.pulls.html.commits(dayByDayCommits, Some(comments), repository)
@gitbucket.core.helper.html.diff(diffs, repository, Some(commits.head.id), Some(commits.last.id), true, Some(pullreq.issueId), hasWritePermission, true)
} } }