@(branch: String, repository: gitbucket.core.service.RepositoryService.RepositoryInfo, pathList: List[String], groupNames: List[String], latestCommit: gitbucket.core.util.JGitUtil.CommitInfo, files: List[gitbucket.core.util.JGitUtil.FileInfo], readme: Option[(List[String], String)], hasWritePermission: Boolean, branchPullRequest: Option[(gitbucket.core.model.PullRequest, gitbucket.core.model.Issue)], info: Option[Any] = None, error: Option[Any] = None)(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ @html.main( if(pathList.isEmpty){ if(branch == repository.repository.defaultBranch){ s"${repository.owner}/${repository.name}" } else { s"${repository.owner}/${repository.name} at ${encodeRefName(branch)}" } } else { s"${(repository.name :: pathList).mkString("/")} at ${encodeRefName(branch)} - ${repository.owner}/${repository.name}" }, Some(repository)) { @html.menu("code", repository, Some(branch), pathList.isEmpty, groupNames.isEmpty, info, error){
@if(pathList.nonEmpty){ }
@branchPullRequest.map{ case (pullRequest, issue) => #@pullRequest.issueId }.getOrElse{ } @helper.html.branchcontrol( branch, repository, hasWritePermission ){ @repository.branchList.map { x =>
  • @helper.html.checkicon(x == branch) @x
  • } } @repository.name / @pathList.zipWithIndex.map { case (section, i) => @section / } @if(hasWritePermission){ + }
    @if(pathList.size > 0){ } @files.map { file => }
    @link(latestCommit.summary, repository) @if(latestCommit.description.isDefined){ ... }
    @avatar(latestCommit, 20) @user(latestCommit.authorName, latestCommit.authorEmailAddress, "username strong") authored @helper.html.datetimeago(latestCommit.authorTime)
    @if(latestCommit.isDifferentFromAuthor) {
    @user(latestCommit.committerName, latestCommit.committerEmailAddress, "username strong") committed @helper.html.datetimeago(latestCommit.commitTime)
    }
    ..
    @if(file.isDirectory){ @if(file.linkUrl.isDefined){ } else { } } else { } @if(file.isDirectory){ @if(file.linkUrl.isDefined){ @file.name.split("/").toList.init match { case Nil => {} case list => {@list.mkString("", "/", "/")} }@file.name.split("/").toList.last } else { @file.name.split("/").toList.init match { case Nil => {} case list => {@list.mkString("", "/", "/")} }@file.name.split("/").toList.last } } else { @file.name } @link(file.message, repository) @helper.html.datetimeago(file.time, false)
    @readme.map { case(filePath, content) =>
    @filePath.reverse.head
    @renderMarkup(filePath, content, branch, repository, false, false, true)
    } } }