diff --git a/app/handler/auth.go b/app/handler/auth.go index e6c67c5..ee49fa1 100644 --- a/app/handler/auth.go +++ b/app/handler/auth.go @@ -28,7 +28,10 @@ func AuthSignUpPageHandler(ctx *golf.Context) { if userNum == 0 { ctx.Loader("admin").Render("signup.html", make(map[string]interface{})) } else { - ctx.Abort(404) + ctx.Loader("default").Render("error_msg.html", map[string]interface{}{ + "Reason": "New user accounts cannot be created for this blog at this time.", + }) + // ctx.Abort(404) return } } diff --git a/app/handler/init.go b/app/handler/init.go index 8ec9676..47c7b0f 100644 --- a/app/handler/init.go +++ b/app/handler/init.go @@ -20,6 +20,7 @@ func Initialize(app *golf.Application) *golf.Application { theme := model.GetSettingValue("theme") app.View.SetTemplateLoader("base", "view") app.View.SetTemplateLoader("admin", filepath.Join("view", "admin")) + app.View.SetTemplateLoader("default", filepath.Join("view", "default")) app.View.SetTemplateLoader("theme", filepath.Join("view", theme)) // static_dir, _ := app.Config.GetString("app/static_dir", "static") app.Static("/upload/", upload_dir) diff --git a/view/default/error_msg.html b/view/default/error_msg.html new file mode 100644 index 0000000..e60af2f --- /dev/null +++ b/view/default/error_msg.html @@ -0,0 +1,25 @@ +{{ extends "/default.html" }} + +{{ define "content"}} +
+
+
+
+ +
+
+

+ Oops! An error occurred: +

+
+
+

{{ .Reason }}

+

You can return to our homepage by clicking here.

+
+
+
+ +
+
+
+{{end}}