]> source.dussan.org Git - gitea.git/commitdiff
Mirror change
authorUnknown <joe2010xtmf@163.com>
Mon, 17 Mar 2014 10:58:34 +0000 (06:58 -0400)
committerUnknown <joe2010xtmf@163.com>
Mon, 17 Mar 2014 10:58:34 +0000 (06:58 -0400)
.gitignore
routers/repo/single.go
templates/repo/commits.tmpl [new file with mode: 0644]

index 55d2a5784c008ef4f0813a89de432adbe0c3460e..6559d61a06d3800407aa13cb4cfbac2a0d6ab793 100644 (file)
@@ -6,4 +6,3 @@ gogs
 *.log
 custom/
 .vendor/
-repo/
index f47a2f7bfcad9aa820a21bd09eb09b214100e8bc..acbf9dd0a9d76c30302e8e2949f3d87dbb1417d9 100644 (file)
@@ -88,15 +88,9 @@ func Single(ctx *middleware.Context, params martini.Params) {
        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
                }
@@ -136,8 +130,9 @@ func Setting(ctx *middleware.Context, params martini.Params) {
        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 {
diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl
new file mode 100644 (file)
index 0000000..7ebe68b
--- /dev/null
@@ -0,0 +1,9 @@
+{{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