summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-17 06:58:34 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-17 06:58:34 -0400
commitee93186f72262e702661df1469d72546de426787 (patch)
tree3d339831a408deec77f145d31dd7762e3d3ecefc /routers
parent5bc2a1a6f98ae42ab5c30299d26082ffae54b859 (diff)
downloadgitea-ee93186f72262e702661df1469d72546de426787.tar.gz
gitea-ee93186f72262e702661df1469d72546de426787.zip
Mirror change
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/single.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/routers/repo/single.go b/routers/repo/single.go
index f47a2f7bfc..acbf9dd0a9 100644
--- a/routers/repo/single.go
+++ b/routers/repo/single.go
@@ -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 {