Add latest commit in repo viewer

This commit is contained in:
Unknown
2014-03-17 00:57:18 -04:00
parent 664bbe4f54
commit 0f68930892
6 changed files with 57 additions and 3 deletions

View File

@ -50,6 +50,13 @@ func Single(ctx *middleware.Context, params martini.Params) {
}
}
commit, err := models.GetLastestCommit(params["username"], params["reponame"])
if err != nil {
ctx.Handle(200, "repo.Single", err)
return
}
ctx.Data["LatestCommit"] = commit
ctx.Data["Paths"] = Paths
ctx.Data["Treenames"] = treenames
ctx.Data["IsRepoToolbarSource"] = true