aboutsummaryrefslogtreecommitdiff
path: root/pkg/context/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/context/context.go')
-rw-r--r--pkg/context/context.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/context/context.go b/pkg/context/context.go
index b3377833..89783007 100644
--- a/pkg/context/context.go
+++ b/pkg/context/context.go
@@ -21,7 +21,7 @@ import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/pkg/auth"
- "github.com/gogits/gogs/pkg/base"
+ "github.com/gogits/gogs/pkg/tool"
"github.com/gogits/gogs/pkg/form"
"github.com/gogits/gogs/pkg/setting"
)
@@ -80,18 +80,18 @@ func (ctx *Context) HasValue(name string) bool {
}
// HTML responses template with given status.
-func (ctx *Context) HTML(status int, name base.TplName) {
+func (ctx *Context) HTML(status int, name tool.TplName) {
log.Trace("Template: %s", name)
ctx.Context.HTML(status, string(name))
}
// Success responses template with status http.StatusOK.
-func (c *Context) Success(name base.TplName) {
+func (c *Context) Success(name tool.TplName) {
c.HTML(http.StatusOK, name)
}
// RenderWithErr used for page has form validation but need to prompt error to users.
-func (ctx *Context) RenderWithErr(msg string, tpl base.TplName, f interface{}) {
+func (ctx *Context) RenderWithErr(msg string, tpl tool.TplName, f interface{}) {
if f != nil {
form.Assign(f, ctx.Data)
}
@@ -112,7 +112,7 @@ func (ctx *Context) Handle(status int, title string, err error) {
ctx.Data["ErrorMsg"] = err
}
}
- ctx.HTML(status, base.TplName(fmt.Sprintf("status/%d", status)))
+ ctx.HTML(status, tool.TplName(fmt.Sprintf("status/%d", status)))
}
// NotFound renders the 404 page.