@(commitId: String, commit: util.JGitUtil.CommitInfo, branches: List[String], tags: List[String], repository: service.RepositoryService.RepositoryInfo, diffs: Seq[util.JGitUtil.DiffInfo])(implicit context: app.Context) @import context._ @import view.helpers._ @import util.Implicits._ @import org.eclipse.jgit.diff.DiffEntry.ChangeType @html.main(commit.shortMessage){ @html.header("code", repository) @tab(commitId, repository, "commits")

Browse code @link(commit.summary, repository) @if(commit.description.isDefined){
    @link(commit.description.get, repository)
} @if(branches.nonEmpty){ @branches.zipWithIndex.map { case (branch, i) => @branch } } @if(tags.nonEmpty){ @tags.zipWithIndex.map { case (tag, i) => @tag } }
@commit.committer @datetime(commit.time) @if(commit.parents.size == 0){ 0 parent } @if(commit.parents.size == 1){ 1 parent @commit.parents(0).substring(0, 7) } commit @commit.id @if(commit.parents.size > 1){ @commit.parents.size parents @commit.parents.map { parent => @parent.substring(0, 7) }.mkHtml(" + ") }

@if(diffs.size == 1){ Showing 1 changed files } else { Showing @diffs.size changed files }

@diffs.zipWithIndex.map { case (diff, i) => 0){ class="border"}> @if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){ @diff.oldPath -> @diff.newPath } @if(diff.changeType == ChangeType.ADD){ @diff.newPath } @if(diff.changeType == ChangeType.MODIFY){ @diff.newPath } @if(diff.changeType == ChangeType.DELETE){ @diff.oldPath } }

@helper.html.diff(diffs, repository, Some(commit.id)) }