@(branch: String, repository: app.RepositoryInfo, pathList: List[String], content: String, latestCommit: app.CommitInfo)(implicit context: app.Context) @import context._ @import view.helpers @main(repository.owner+"/"+repository.name) { @header(branch, repository) @navtab(branch, repository, "files") <div class="head"> <a href="@path/@repository.owner/@repository.name/tree/@branch">@repository.name</a> / @pathList.zipWithIndex.map { case (path, i) => @if(i == pathList.length - 1){ @path } else { <a href="@path/@repository.owner/@repository.name/tree/@branch/@pathList.take(i + 1).mkString("/")">@path</a> / } } </div> <table class="table table-bordered"> <tr> <th style="font-weight: normal;"> <div class="pull-left"> <a href="@path/@latestCommit.committer">@latestCommit.committer</a> <span class="description">@helpers.datetime(latestCommit.time)</span> @helpers.cut(latestCommit.message, 100)<br> </div> <div class="btn-group pull-right"> <button class="btn btn-mini">Edit</button> <button class="btn btn-mini">Raw</button> <button class="btn btn-mini">History</button> </div> </th> </tr> <tr> <td><pre class="prettyprint linenums">@content</pre></td> </tr> </table> <link href="@path/assets/google-code-prettify/prettify.css" type="text/css" rel="stylesheet"/> <script src="@path/assets/google-code-prettify/prettify.js"></script> <style type="text/css"> li.L0, li.L1, li.L2, li.L3, li.L4, li.L5, li.L6, li.L7, li.L8, li.L9 { list-style-type: decimal; background: white; } li.L1, li.L3, li.L5, li.L7, li.L9 { background: #f5f5f5; } pre.prettyprint { border: none; background-color: white; padding-left: 20px; } </style> <script> $(function(){ prettyPrint(); }); </script> }