@(gist: gitbucket.gist.model.Gist, forkedCount: Int, repositoryUrl: gitbucket.gist.util.GistUtils.GistRepositoryURL, editable: Boolean, revisions: List[(gitbucket.core.util.JGitUtil.CommitInfo, List[gitbucket.core.util.JGitUtil.DiffInfo])])(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers @import org.eclipse.jgit.diff.DiffEntry.ChangeType @gitbucket.core.html.main(s"Revisions · ${gist.repositoryName}"){
@gitbucket.gist.html.header(gist, forkedCount, editable)
@gitbucket.gist.html.menu("revision", gist, repositoryUrl)
@revisions.map { case (revision, diffs) =>
@helpers.avatar(revision, 20) @revision.authorName revised this @gitbucket.core.helper.html.datetimeago(revision.authorTime)
@if(diffs.isEmpty){ No changes. } @revision.id.substring(0, 7)
@diffs.zipWithIndex.map { case (diff, i) =>
@diff.changeType match { case ChangeType.ADD => { @diff.newPath } case ChangeType.MODIFY => { @diff.newPath } case ChangeType.DELETE => { @diff.oldPath } case _ => { } }
@if(diff.newContent != None || diff.oldContent != None){
} else { Not supported }
}
}
}