dashboard.go 554 B

123456789101112131415161718192021
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package routers
  5. import (
  6. "github.com/gogits/gogs/modules/base"
  7. "github.com/gogits/gogs/routers/user"
  8. "github.com/martini-contrib/render"
  9. "github.com/martini-contrib/sessions"
  10. )
  11. func Home(r render.Render, data base.TmplData, session sessions.Session) {
  12. if user.IsSignedIn(session) {
  13. user.Dashboard(r, data, session)
  14. return
  15. }
  16. data["PageIsHome"] = true
  17. r.HTML(200, "home", data)
  18. }