Working on install page

This commit is contained in:
Unknown 2014-03-28 07:26:22 -04:00
parent 5344a03003
commit 0fd754bbe0
6 changed files with 56 additions and 37 deletions

View file

@ -4,10 +4,28 @@
package routers
import "github.com/gogits/gogs/modules/middleware"
import (
"errors"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/middleware"
)
func Install(ctx *middleware.Context) {
if base.InstallLock {
ctx.Handle(404, "install.Install", errors.New("Installation is prohibited"))
return
}
func Install(ctx *middleware.Context){
ctx.Data["PageIsInstall"] = true
ctx.Data["Title"] = "Install"
ctx.HTML(200,"install")
ctx.Data["DbCfg"] = models.DbCfg
ctx.Data["RepoRootPath"] = base.RepoRootPath
ctx.Data["RunUser"] = base.RunUser
ctx.Data["PageIsInstall"] = true
if ctx.Req.Method == "GET" {
ctx.HTML(200, "install")
return
}
}