1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-22 17:34:03 +03:00

Merge branch 'master' of github.com:gogits/gogs

This commit is contained in:
Lunny Xiao 2014-03-17 20:05:29 +08:00
commit f2b0dc18b5
4 changed files with 17 additions and 11 deletions

1
.gitignore vendored
View File

@ -6,4 +6,3 @@ gogs
*.log
custom/
.vendor/
repo/

View File

@ -88,21 +88,16 @@ 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
}
}
if readmeFile != nil {
ctx.Data["ReadmeExist"] = true
// if file large than 1M not show it
if readmeFile.Size > 1024*1024 || readmeFile.Filemode != git.FileModeBlob {
ctx.Data["FileIsLarge"] = true
@ -136,8 +131,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 {

View File

@ -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" .}}

View File

@ -83,6 +83,7 @@
</tbody>
</table>
</div>
{{if .ReadmeExist}}
<div class="panel panel-default file-content">
<div class="panel-heading file-head">
<i class="icon fa fa-book"></i> README.md
@ -97,6 +98,7 @@
</div>
{{end}}
</div>
{{end}}
</div>
</div>
{{template "base/footer" .}}