@(branch: String, repository: service.RepositoryService.RepositoryInfo, pathList: List[String], content: util.JGitUtil.ContentInfo, latestCommit: util.JGitUtil.CommitInfo, hasWritePermission: Boolean)(implicit context: app.Context) @import context._ @import view.helpers._ @html.main(s"${repository.owner}/${repository.name}", Some(repository)) { @html.menu("code", repository){
@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) => @if(i == pathList.length - 1){ @section } else { @section / } }
    @avatar(latestCommit, 20) @user(latestCommit.committer, latestCommit.mailAddress, "username strong") @datetime(latestCommit.time) @link(latestCommit.summary, repository)
    @if(hasWritePermission && content.viewType == "text"){ Edit } Raw History @if(hasWritePermission){ Delete }
    @if(content.viewType == "text"){ @defining(pathList.reverse.head) { file => @if(renderableSuffixes.find(suffix => file.toLowerCase.endsWith(suffix))) { @renderMarkup(pathList, content.content.get, branch, repository, false, false) } else {
    @content.content.get
    } } } @if(content.viewType == "image"){ } @if(content.viewType == "large" || content.viewType == "binary"){
    View Raw
    (Sorry about that, but we can't show files that are this big right now)
    }
    } }