@(pathList: List[String], branch: String, repository: service.RepositoryService.RepositoryInfo, commits: Seq[Seq[util.JGitUtil.CommitInfo]], page: Int, hasNext: Boolean)(implicit context: app.Context) @import context._ @import view.helpers._ @html.main(s"${repository.owner}/${repository.name}", Some(repository)) { @html.header("code", repository) @tab(branch, repository, if(pathList.isEmpty) "commits" else "files") <div class="head"> @if(pathList.isEmpty){ <a href="@url(repository)/tree/@encodeRefName(branch)">@repository.name</a> / Commit History } @if(pathList.nonEmpty){ <span class="muted">History for</span> <a href="@url(repository)/tree/@encodeRefName(branch)">@repository.name</a> / @pathList.zipWithIndex.map { case (section, i) => @if(i == pathList.length - 1){ @section } else { <a href="@url(repository)/tree/@encodeRefName(branch)/@pathList.take(i + 1).mkString("/")">@section</a> / } } } </div> @commits.map { day => <table class="table table-bordered"> <tr> <th>@date(day.head.time)</th> </tr> @day.map { commit => <tr> <td> <div class="pull-right align-right"> <a href="@url(repository)/commit/@commit.id" class="btn btn-small monospace">@commit.id.substring(0, 10)</a><br> <a href="@url(repository)/tree/@commit.id" class="small">Browse code</a> </div> <div> <div class="commit-avatar-image">@avatar(commit, 40)</div> <div class="commit-message-box"> <a href="@url(repository)/commit/@commit.id" class="commit-message" style="font-weight: bold;">@link(commit.summary, repository)</a> @if(commit.description.isDefined){ <a href="javascript:void(0)" onclick="$('#description-@commit.id').toggle();" class="omit">...</a> } <br> @if(commit.description.isDefined){ <pre id="description-@commit.id" style="display: none;" class="commit-description">@link(commit.description.get, repository)</pre> } <div class="small"> <a href="@url(commit.committer)" class="username">@commit.committer</a> <span class="muted">@datetime(commit.time)</span> </div> </div> </div> </td> </tr> } </table> } <div class="btn-group"> <button class="btn" onclick="location.href='?page=@{page - 1}'"@if(page <= 1){ disabled="true"}>< Newer</button> <button class="btn" onclick="location.href='?page=@{page + 1}'"@if(!hasNext){ disabled="true"}>Older ></button> </div> }