@(branch: String, repository: service.RepositoryService.RepositoryInfo, pathList: List[String], groupNames: List[String], latestCommit: util.JGitUtil.CommitInfo, files: List[util.JGitUtil.FileInfo], readme: Option[(List[String], String)], hasWritePermission: Boolean, info: Option[Any] = None, error: Option[Any] = None)(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, groupNames.isEmpty, info, error){
@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){ }

@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 @helper.html.datetimeago(latestCommit.authorTime) @if(latestCommit.isDifferentFromAuthor) { @user(latestCommit.committerName, latestCommit.committerEmailAddress, "username strong") committed @helper.html.datetimeago(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.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) [@user(file.author, file.mailAddress)] | @helper.html.datetimeago(file.time, false)
}

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