From d18237850c6a4ae855b3f8592994c91462fcdb0a Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Fri, 14 Mar 2014 17:12:28 +0800 Subject: [PATCH] add draft page for empty link --- routers/user/setting.go | 14 ++++++++++++++ templates/repo/single.tmpl | 2 +- templates/user/notification.tmpl | 19 +++++++++++++++++++ templates/user/security.tmpl | 19 +++++++++++++++++++ web.go | 2 ++ 5 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 templates/user/notification.tmpl create mode 100644 templates/user/security.tmpl diff --git a/routers/user/setting.go b/routers/user/setting.go index b01d27d845..8b5a2d18df 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -154,3 +154,17 @@ func SettingSSHKeys(form auth.AddSSHKeyForm, r render.Render, data base.TmplData data["Keys"] = keys r.HTML(200, "user/publickey", data) } + +func SettingNotification(r render.Render, data base.TmplData) { + // todo user setting notification + data["Title"] = "Notification" + data["PageIsUserSetting"] = true + r.HTML(200, "user/notification", data) +} + +func SettingSecurity(r render.Render, data base.TmplData) { + // todo user setting security + data["Title"] = "Security" + data["PageIsUserSetting"] = true + r.HTML(200, "user/security", data) +} diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl index 4a71ad3465..fbd05c4ba7 100644 --- a/templates/repo/single.tmpl +++ b/templates/repo/single.tmpl @@ -30,7 +30,7 @@ {{range .Files}} - {{.Name}} + {{.Name}} {{.Message}} diff --git a/templates/user/notification.tmpl b/templates/user/notification.tmpl new file mode 100644 index 0000000000..c1abc46fb0 --- /dev/null +++ b/templates/user/notification.tmpl @@ -0,0 +1,19 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +
+ +
+

Notification

+
+
+{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/user/security.tmpl b/templates/user/security.tmpl new file mode 100644 index 0000000000..37cd5872aa --- /dev/null +++ b/templates/user/security.tmpl @@ -0,0 +1,19 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +
+ +
+

Security

+
+
+{{template "base/footer" .}} \ No newline at end of file diff --git a/web.go b/web.go index f416d96e86..8f698e39d7 100644 --- a/web.go +++ b/web.go @@ -67,6 +67,8 @@ func runWeb(*cli.Context) { m.Any("/user/setting", auth.SignInRequire(true), binding.BindIgnErr(auth.UpdateProfileForm{}), user.Setting) m.Any("/user/setting/password", auth.SignInRequire(true), binding.BindIgnErr(auth.UpdatePasswdForm{}), user.SettingPassword) m.Any("/user/setting/ssh", auth.SignInRequire(true), binding.BindIgnErr(auth.AddSSHKeyForm{}), user.SettingSSHKeys) + m.Any("/user/setting/notification",auth.SignInRequire(true),user.SettingNotification) + m.Any("/user/setting/security",auth.SignInRequire(true),user.SettingSecurity) m.Get("/user/:username", auth.SignInRequire(false), user.Profile)