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.
30 lines
1.0 KiB
30 lines
1.0 KiB
11 years ago
|
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||
|
// Use of this source code is governed by a MIT-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
package dev
|
||
|
|
||
|
import (
|
||
4 years ago
|
"net/http"
|
||
|
|
||
8 years ago
|
"code.gitea.io/gitea/models"
|
||
|
"code.gitea.io/gitea/modules/base"
|
||
|
"code.gitea.io/gitea/modules/context"
|
||
|
"code.gitea.io/gitea/modules/setting"
|
||
5 years ago
|
"code.gitea.io/gitea/modules/timeutil"
|
||
11 years ago
|
)
|
||
|
|
||
8 years ago
|
// TemplatePreview render for previewing the indicated template
|
||
9 years ago
|
func TemplatePreview(ctx *context.Context) {
|
||
11 years ago
|
ctx.Data["User"] = models.User{Name: "Unknown"}
|
||
11 years ago
|
ctx.Data["AppName"] = setting.AppName
|
||
|
ctx.Data["AppVer"] = setting.AppVer
|
||
8 years ago
|
ctx.Data["AppUrl"] = setting.AppURL
|
||
11 years ago
|
ctx.Data["Code"] = "2014031910370000009fff6782aadb2162b4a997acb69d4400888e0b9274657374"
|
||
5 years ago
|
ctx.Data["ActiveCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language())
|
||
|
ctx.Data["ResetPwdCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ResetPwdCodeLives, ctx.Locale.Language())
|
||
11 years ago
|
ctx.Data["CurDbValue"] = ""
|
||
9 years ago
|
|
||
4 years ago
|
ctx.HTML(http.StatusOK, base.TplName(ctx.Params("*")))
|
||
11 years ago
|
}
|