template.go 798 B

12345678910111213141516171819202122232425
  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/gogits/gogs/models"
  7. "github.com/gogits/gogs/pkg/context"
  8. "github.com/gogits/gogs/pkg/setting"
  9. )
  10. func TemplatePreview(ctx *context.Context) {
  11. ctx.Data["User"] = models.User{Name: "Unknown"}
  12. ctx.Data["AppName"] = setting.AppName
  13. ctx.Data["AppVer"] = setting.AppVer
  14. ctx.Data["AppURL"] = setting.AppURL
  15. ctx.Data["Code"] = "2014031910370000009fff6782aadb2162b4a997acb69d4400888e0b9274657374"
  16. ctx.Data["ActiveCodeLives"] = setting.Service.ActiveCodeLives / 60
  17. ctx.Data["ResetPwdCodeLives"] = setting.Service.ResetPwdCodeLives / 60
  18. ctx.Data["CurDbValue"] = ""
  19. ctx.HTML(200, (ctx.Params("*")))
  20. }