@(branch: String, repository: gitbucket.core.service.RepositoryService.RepositoryInfo, pathList: List[String], latestCommit: gitbucket.core.util.JGitUtil.CommitInfo, commitCount: Int, 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 gitbucket.core.view.helpers @import gitbucket.core.service.RepositoryService @gitbucket.core.html.main( if(pathList.isEmpty){ if(branch == repository.repository.defaultBranch){ s"${repository.owner}/${repository.name}" } else { s"${repository.owner}/${repository.name} at ${branch}" } } else { s"${(repository.name :: pathList).mkString("/")} at ${branch} - ${repository.owner}/${repository.name}" }, Some(repository)) { @gitbucket.core.html.menu("files", repository, Some(branch), info, error){ @if(pathList.isEmpty) { @repository.repository.description.map { description =>

@Html(helpers.decorateHtml(helpers.urlLink(description), repository))

} }
Transfer to URL with SHA @if(commitCount > 10000){10000+} else {@commitCount} @helpers.plural(commitCount, "commit")
@if(pathList.isEmpty){
@if(context.platform != "linux" && context.platform != null){ } Download ZIP
@gitbucket.core.helper.html.copy("repository-url", "repository-url-copy", repository.httpUrl){ @if(repository.sshUrl.isDefined){
} }
}
@gitbucket.core.helper.html.branchcontrol(branch, repository, hasWritePermission){ @repository.branchList.map { x =>
- @gitbucket.core.helper.html.checkicon(x == branch) @x
} } @if(pathList.nonEmpty){ @repository.name / @pathList.zipWithIndex.map { case (section, i) => @section / } }
@if(hasWritePermission){
}

@*
@link(latestCommit.summary, repository) @if(latestCommit.description.isDefined){ ...
    @link(latestCommit.description.get, repository)
}
*@
latest commit @latestCommit.id.substring(0, 10) @helpers.avatar(latestCommit, 20) @helpers.user(latestCommit.authorName, latestCommit.authorEmailAddress, "username strong") authored @gitbucket.core.helper.html.datetimeago(latestCommit.authorTime) @if(latestCommit.isDifferentFromAuthor) { @helpers.user(latestCommit.committerName, latestCommit.committerEmailAddress, "username strong") committed @gitbucket.core.helper.html.datetimeago(latestCommit.commitTime) }
@if(pathList.size > 0){
| .. |  |
} @files.map { file =>
@if(file.isDirectory){ @if(file.linkUrl.isDefined){ } else { } } else { } | @if(file.isDirectory){ @{file.linkUrl match { case Some(linkUrl) if linkUrl.startsWith("http://") || linkUrl.startsWith("https://") => { {file.name.split("/").toList.init match { case Nil => "" case list => list.mkString("", "/", "/") }} {file.name.split("/").toList.last} } case Some(_) => { {file.name.split("/").toList.init match { case Nil => "" case list => list.mkString("", "/", "/") }} {file.name.split("/").toList.last} } case None => { {file.name.split("/").toList.init match { case Nil => "" case list => list.mkString("", "/", "/") }} {file.name.split("/").toList.last} } }} } else { @file.name } | @helpers.link(file.message, repository) | @gitbucket.core.helper.html.datetimeago(file.time, false)
}

@readme.map { case(filePath, content) =>
@filePath.last
@helpers.renderMarkup(filePath, content, branch, repository, false, false, true)
} } }