@(branchInfo: Seq[(gitbucket.core.util.JGitUtil.BranchInfo, Option[(gitbucket.core.model.PullRequest, gitbucket.core.model.Issue)], Boolean)], hasWritePermission: Boolean, repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers @gitbucket.core.html.main(s"${repository.owner}/${repository.name}", Some(repository)) { @gitbucket.core.html.menu("branches", repository){ @branchInfo.map { case (branch, prs, isProtected) => }
All branches
@if(isProtected){ } @branch.name Updated @gitbucket.core.helper.html.datetimeago(branch.commitTime, false) by @helpers.user(branch.committerName, branch.committerEmailAddress, "muted-link") @if(repository.repository.defaultBranch == branch.name){ Default } else { @branch.mergeInfo.map{ info =>
@info.ahead
@info.behind
} }
@if(repository.repository.defaultBranch != branch.name){ @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 { @if(isProtected){ } else { } } } } }
} }