@(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)(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ @import gitbucket.core.model._ @html.main(s"${issue.title} - Pull Request #${issue.issueId} - ${repository.owner}/${repository.name}", Some(repository)){ @html.menu("pulls", repository){ @defining(dayByDayCommits.flatten){ commits =>
@if(hasWritePermission || loginAccount.map(_.userName == issue.openedUserName).getOrElse(false)){ Edit } New issue
Save Cancel

# @issue.title #@issue.issueId

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