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

This commit is contained in:
Unknown 2014-03-15 12:13:48 -04:00
commit f026ae8652
5 changed files with 96 additions and 69 deletions

View file

@ -10,12 +10,14 @@ import (
)
func Single(ctx *middleware.Context, params martini.Params) {
if !ctx.Data["IsRepositoryValid"].(bool) {
if !ctx.Repo.IsValid {
return
}
if params["branchname"] == "" {
params["branchname"] = "master"
}
treename := params["_1"]
files, err := models.GetReposFiles(params["username"], params["reponame"],
params["branchname"], treename)
@ -45,11 +47,16 @@ func Single(ctx *middleware.Context, params martini.Params) {
}
func Setting(ctx *middleware.Context) {
if !ctx.Data["IsRepositoryValid"].(bool) {
if !ctx.Repo.IsValid {
return
}
ctx.Data["Title"] = ctx.Data["Title"].(string) + " - settings"
var title string
if t, ok := ctx.Data["Title"].(string); ok {
title = t
}
ctx.Data["Title"] = title + " - settings"
ctx.Data["IsRepoToolbarSetting"] = true
ctx.Render.HTML(200, "repo/setting", ctx.Data)
}