You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
902 B

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  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 dev
  5. import (
  6. "github.com/go-martini/martini"
  7. "github.com/gogits/gogs/models"
  8. "github.com/gogits/gogs/modules/middleware"
  9. "github.com/gogits/gogs/modules/setting"
  10. )
  11. func TemplatePreview(ctx *middleware.Context, params martini.Params) {
  12. ctx.Data["User"] = models.User{Name: "Unknown"}
  13. ctx.Data["AppName"] = setting.AppName
  14. ctx.Data["AppVer"] = setting.AppVer
  15. ctx.Data["AppUrl"] = setting.AppUrl
  16. ctx.Data["AppLogo"] = setting.AppLogo
  17. ctx.Data["Code"] = "2014031910370000009fff6782aadb2162b4a997acb69d4400888e0b9274657374"
  18. ctx.Data["ActiveCodeLives"] = setting.Service.ActiveCodeLives / 60
  19. ctx.Data["ResetPwdCodeLives"] = setting.Service.ResetPwdCodeLives / 60
  20. ctx.Data["CurDbValue"] = ""
  21. ctx.HTML(200, params["_1"])
  22. }