var readmeFile *models.RepoFile
for _, f := range files {
- if !f.IsFile() {
+ if !f.IsFile() || len(f.Name) < 6 {
continue
- }
-
- if len(f.Name) < 6 {
- continue
- }
-
- if strings.ToLower(f.Name[:6]) == "readme" {
+ } else if strings.ToLower(f.Name[:6]) == "readme" {
readmeFile = f
break
}
ctx.Render.HTML(200, "repo/setting", ctx.Data)
}
-func Commits(ctx *middleware.Context) string {
- return "This is commits page"
+func Commits(ctx *middleware.Context) {
+ ctx.Data["IsRepoToolbarCommits"] = true
+ ctx.Render.HTML(200, "repo/commits", ctx.Data)
}
func Issues(ctx *middleware.Context) string {
--- /dev/null
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="gogs-body" class="container">
+ <div id="gogs-commits">
+ </div>
+</div>
+{{template "base/footer" .}}
\ No newline at end of file