@(branch: String, repository: service.RepositoryService.RepositoryInfo, pathList: List[String], latestCommit: util.JGitUtil.CommitInfo, files: List[util.JGitUtil.FileInfo], readme: Option[(List[String], String)], hasWritePermission: Boolean)(implicit context: app.Context) @import context._ @import view.helpers._ @html.main(s"${repository.owner}/${repository.name}", Some(repository)) { @html.menu("code", repository, Some(branch), pathList.isEmpty){
@helper.html.dropdown( value = if(branch.length == 40) branch.substring(0, 10) else branch, prefix = if(branch.length == 40) "tree" else if(repository.branchList.contains(branch)) "branch" else "tree", mini = true ){ @repository.branchList.map { x =>
- @helper.html.checkicon(x == branch) @x
} } @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) @avatar(latestCommit, 20) @user(latestCommit.authorName, latestCommit.authorEmailAddress, "username strong") authored on @datetime(latestCommit.authorTime) @if(latestCommit.isDifferentFromAuthor) { @user(latestCommit.committerName, latestCommit.committerEmailAddress, "username strong") committed on @datetime(latestCommit.commitTime) }
@if(pathList.size > 0){
| .. |  |
} @files.map { file =>
@if(file.isDirectory){ @if(file.linkUrl.isDefined){ } else { } } else { } | @if(file.isDirectory){ @if(file.linkUrl.isDefined){ @file.name } else { @file.name } } else { @file.name } | @link(file.message, repository) [@user(file.author, file.mailAddress)] | @datetime(file.time)
}

@readme.map { case(filePath, content) =>
@filePath.reverse.head
@renderMarkup(filePath, content, branch, repository, false, false)
} } }