mirror of
https://github.com/go-gitea/gitea
synced 2025-07-07 19:17:21 +00:00
In progress of name template name constant
This commit is contained in:
@ -104,12 +104,12 @@ func (ctx *Context) HasError() bool {
|
||||
}
|
||||
|
||||
// HTML calls render.HTML underlying but reduce one argument.
|
||||
func (ctx *Context) HTML(status int, name string, htmlOpt ...HTMLOptions) {
|
||||
ctx.Render.HTML(status, name, ctx.Data, htmlOpt...)
|
||||
func (ctx *Context) HTML(status int, name base.TplName, htmlOpt ...HTMLOptions) {
|
||||
ctx.Render.HTML(status, string(name), ctx.Data, htmlOpt...)
|
||||
}
|
||||
|
||||
// RenderWithErr used for page has form validation but need to prompt error to users.
|
||||
func (ctx *Context) RenderWithErr(msg, tpl string, form auth.Form) {
|
||||
func (ctx *Context) RenderWithErr(msg string, tpl base.TplName, form auth.Form) {
|
||||
if form != nil {
|
||||
auth.AssignForm(form, ctx.Data)
|
||||
}
|
||||
@ -133,7 +133,7 @@ func (ctx *Context) Handle(status int, title string, err error) {
|
||||
case 500:
|
||||
ctx.Data["Title"] = "Internal Server Error"
|
||||
}
|
||||
ctx.HTML(status, fmt.Sprintf("status/%d", status))
|
||||
ctx.HTML(status, base.TplName(fmt.Sprintf("status/%d", status)))
|
||||
}
|
||||
|
||||
func (ctx *Context) Debug(msg string, args ...interface{}) {
|
||||
|
Reference in New Issue
Block a user