@(branchInfo: Seq[(gitbucket.core.util.JGitUtil.BranchInfo, Option[(gitbucket.core.model.PullRequest, gitbucket.core.model.Issue)])], hasWritePermission: Boolean, repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ @html.main(s"${repository.owner}/${repository.name}", Some(repository)) { @html.menu("code", repository){

# Branches

All branches
@branchInfo.map { case (branch, prs) =>
@branch.mergeInfo.map{ info => @prs.map{ case (pull, issue) => #@issue.issueId @if(issue.closed) { @if(info.isMerged){ Merged }else{ Closed } } else { Open } }.getOrElse{ @if(context.loginAccount.isDefined){ New Pull Request } else { Compare } } @if(hasWritePermission){ @if(prs.map(!_._2.closed).getOrElse(false)){ }else{ } } } @branch.name Updated @helper.html.datetimeago(branch.commitTime, false) by @user(branch.committerName, branch.committerEmailAddress, "muted-link") @if(branch.mergeInfo.isEmpty){ Default }else{ @branch.mergeInfo.map{ info => @info.ahead @info.behind } }
}

} }