dashboard.go 526 B

1234567891011121314151617181920
  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. r.HTML(200, "home", nil)
  17. }