mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 17:57:14 -04:00
Working on install page
This commit is contained in:
parent
5344a03003
commit
0fd754bbe0
6 changed files with 56 additions and 37 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue