30 lines
465 B
Go
30 lines
465 B
Go
package actions
|
|
|
|
import (
|
|
"gitea.com/xorm/dbweb/models"
|
|
|
|
"gitea.com/tango/renders"
|
|
"github.com/go-xorm/core"
|
|
)
|
|
|
|
type Home struct {
|
|
AuthRenderBase
|
|
}
|
|
|
|
func (c *Home) Get() error {
|
|
engines, err := models.FindEngines()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return c.Render("root.html", renders.T{
|
|
"engines": engines,
|
|
"tables": []core.Table{},
|
|
"records": [][]string{},
|
|
"columns": []string{},
|
|
"id": 0,
|
|
"ishome": true,
|
|
"IsLogin": c.IsLogin(),
|
|
})
|
|
}
|