@(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))
} }... } | @if(latestCommit.description.isDefined){|||
---|---|---|---|
.. | |||
@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 } | @gitbucket.core.helper.html.datetimeago(file.time, false) |